Sponsored by Deepsite.site

MCP Server for Paper Analytical Devices (PAD)

Created By
psaboia9 months ago
A Python MCP Server for Paper Analytical Devices (PAD)
Content

MCP Server for Paper Analytical Devices (PAD)

An MCP server implementation that provides a standardized interface to interact with the Paper Analytical Devices (PAD) system at Notre Dame (pad.crc.nd.edu). This server enables LLM-based tools and agents to access and process PAD data through the Model Context Protocol.

Features

  • Card Management:
    • Retrieve and list PAD test cards with comprehensive metadata
    • Access individual card details including camera type, quantities, and IDs
    • Process and store card images with high-quality resizing
  • Neural Network Integration:
    • List available neural networks
    • Access network configurations
    • Interface with analysis systems
  • Project Organization:
    • Manage PAD projects
    • Handle card groups
    • Track issues and samples
  • Image Processing:
    • High-quality image resizing using Lanczos resampling
    • Automatic image optimization (300px max width)
    • Card geometry handling with coordinate scaling
    • Detailed image metadata (dimensions, paths)

Setup

For Claude Desktop Users

  1. Ensure you have Python 3.12 or higher installed
  2. Clone this repository
  3. Configure Claude Desktop with the settings below (no manual package installation needed)

Configuration

Claude Desktop Configuration

To use this server with Claude Desktop, add the following configuration to your Claude settings:

{
  "mcpServers": {
    "pad": {
      "command": "<path-to-uv>",
      "args": [
        "--directory",
        "<path-to-repository>",
        "run",
        "main.py"
      ],
      "env": {
        "FILESYSTEM_STORAGE": "<path-to-storage-directory>"
      }
    }
  }
}

Configuration parameters:

  • <path-to-uv>: Path to your uv installation (e.g., ~/.local/bin/uv)
  • <path-to-repository>: Absolute path to where you cloned this repository
  • <path-to-storage-directory>: Directory where you want to store PAD files (defaults to ~/Documents/pad_storage if not specified)

This configuration:

  • Uses uv to automatically manage Python dependencies - no manual installation needed
  • Sets the correct working directory
  • Runs the server through main.py
  • Configures the storage location (defaults to ~/Documents/pad_storage if not specified)

After configuring Claude Desktop with these settings, all PAD server tools (cards, neural networks, image processing) will be available through the MCP interface.

Usage

Start the server manually:

uv run python pad.py

The server exposes the following MCP tools:

  • get_v2_cards(): List all available cards with comprehensive metadata (camera type, quantities, IDs)
  • get_v2_card_by_id(card_id): Get detailed card information including all metadata fields
  • get_v2_neural_networks(): List available neural networks
  • get_v2_neural_network_by_id(nn_id): Get specific neural network details
  • get_v2_projects(): List all projects
  • get_card_image_by_id(card_id): Retrieve, process, and optimize card images with metadata
  • load_image(path): Load and process images from disk
  • load_card_geometry(path): Load and scale v2 card geometry
  • multiply_coordinates(data, factor): Scale geometry coordinates for processing

API Integration

The server communicates with the PAD API at https://pad.crc.nd.edu and provides a standardized interface through MCP. This allows seamless integration with LLM-based tools while maintaining security and structure.

Dependencies

Managed automatically by uv through Claude Desktop:

  • httpx (>=0.28.1): For API communication
  • mcp[cli] (>=1.3.0): MCP server functionality
  • Pillow (>=11.1.0): High-quality image processing

Examples

Using with Claude Desktop

When using the PAD server with Claude Desktop, you can have natural conversations about your PAD cards. Here are some example interactions:

Prompt: Can you show the image for the card 51866?

image

Prompt: List PAD projects created after Jully 2024.

image

Prompt: Can you list the neural networks added via PAD API after July 2024

image

Development

This server is built using FastMCP and follows the Model Context Protocol for tool definitions and interactions. For more information about MCP, visit modelcontextprotocol.io.

Security

All interactions with the PAD API are handled securely through the server. Data storage is managed locally in the configured filesystem location.

Notes

We now have a new server, main_swagger.py that automatically builds the tools associated with API.

Configure for Claude with

"pad": {
            "command": "uv",
            "args": [
              "--directory",
              "/Users/csweet1/Documents/projects/earth616/mcp-server-pad",
              "run",
              "main_swagger.py"
            ],
            "env": {
              "SERVER_BASE_URL": "https://pad.crc.nd.edu",
              "OPENAPI_SPEC_URL": "https://pad.crc.nd.edu/api-ld/v3/openapi.json",
              "FILESYSTEM_STORAGE": "/Users/csweet1/Documents/projects/earth616/pad_storage"
            }
        }
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Playwright McpPlaywright MCP server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.