Navigation
MCP Server for PAD: Automate Data, Simplify Workflows - MCP Implementation

MCP Server for PAD: Automate Data, Simplify Workflows

Boost your PAD game with our Python MCP Server – automate data magic, simplify workflows, and turn paper chaos into analysis bliss. #PaperProblemsSolved

Research And Data
4.9(32 reviews)
48 saves
22 comments

65% of users reported increased productivity after just one week

About MCP Server for PAD

What is MCP Server for PAD: Automate Data, Simplify Workflows?

The MCP Server for PAD is a tool designed to streamline interactions with the PAD API through the Model Context Protocol (MCP). It automates data retrieval and management processes, simplifying workflows by providing standardized access to PAD's resources, including neural networks, datasets, and API endpoints. All data interactions are secured and managed locally via configurable storage paths.

How to Use MCP Server for PAD: Automate Data, Simplify Workflows?

Setup and Configuration

  1. Install dependencies via uv (FastMCP runtime environment).
  2. Configure the server in your environment with required parameters:
    "pad": {
        "command": "uv",
        "args": ["--directory", "/path/to/project", "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": "/path/to/storage"
        }
    }

Execution

Run the server to expose PAD API tools as MCP-compliant endpoints. Use standard API calls to query neural networks, datasets, or manage configurations.

MCP Server for PAD Features

Key Features of MCP Server for PAD: Automate Data, Simplify Workflows?

  • Unified API Access: Maps PAD's RESTful endpoints into MCP-friendly tool definitions.
  • Local Data Persistence: Stores retrieved data in a user-specified directory for offline access.
  • Temporal Query Support: Filters resources by date (e.g., networks/datasets added after a specific date).
  • Automated Tool Generation: Uses OpenAPI specs to auto-generate tool definitions in main_swagger.py.
  • Secure Communication: Handles authentication and encryption natively through the server.

Use Cases of MCP Server for PAD: Automate Data, Simplify Workflows?

  • Neural Network Auditing: List all neural networks registered in PAD after a specific date to track deployments.
  • Dataset Automation: Periodically sync PAD datasets to local storage for analysis without manual downloads.
  • API Exploration: Query available PAD resources (e.g., supported APIs, endpoints) through standardized MCP tool calls.

MCP Server for PAD FAQ

FAQ from MCP Server for PAD: Automate Data, Simplify Workflows?

How do I troubleshoot dependency issues?

Ensure FastMCP and its dependencies are installed. Run uv --version to verify compatibility.

Can I customize storage paths dynamically?

Yes. Modify the FILESYSTEM_STORAGE environment variable in your configuration to redirect data storage locations.

What security measures are in place?

Data in transit uses TLS encryption, and local storage permissions are restricted to the executing user by default.

Where can I find the full tool documentation?

Generated tools are derived from the PAD OpenAPI spec. Full API details are available at PAD's official documentation.

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"
            }
        }

Related MCP Servers & Clients