A production-ready Model Context Protocol (MCP) server for Method CRM API integration. This server enables LLMs to interact with Method CRM data through well-designed tools for tables, files, users, events, and API key management. Features - **20 Comprehensive Tools** covering all Method CRM operations - **API Key Authentication** (fully implemented) with OAuth2 placeholders - **Dual Transport Support**: stdio (local) and streamable HTTP (remote) - **Rate Limiting & Retry Logic**: Automatic handling of API limits - **Type-Safe**: Full Pydantic validation for all inputs - **Actionable Errors**: Clear error messages with suggestions - **Pagination Support**: Efficient handling of large datasets - **Multiple Response Formats**: JSON and Markdown outputs Installation Prerequisites - Python 3.10 or higher - Method CRM account with API access - API key (obtain from Method CRM dashboard) Install Dependencies Configuration 1. Environment Setup Copy the example environment file: 2. Configure Authentication Edit .env and set your API key: 3. Get Your API Key 1. Log in to your Method CRM account 2. Navigate to **Settings** → **API Settings** 3. Click **Create API Key** (requires Administrator role) 4. Name your key (e.g., "MCP Server") 5. Copy the generated key immediately (it won't be shown again) 6. Paste it into .env as METHOD_API_KEY Usage Running the Server stdio Transport (Local Use) Default mode for use with MCP clients like Claude Desktop: Or using the module directly: HTTP Transport (Remote Access) For remote access or multiple clients: The server will listen on http://localhost:8000 MCP Client Configuration Claude Desktop Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS): MCP Inspector (Testing) Test tools using MCP Inspector: Available Tools Table Operations (5 tools) | Tool | Description | Read-Only | Destructive | |------|-------------|-----------|-------------| | method_tables_query | Query records with filtering, pagination, aggregation | ✅ | ❌ | | method_tables_get | Get specific record by ID with optional expansion | ✅ | ❌ | | method_tables_create | Create new record in any table | ❌ | ❌ | | method_tables_update | Update record fields (batch support: 50 records) | ❌ | ❌ | | method_tables_delete | Delete record permanently | ❌ | ✅ | **Example**: Query active customers **Example**: Create new inventory item **Note**: Required fields vary by table. For ItemInventory: - **Required**: Sku (must be unique), COGSAccount, AssetAccount, TenantID - **Recommended**: IncomeAccount, tax codes, transaction flags - Account fields must match existing QuickBooks account names exactly File Management (6 tools) | Tool | Description | Read-Only | Destructive | |------|-------------|-----------|-------------| | method_files_upload | Upload file (max 50MB) with optional record linking | ❌ | ❌ | | method_files_list | List files with filtering and pagination | ✅ | ❌ | | method_files_download | Download file content (base64-encoded) | ✅ | ❌ | | method_files_get_url | Generate temporary download URL (20-min expiry) | ✅ | ❌ | | method_files_update_link | Update file link to different table/record | ❌ | ❌ | | method_files_delete | Delete file permanently | ❌ | ✅ | **Example**: Upload invoice PDF User Information (1 tool) | Tool | Description | Read-Only | |------|-------------|-----------| | method_user_get_info | Get current authenticated user information | ✅ | Event Automation (4 tools) | Tool | Description | Read-Only | Destructive | |------|-------------|-----------|-------------| | method_events_create_routine | Create event-driven automation routine | ❌ | ❌ |