Skip to content

Make PDF Agent MCP remote-ready #2

Description

@vlad-ds

Summary

The PDF Agent MCP currently works well as a local MCP server but needs modifications to function as a remote MCP server. This involves adding network transport capabilities and handling remote file access patterns.

Current State

  • ✅ Works perfectly as local MCP via stdio transport
  • ✅ All PDF processing tools functional locally
  • ❌ Not configured for remote MCP deployment

Requirements for Remote MCP

Network Transport

  • Add HTTP/WebSocket transport support alongside stdio
  • Implement proper CORS handling for web clients
  • Add authentication/authorization if needed
  • Handle network timeouts and retries

File Access Patterns

  • Support for file uploads via HTTP endpoints
  • Handle base64-encoded PDF data in requests
  • Add temporary file management for uploaded PDFs
  • Implement file cleanup after processing

Configuration Changes

  • Add environment-based configuration
  • Support different transport modes (stdio vs network)
  • Add logging for remote debugging
  • Handle different security contexts

API Considerations

  • Ensure all tools work with remote file references
  • Add file size validation for uploads
  • Implement proper error handling for network issues
  • Consider rate limiting for remote usage

Technical Implementation

The MCP SDK supports multiple transports, so we need to:

  1. Transport Layer: Add HTTP/WebSocket transport options
  2. File Handling: Modify file resolution to handle uploaded/remote files
  3. Security: Add appropriate security measures for remote access
  4. Deployment: Create deployment configurations (Docker, etc.)

Success Criteria

  • Can be deployed as a remote MCP server
  • All existing PDF tools work with remote files
  • Proper error handling for network scenarios
  • Documentation for remote deployment

Priority

Medium - This would significantly expand the use cases for PDF Agent MCP by enabling remote AI agents to process PDFs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions