avisangle/method-crm-mcp

šŸ“Š Data Platforms🟢 Verified Active
0 Views
0 Installs

šŸ ā˜ļø šŸ  šŸŽ 🪟 🐧 - Production-ready MCP server for Method CRM API integration with 20 comprehensive tools for tables, files, users, events, and API key management. Features rate limiting, retry logic, and dual transport support (stdio/HTTP).

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "avisangle-method-crm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "avisangle-method-crm-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Method CRM MCP Server

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

# Clone the repository
git clone https://github.com/avisangle/method-crm-mcp.git
cd method-crm-mcp

# Install dependencies
pip install -e .

# Or install with dev dependencies
pip install -e ".[dev]"

Configuration

1. Environment Setup

Copy the example environment file:

cp .env.example .env

2. Configure Authentication

Edit .env and set your API key:

# Required: Method CRM API Key
METHOD_API_KEY=your_api_key_here

# Optional: Customize API base URL
METHOD_API_BASE_URL=https://rest.method.me/api/v1/

# Optional: Transport configuration
METHOD_TRANSPORT=stdio        # or 'http'
METHOD_HTTP_PORT=8000         # only used if TRANSPORT=http

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:

python -m method_mcp.server

Or using the module directly:

python src/method_mcp/server.py

HTTP Transport (Remote Access)

For remote access or multiple clients:

# Set transport in .env
METHOD_TRANSPORT=http
METHOD_HTTP_PORT=8000

# Start server
python -m method_mcp.server

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):

{
  "mcpServers": {
    "method-crm": {
      "command": "python",
      "args": [
        "-m",
        "method_mcp.server"
      ],
      "cwd": "/absolute/path/to/method-crm-mcp",
      "env": {
        "METHOD_API_KEY": "your_api_key_here"
      }
    }
  }
}

MCP Inspector (Testing)

Test tools using MCP Inspector:

npx @modelcontextprotocol/inspector python src/method_mcp/server.py

Available Tools

Table Operations (5 tools)

ToolDescriptionRead-OnlyDestructive
method_tables_queryQuery records with filtering, pagination, aggregationāœ…āŒ
method_tables_getGet specific record by ID with optional expansionāœ…āŒ
method_tables_createCreate new record in any tableāŒāŒ
method_tables_updateUpdate record fields (batch support: 50 records)āŒāŒ
method_tables_deleteDelete record permanentlyāŒāœ…

Example: Query active customers

{
  "table": "Customer",
  "filter": "Status eq 'Active'",
  "top": 50,
  "orderby": "CreatedDate desc",
  "response_format": "json"
}

Example: Create new inventory item

{
  "table": "ItemInventory",
  "fields": {
    "Name": "New Product",
    "Sku": "SKU-001",
    "SalesDesc": "Product description",
    "SalesPrice": 99.99,
    "PurchaseCost": 80,
    "PurchaseDesc": "Purchase description",
    "IsActive": true,
    "IncomeAccount": "Sales of Product Income",
    "COGSAccount": "Cost of Goods Sold",
    "AssetAccount": "Inventory",
    "PurchaseTaxCode": "Tax on Purchases",
    "SalesTaxCode": "Tax on Sales",
    "IsUsedOnPurchaseTransaction": true,
    "IsUsedOnSalesTransaction": true,
    "IsTrackQtyOnHand": true,
    "TenantID": 1
  },
  "response_format": "json"
}

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)

ToolDescriptionRead-OnlyDestructive
method_files_uploadUpload file (max 50MB) with optional record linkingāŒāŒ
method_files_listList files with filtering and paginationāœ…āŒ
method_files_downloadDownload file content (base64-encoded)āœ…āŒ
method_files_get_urlGenerate temporary download URL (20-min expiry)āœ…āŒ
method_files_update_linkUpdate file link to different table/recordāŒāŒ
method_files_deleteDelete file permanentlyāŒāœ…

Example: Upload invoice PDF

{
  "filename": "invoice-2024-01.pdf",
  "content": "<base64-encoded content>",
  "link_table": "Invoice",
  "link_record_id": "INV-12345",
  "description": "January 2024 invoice"
}

User Information (1 tool)

ToolDescriptionRead-Only
method_user_get_infoGet current authenticated user informationāœ…

Event Automation (4 tools)

ToolDescriptionRead-OnlyDestructive
method_events_create_routineCreate event-driven automation routineāŒāŒ
method_events_list_routinesList all event routines with paginationāœ…āŒ
method_events_get_routineGet specific routine details by IDāœ…āŒ
method_events_delete_routineDelete event routine permanentlyāŒāœ…

