Open-source MCP gateway for SuiteCRM - 24 CRM tools, OAuth2/OIDC auth, multi-entity, observability.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
β‘ Securely connect AI agents to your enterprise CRM in under 5 minutes. Production-ready.
An open-source MCP (Model Context Protocol) gateway for SuiteCRM. Lets AI assistants like Claude Desktop, Claude Code, and OpenClaw read and write your CRM data via a secure, persistent SSE connection.
Built from a real production deployment. Commercial alternatives are expensive; this one is free and open-source.
Ships with a stateless architecture powered by Redis for horizontal scaling, and a full observability stack: Prometheus metrics, Grafana dashboards (33 panels), and Loki log aggregation.
| Feature | SuiteCRM-MCP (Open Source) | Commercial Alternatives |
|---|---|---|
| Price | Free Forever | $1,000s / Year |
| Capabilities | Full CRUD (24+ tools) | Often Read-Only / Limited |
| Data Privacy | 100% Self-Hosted | Third-party Cloud/SaaS |
| Complexity | 5-Min Setup | Sales calls & Long trials |
| Observability | Full Grafana/Prometheus | Minimal / Closed |
Built for production environments where data integrity and privacy are non-negotiable.
| Section | |
|---|---|
| β¨ | Features |
| π οΈ | Tools |
| ποΈ | Architecture |
| π | Observability |
| π | Prerequisites |
| π | SuiteCRM API User Setup |
| β‘ | Quick Start - Single CRM |
| π | Multi-Entity Install |
| π³ | Docker |
| βοΈ | Configuration |
| π | TLS |
| π | Connecting a Client |
| π | Health Checks and Monitoring |
| π§ | Troubleshooting |
| β | Supported SuiteCRM Versions |
| β οΈ | Known Limitations |
| π‘οΈ | Security Notes |
| π | License |
/messages endpoint must reach the same process that owns the SSE transport)mcp-admin report generates browsable HTML activity reports from Loki and SQLite, with per-user drill-down showing call history, dry runs, and errors with module and field detail| Tool | Description |
|---|---|
{prefix}_search | Search records using SQL WHERE clause |
{prefix}_search_text | Full-text search across modules |
{prefix}_get | Get a single record by UUID |
{prefix}_get_many | Fetch up to 100 records by ID list in one call |
{prefix}_create | Create a new record |
{prefix}_update | Update an existing record |
{prefix}_delete | Soft-delete a record |
{prefix}_count | Count records matching a query |
{prefix}_bulk_upsert | Create or update up to 100 records at once |
{prefix}_get_relationships | Get related records via a link field |
{prefix}_link_records | Create a relationship between records |
{prefix}_unlink_records | Remove a relationship |
{prefix}_get_module_fields | Get field definitions for a module |
{prefix}_get_dropdown_values | List all dropdowns or get keyβlabel values for one |
{prefix}_list_modules | List all available CRM modules |
{prefix}_get_recent | Get recently viewed records for the current user |
{prefix}_get_upcoming_activities | Get upcoming calls, meetings, and tasks |
{prefix}_get_record_activities | Get activity history for any record |
{prefix}_log_call | Create a call and link it to contacts/accounts |
{prefix}_create_task | Create a task with optional parent record link |
{prefix}_create_note | Create a note linked to a parent record |
{prefix}_get_note_attachment | Download a file attachment from a Notes record |
{prefix}_set_note_attachment | Upload a file attachment to a Notes record |
{prefix}_server_info | Gateway status and connection info |
Replace {prefix} with your configured SUITECRM_PREFIX (default: suitecrm).
Supported modules include: Accounts, Contacts, Leads, Opportunities, Cases, Calls, Meetings, Tasks, Notes, Emails, Documents, Campaigns, AOS_Quotes, AOS_Invoices, AOS_Products, AOS_Contracts, AOR_Reports, AOW_WorkFlow, SecurityGroups - and any custom modules in your instance.
Users log in once via Auth0 or Azure AD; the gateway issues a personal API key. MCP clients attach it as Authorization: Bearer <key> on every request. CRM credentials never leave the gateway. Multiple CRM instances are supported - each gets its own port and tool namespace (suitecrm_crm1_*, suitecrm_crm2_*).
Smart Hybrid Routing: The gateway automatically routes basic CRUD operations and record fetching through the blazing-fast SuiteCRM 8 GraphQL API. If an AI requests a complex search requiring raw SQL filters (which GraphQL does not support), the gateway intercepts it and transparently fails over to the legacy v4.1 REST API-ensuring absolute 100% feature parity with no manual intervention.
Stateless Persistence: By moving auth sessions and user profiles from local memory/files to Redis, the gateway is completely stateless. This allows for horizontal scaling (running multiple gateway instances behind a load balancer), global rate limiting, and seamless restarts without dropping active AI connections. When running multiple instances behind a load balancer, sticky session routing is required: SSE transports and their /messages endpoint must land on the same process.
Ships with a complete observability stack in docker-compose.yml - one command starts everything alongside the gateway.
| Component | What you get |
|---|---|
| Prometheus | 17 metrics: request rate, latency histograms per entity, active sessions, CRM error codes, circuit breaker state, rate-limit hits, auth counters |
| Grafana | 33-panel entity dashboard (system health, user/session tables, CRM backend, security, tool breakdown) + fleet overview dashboard for multi-entity. Query structured logs and metrics side-by-side in Grafana Explore. |
| Loki | Structured JSON log ingestion via Promtail - search and filter logs by user, entity, or request ID directly in Grafana Explore using LogQL, queryable alongside metrics. Non-PII fields (status, stage, type, dates) log actual values; sensitive fields (names, emails, search queries) are always redacted. |
Alerting rules included for: circuit breaker open, high auth failure rate, latency SLO breach, session expiry storms.
mcp-admin report generates an HTML activity report from both sources - Loki supplies historical calls, SQLite covers the current period, and the two are merged automatically. Default period is daily; --period weekly and --period monthly are also supported. --serve publishes the report at /report via nginx. --user <email> drills down to a single user's calls, dry runs, and errors with module and field detail.
apt, systemd, and nginx)Before connecting, make sure your CRM user has API access enabled:
If API access isn't enabled, the gateway returns HTTP 401 with CRM authentication failed: Invalid Login immediately on connection - this is the most common first-run failure.
For production: create a dedicated API user with only the module permissions your AI assistant needs. Don't use the admin account.
For one CRM with automatic HTTPS and OAuth login.
Requirements: Ubuntu/Debian, Python 3.8+, root access, a domain pointing to this server, OAuth app credentials (see docs/auth0-setup.md)
The installer will prompt for OAuth configuration (issuer, client ID/secret, audience, gateway URL), then set up nginx, certbot, and systemd automatically.
After install, users authenticate at https://mcp.yourserver.com/auth/login to get their API key.
Test gateway health:
Verify it's working in Claude Desktop:
After adding the MCP server config (see docs/connect-claude-desktop.md) and restarting Claude Desktop, click the hammer icon. You should see 24 tools: suitecrm_search, suitecrm_get, etc.
Try a test prompt: "List the first 5 accounts in the CRM" - Claude should call suitecrm_search automatically.
For N CRM instances behind nginx - each gets its own port and path.
1. Copy and fill in the config:
2. Run the installer:
3. Enable HTTPS (recommended for production):
Pass --domain and --email. The installer updates the nginx config with your domain and runs certbot automatically.
The domain must already point to this server's public IP, and ports 80 and 443 must be open. After this step the gateway is available at https://mcp.yourserver.com/<code>/sse.
Once configured, the domain is saved automatically. Later --add and --remove runs preserve HTTPS without needing --domain again.
4. Open the nginx port (if using ufw, HTTP-only installs only):
5. Test a specific entity:
After authenticating at /auth/login and getting an API key:
6. Connect at: http://YOUR_SERVER:8080/<code>/sse (or https://your-domain/<code>/sse if HTTPS is enabled)
Verify it's working in Claude Desktop: After restarting Claude Desktop, click the hammer icon. You should see 24 tools per entity: suitecrm_crm1_search, suitecrm_crm2_search, etc.
Add entities later (no downtime on existing):
Remove an entity:
The fastest way to run the gateway without touching Node.js or system packages. A pre-built image is published to GitHub Container Registry on every push to main.
For production, pin to a release tag such as v5.4.0 instead of floating on latest.
Create your entity config (the auth service reads this to build MCP client commands):
Edit docker-compose.yml and fill in SUITECRM_ENDPOINT, AUTH0_* vars, and GATEWAY_PUBLIC_URL, then:
The gateway runs at http://localhost:3101. Visit /auth/login to authenticate and get an API key.
To update to a newer pinned release, change the image tag in docker-compose.yml and redeploy:
Upgrading from pre-v5.0.0: v5.0.0 introduced a stateless Redis architecture. If you have an existing
suitecrm-statenamed volume created by an older image, it is no longer used for SQLite. A new Redis container and volume will be provisioned automatically.All persistent state (sessions, profiles) lives in this volume. Recreating it clears those files - users will need to log in again.
For self-signed CRM certificates, add NODE_TLS_REJECT_UNAUTHORIZED: "0" to the environment block. For HTTPS termination (required for OAuth in production), put a reverse proxy (nginx, Caddy) in front.
Test gateway health:
Each container handles exactly one CRM entity. For N entities, add N service blocks to docker-compose.yml, each on its own port.
What changes per entity:
suitecrm-mcp-crm1, suitecrm-mcp-crm2, ...)SUITECRM_ENDPOINT - the REST API URL for that specific CRM (the path after the domain varies by SuiteCRM installation)SUITECRM_CODE - short identifier used in tool names and URL routing (e.g. crm1 gives tools named suitecrm_crm1_search, suitecrm_crm1_get, etc.)PORT and the host port mapping - each entity needs its own port (3101, 3102, ...)What stays the same across all entities:
AUTH0_DOMAIN and AUTH0_AUDIENCE - one Auth0 app handles all entitiessuitecrm-mcp-auth) is shared; entity containers depend on itPut a reverse proxy (nginx, Caddy) in front to route /crm1/ to port 3101, /crm2/ to port 3102, and /auth/ to any one instance. For production use with multiple CRMs, install.py --config entities.json handles all of this automatically on a Linux host.
| Variable | Required | Default | Description |
|---|---|---|---|
SUITECRM_ENDPOINT | Yes | - | Full URL to /service/v4_1/rest.php |
SUITECRM_PREFIX | No | suitecrm | Tool name prefix |
PORT | No | 3101 | Listen port |
BIND_HOST | No | 127.0.0.1 | Interface to bind the gateway server to |
SUITECRM_CODE | No | - | Entity code for multi-entity nginx routing |
REDIS_URL | Yes | redis://127.0.0.1:6379 | Connection string for Redis session store |
AUTH0_DOMAIN | Yes (auth) | - | Auth0 tenant domain (entity gateway) |
AUTH0_AUDIENCE | Yes (auth) | - | Auth0 API identifier (entity gateway) |
AUTH0_CLIENT_ID | Yes (auth svc) | - | Auth0 client ID (auth service only) |
AUTH0_CLIENT_SECRET | Yes (auth svc) | - | Auth0 client secret (auth service only) |
GATEWAY_PUBLIC_URL | Yes (auth svc) | - | Public base URL of the gateway (auth service only) |
SESSION_TTL_DAYS | No (auth svc) | 30 | Session token lifetime in days (auth service only) |
REQUIRED_GROUP | No | - | Auth0 role required to access this entity |
NODE_TLS_REJECT_UNAUTHORIZED | No | - | Set to 0 only for self-signed certs |
NODE_NO_WARNINGS | No | - | Set to 1 to suppress Node warnings |
TRUST_PROXY | No | - | Set to 1 when running behind nginx or another reverse proxy |
METRICS_PORT | No | 9090 | Prometheus metrics server port |
METRICS_BIND | No | 127.0.0.1 | Metrics server bind address |
CRM_TIMEOUT_MS | No | 30000 | CRM REST API request timeout in ms |
CIRCUIT_BREAKER_THRESHOLD | No | 5 | Consecutive CRM failures before circuit opens |
CIRCUIT_BREAKER_RESET_MS | No | 60000 | Time in ms before circuit moves to half-open |
Keys become the entity code (nginx path prefix, tool prefix suffix, service name). Ports must be unique.
Pass --domain and --email to the installer to enable HTTPS on the gateway itself. The installer sets up nginx as a TLS-terminating reverse proxy and runs certbot to obtain and auto-renew a certificate.
Requirements:
If certbot fails during install, the gateway still runs over HTTP. Fix DNS/firewall and re-run:
If your SuiteCRM uses a self-signed certificate, add "tls_skip": true to the entity config (multi) or pass --tls-skip (single). This sets NODE_TLS_REJECT_UNAUTHORIZED=0.
Only use this on trusted internal networks. Never expose a TLS-skipping gateway to the public internet.
Any MCP client that supports SSE transport with custom request headers will work. Each client has a different setup process - see the dedicated guide for your client:
| Client | How it connects | Setup guide |
|---|---|---|
| Claude Desktop | SSE direct - no bridge needed | docs/connect-claude-desktop.md |
| Claude Code (CLI) | SSE direct - no bridge needed | docs/connect-claude-code.md |
| OpenClaw | Bridge installer required | docs/connect-openclaw.md |
Claude Desktop and Claude Code connect directly to the gateway URL over SSE. After installing the gateway, add the SSE endpoint and your CRM credentials to your client config. Full steps including single/multi entity configs, HTTPS variants, and verification are in the guides above.
OpenClaw uses a two-component setup: the gateway runs on a remote server
(installed via install.py) and a bridge plugin runs locally on the OpenClaw
machine (installed via install-bridge.py). The bridge proxies all 24 SuiteCRM
tools through to the gateway. The OpenClaw guide covers both components end to end.
| Endpoint | Auth | Description |
|---|---|---|
GET /health | None | Shallow - always responds if the process is running |
GET /health/deep | None | Deep - pings the CRM REST API and returns latency |
/health/deep returns HTTP 200 when healthy, 503 when the CRM is unreachable. Rate-limited to 10 requests/minute.
Two components expose Prometheus metrics on separate ports (localhost only).
| Metric | Type | Description |
|---|---|---|
suitecrm_mcp_active_connections | Gauge | Currently open SSE connections |
suitecrm_mcp_connections_total | Counter | Total SSE connections established |
suitecrm_mcp_tool_calls_total | Counter | Tool calls by name and status (success/error) |
suitecrm_mcp_tool_duration_seconds | Histogram | Tool call latency (p50/p95/p99 via buckets) |
suitecrm_mcp_crm_api_duration_seconds | Histogram | CRM REST API call latency |
suitecrm_mcp_session_renewals_total | Counter | CRM session re-authentications |
suitecrm_mcp_auth_failures_total | Counter | Authentication failures |
suitecrm_mcp_circuit_breaker_state | Gauge | 0=closed, 1=half-open, 2=open |
suitecrm_mcp_circuit_breaker_openings_total | Counter | Circuit breaker trip events |
| Metric | Type | Description |
|---|---|---|
suitecrm_auth_logins_total | Counter | OAuth2 login completions by result (new/reused/error) |
suitecrm_auth_bridge_sessions_total | Counter | Bridge session events (started/completed/expired) |
suitecrm_auth_sessions_active | Gauge | Non-expired gateway sessions currently stored |
The included docker-compose.yml starts a Prometheus + Grafana + Loki stack that scrapes both services automatically. Set GRAFANA_PASSWORD in your environment and visit http://localhost:3000.
Two dashboards are provisioned automatically:
For systemd installs, add scrape targets to monitoring/prometheus.yml:
The gateway tracks consecutive CRM REST API failures per entity. When the failure count reaches CIRCUIT_BREAKER_THRESHOLD (default 5), the circuit opens and all tool calls immediately return an error without hitting the CRM. After CIRCUIT_BREAKER_RESET_MS (default 60 seconds), the circuit moves to half-open and allows one probe call through. A successful probe closes the circuit; a failed probe keeps it open.
This prevents a slow or unresponsive CRM from tying up connections and causing cascading timeouts in the MCP client.
The current state appears in both /health and {prefix}_server_info tool responses.
Check service status:
View logs:
Test gateway health:
Common issues:
HTTP 401 on SSE - API key invalid or expired; re-authenticate at /auth/loginHTTP 403 on SSE - user not in the required group for this entity; check identity provider group membershipOAUTH_REDIRECT_URI matches exactly what is registered in your identity providerCRM login failed after OAuth - CRM user not found or API access not enabled; run mcp-admin list to verify the user has a profile in RedisNon-JSON response - wrong CRM endpoint URL; check it ends in /service/v4_1/rest.phpECONNREFUSED - service isn't running; journalctl -u suitecrm-mcpTested on SuiteCRM 8.8.x. Should work on any SuiteCRM version that exposes the v4_1 REST API - this has been present since early SuiteCRM releases.
Does not support SugarCRM - the APIs diverged significantly after the SuiteCRM fork.
Finding your endpoint URL
The path to the REST API varies depending on how SuiteCRM was installed. Common patterns:
To find yours: log into SuiteCRM, go to Admin β Diagnostic Tool and look at the site URL, or check with whoever manages your server. The endpoint always ends in /service/v4_1/rest.php - only the prefix before it varies. Test it with:
LDAP / SSO users cannot authenticate via the REST API
SuiteCRM's v4_1 REST API only authenticates against local database passwords. If your organisation uses LDAP, Active Directory, or SSO, users who log into the CRM web UI via those providers will not have a local password set - and the gateway will return Invalid Login for them even with correct credentials.
Workaround: Use crm-provision-user on the CRM VM (deployed by --setup-crm-host) to set a local API password for any existing LDAP/SSO user without touching their web login. Supports single user and bulk mode via CSV.
This is a SuiteCRM REST API limitation, not specific to this gateway.
--domain to enable Let's Encrypt, or put the gateway behind a TLS-terminating proxy.mcp-admin revoke <sub>. Compromised keys do not expose other users.crm:profiles hash on the gateway (access-controlled by Redis auth and network binding).AUTH0_CLIENT_SECRET secret. It is stored in /etc/suitecrm-mcp/auth.env (mode 600) and only read by the auth service.600 and the env directory with 700entities.json is in .gitignore - never commit it (it contains CRM endpoints and group names)See SECURITY.md for full details on controls and known limitations.
Built by Anirudhx7
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/suitecrm-mcp)<a href="https://allmcps.com/mcp/suitecrm-mcp"><img src="https://allmcps.com/api/badge/suitecrm-mcp?style=directory" alt="Suitecrm Mcp on AllMCPs" /></a>