An MCP server that lets MCP-compatible clients interact with a CiviCRM installation through APIv4 over stdio. It provides read, write, introspection, and diagnostic tools for contacts, contributions, events, memberships, groups, notes, activities, and saved searches.
From the registry: Model Context Protocol server for CiviCRM — AuthX-first, schema-introspected, write-gated.
Please install the `civicrm-mcp` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Node.js 18.17 or later** — Node.js 18.17+ is required to run the MCP server.
- **Have a CiviCRM installation available** — Requires a CiviCRM 5.47+ installation (tested against 5.59+) on Drupal, WordPress, Backdrop, or Standalone.
- **Create a dedicated CiviCRM bot user and API key** — Create a CMS user and matching CiviCRM contact for this integration, grant the desired CiviCRM permissions, and generate an API key for that contact. If your site uses the site-key guard, obtain the CiviCRM site key as well.
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","civicrm-mcp"]
- required environment variables:
- `CIVICRM_BASE_URL`: Base URL of your CiviCRM site. (example: `<your-civicrm-base-url>`)
- `CIVICRM_CMS`: CMS type for the CiviCRM install. Supported values: drupal, wordpress, standalone, backdrop. (example: `<your-civicrm-cms>`)
- `CIVICRM_API_KEY`: API key for the dedicated CiviCRM bot contact. (example: `<your-civicrm-api-key>`)
- optional environment variables:
- `CIVICRM_SITE_KEY`: CiviCRM site key, only needed if the site-key guard is enabled on the target site. (example: `<your-civicrm-site-key>`)
- `CIVICRM_AUTH_MODE`: Authentication mode. Use authx by default, or legacy for pre-AuthX sites. (example: `<your-auth-mode>`)
- `CIVICRM_ALLOW_WRITES`: Enable write tools when set to true. Defaults to false. (example: `<true-or-false>`)
- `CIVICRM_ALLOW_DELETES`: Enable delete-style operations when set to true. Defaults to false. (example: `<true-or-false>`)
- `CIVICRM_ALLOW_GENERIC_API`: Enable the generic civicrm_api4 passthrough tool when set to true. Defaults to false. (example: `<true-or-false>`)
- `CIVICRM_DRY_RUN_DEFAULT`: When true, write and delete operations are dry-run by default. Defaults to false. (example: `<true-or-false>`)
- `CIVICRM_TOOLS_ENABLED`: Comma-separated allowlist of tool names to register. Empty means all tools are enabled unless disabled. (example: `<comma-separated-tool-names>`)
- `CIVICRM_TOOLS_DISABLED`: Comma-separated denylist of tool names to disable. Takes precedence over CIVICRM_TOOLS_ENABLED. (example: `<comma-separated-tool-names>`)
Note: README also shows a local build path (`npm install && npm run build`), but the simpler portable MCP client configuration uses `npx -y civicrm-mcp`, which is preferred.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.CIVICRM_BASE_URLrequiredBase URL of the CiviCRM site.CIVICRM_CMSrequiredCMS type for the install, such as drupal, wordpress, standalone, or backdrop.CIVICRM_API_KEYrequiredAPI key for the dedicated CiviCRM bot contact.Meta Ads MCP (Facebook + Instagram) - analyze performance, manage budgets, pause campaigns.