Example: Send email on new customer

{
  "name": "New Customer Welcome",
  "description": "Send welcome email to new customers",
  "trigger_config": {
    "event": "record_created",
    "table": "Customer"
  },
  "actions": [
    {
      "action": "send_email",
      "template": "welcome",
      "to_field": "Email"
    }
  ],
  "enabled": true
}

API Key Management (4 tools)

ToolDescriptionRead-OnlyDestructiveAdmin Required
method_apikeys_createCreate new API key (returns key once)āŒāŒāœ…
method_apikeys_listList API keys (keys masked for security)āœ…āŒāŒ
method_apikeys_updateUpdate key metadata (name, permissions, status)āŒāŒāœ…
method_apikeys_deleteDelete/revoke API key permanentlyāŒāœ…āœ…

Example: Create production API key

{
  "name": "Production Server",
  "description": "Main API integration key",
  "permissions": ["read:all", "write:all"]
}

API Rate Limits

Method CRM enforces the following limits:

  • Per-minute: 100 requests per account
  • Daily: 5,000-25,000 requests (varies by license count)
  • File size: 50MB per file
  • Storage: 10GB total per account
  • Batch updates: 50 related records maximum

The MCP server automatically handles rate limiting with:

  • Exponential backoff retry logic
  • Clear error messages with retry-after timing
  • Actionable suggestions for rate limit errors

Error Handling

All tools return actionable error messages with suggestions:

Example error responses:

Error: Rate limit exceeded (100 requests/minute or daily limit reached).
Retry-After: 45 seconds
Suggestion: Wait before making more requests. Method CRM limits: 100 req/min per account, 5,000-25,000 daily depending on licenses.
Error: Resource not found - Record 'CUST-999' not found in table 'Customer'
Suggestion: Verify that the table name, record ID, or file ID is correct. Use list/query tools to find the correct identifier.
Error: Permission denied - Your account doesn't have Admin role required for this operation
Suggestion: Your account doesn't have permission to perform this operation. Check that you have the required role (e.g., Admin for API key creation) or that the resource belongs to your account.

Advanced Features

OData Query Filtering

Use powerful OData-style filters for queries:

# Equality
"Status eq 'Active'"

# Comparison
"CreatedDate gt '2024-01-01'"
"Total ge 1000"

# Logical operators
"Status eq 'Active' and Total gt 500"
"Type eq 'Invoice' or Type eq 'Estimate'"

# String functions
"startswith(Name, 'John')"
"contains(Email, '@example.com')"
"endswith(Status, 'ed')"

# Null checks
"Email ne null"

Aggregations

Perform aggregations directly in queries:

# Count records
"count()"

# Sum amounts
"sum(Amount)"

# Group by with aggregation
"groupby((Status),aggregate($count as Total))"

# Multiple aggregations
"sum(Amount),average(Total),count()"

Pagination

All list/query tools support pagination:

{
  "table": "Customer",
  "top": 100,
  "skip": 0
}

Responses include pagination metadata:

{
  "total": 500,
  "count": 100,
  "offset": 0,
  "has_more": true,
  "next_offset": 100
}

Response Formats

Choose between JSON (structured) and Markdown (human-readable):

{
  "response_format": "json"    // or "markdown"
}

Architecture

method-crm-mcp/
ā”œā”€ā”€ src/method_mcp/
│   ā”œā”€ā”€ server.py           # FastMCP server initialization
│   ā”œā”€ā”€ client.py           # HTTP client with retry logic
│   ā”œā”€ā”€ auth.py             # Authentication (API Key + OAuth2 placeholders)
│   ā”œā”€ā”€ models.py           # Pydantic models (20 tools)
│   ā”œā”€ā”€ errors.py           # Error handling utilities
│   ā”œā”€ā”€ utils.py            # Shared helpers (pagination, formatting)
│   └── tools/
│       ā”œā”€ā”€ tables.py       # 5 table operation tools (CRUD)
│       ā”œā”€ā”€ files.py        # 6 file management tools
│       ā”œā”€ā”€ user.py         # 1 user info tool
│       ā”œā”€ā”€ events.py       # 4 event automation tools (complete CRUD)
│       └── apikeys.py      # 4 API key management tools (complete CRUD)
ā”œā”€ā”€ tests/                  # Unit and integration tests
ā”œā”€ā”€ evaluations/            # Evaluation questions for testing
ā”œā”€ā”€ pyproject.toml          # Dependencies and project metadata
ā”œā”€ā”€ .env.example            # Environment configuration template
└── README.md               # This file

Development

Running Tests

# Install dev dependencies
pip install -e ".[dev]"

# Run all tests
pytest

# Run with coverage
pytest --cov=src/method_mcp --cov-report=html

Code Quality

# Type checking
mypy src/method_mcp

# Linting
ruff check src/method_mcp

# Formatting
black src/method_mcp

Troubleshooting

Authentication Errors

Problem: Error: Authentication failed. Your API key or access token is invalid or expired.

Solutions:

  • Verify METHOD_API_KEY is set correctly in .env
  • Check that the key hasn't been revoked in Method CRM dashboard
  • Ensure no extra whitespace in the key value

Rate Limiting

Problem: Error: Rate limit exceeded (100 requests/minute)

Solutions:

  • Wait for the retry-after period (check error message)
  • Reduce request frequency in your application
  • Use pagination to reduce total requests
  • Consider upgrading Method CRM license for higher limits

File Upload Errors

Problem: Error: File size exceeds 50MB limit

Solutions:

  • Compress files before uploading
  • Split large files into smaller chunks
  • Use external storage (S3, etc.) and store URLs in Method CRM

Connection Errors

Problem: Error: Unable to connect to Method API

Solutions:

  • Check internet connection
  • Verify METHOD_API_BASE_URL is correct
  • Check if Method CRM is experiencing downtime
  • Verify firewall/proxy settings

Security Best Practices

  1. API Key Storage

    • Store in environment variables, never in code
    • Use .env file (never commit to version control)
    • Rotate keys periodically (every 90 days recommended)
  2. Access Control

    • Use separate API keys for different environments (dev/staging/prod)
    • Revoke unused keys promptly
    • Monitor key usage via method_apikeys_list
  3. File Handling

    • Validate file types before upload
    • Scan uploaded files for malware
    • Enforce file size limits in application logic
  4. Error Messages

    • Don't expose sensitive information in logs
    • Use debug mode only in development

OAuth2 Support (Coming Soon)

OAuth2 authentication is planned for a future release:

  • Authorization Code Flow: User-based authentication
  • Client Credentials Flow: Machine-to-machine with token refresh
  • Implicit Flow: Browser-based SPAs

Placeholders are already in the codebase (auth.py).

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new features
  4. Ensure all tests pass
  5. Submit a pull request

Support

License

MIT License - See LICENSE file for details.

Changelog

Version 1.0.0 (2025-11-22)

Initial Public Release

  • āœ… 20 fully implemented tools (complete API coverage)
  • āœ… API Key authentication
  • āœ… Dual transport support (stdio + HTTP)
  • āœ… Rate limiting and retry logic
  • āœ… Comprehensive error handling
  • āœ… Pydantic validation for all inputs
  • āœ… Pagination support with cursor-based navigation
  • āœ… Multiple response formats (JSON/Markdown)
  • āœ… File operations with multipart/form-data support
  • āœ… Complete CRUD for tables, events, and API keys
  • ā³ OAuth2 support (placeholders added)

Built with ā¤ļø using FastMCP and the Model Context Protocol

Related MCP Servers

1luvc0d3/metabase-mcp

šŸ“‡ šŸ  - MCP server connecting Claude to Metabase with 28 tools for natural language data analysis, dashboard management, SQL queries, and automated insights. Features SQL guardrails, rate limiting, and audit logging.

šŸ“Š Data Platforms0 views
aegis-dq/aegis-dq

šŸ šŸ  šŸŽ 🪟 🐧 - Agentic data quality framework that runs structured rules against warehouses (DuckDB, BigQuery, Athena, Databricks, Postgres), diagnoses failures with LLM root cause analysis, and proposes SQL remediations. Every LLM decision is audit-logged with cost and latency.

šŸ“Š Data Platforms0 views
alanpcf/brasil-data-mcp

šŸ“‡ šŸ  šŸŽ 🪟 🐧 - Brazilian public data for AI agents — companies (CNPJ), addresses (CEP), banks (BACEN), national holidays — via BrasilAPI. No auth, no API key. Install: npx -y brasil-data-mcp.

šŸ“Š Data Platforms0 views
Alessandro114/scala-mcp-server

šŸ“‡ ā˜ļø šŸŽ 🪟 🐧 - Search and enrich data from 250M+ companies across 50+ countries. Company lookup by name, VAT, or ID, NACE sector search, and financial data from official EU business registries. Free tier: 50 lookups/month. Install: npx scala-mcp-server.

šŸ“Š Data Platforms0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/28/2026, 6:13:31 PM

Unclaimed listing (imported or pending owner verification). Claim it →
ā˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.