npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

civicrm-mcp

v0.1.2

Published

Model Context Protocol server for CiviCRM — AuthX-first, schema-introspected.

Readme

civicrm-mcp

A Model Context Protocol server for CiviCRM. Lets Claude Desktop, Claude Code, and other MCP-compatible clients talk to a CiviCRM install through its APIv4.

Status: v0.1 — stdio transport, three tools, AuthX-first auth.

Requirements

  • Node.js 18.17 or later
  • CiviCRM 5.47 or later (tested against 5.59+)
  • A CiviCRM install on Drupal, WordPress, Backdrop, or Standalone

Install

npm install
npm run build

Don't have a CiviCRM yet?

See docs/INSTALL_CIVICRM.md for a 20-minute guide to running CiviCRM Standalone locally via DDEV.

Configure

Generate an API key for a dedicated "MCP Bot" contact:

  1. Create a CMS user + CiviCRM contact just for this integration.
  2. Grant it the CiviCRM permissions you want exposed (access CiviCRM, view all contacts, optionally edit all contacts, authenticate with api key).
  3. On that contact's summary page → MoreAPI Key, generate a random 20+ character key.

Copy .env.example to .env and fill in:

CIVICRM_BASE_URL=https://crm.example.org
CIVICRM_CMS=drupal            # or wordpress | standalone | backdrop
CIVICRM_API_KEY=...
CIVICRM_SITE_KEY=...          # only if the site-key guard is enabled
CIVICRM_AUTH_MODE=authx       # or legacy for pre-AuthX sites
CIVICRM_ALLOW_WRITES=false    # writes off by default
CIVICRM_ALLOW_DELETES=false   # deletes off by default

Use with Claude Desktop / Code

Add to your MCP config (~/Library/Application Support/Claude/claude_desktop_config.json or the equivalent for Claude Code):

{
  "mcpServers": {
    "civicrm": {
      "command": "node",
      "args": ["/absolute/path/to/civicrm-mcp/dist/index.js"],
      "env": {
        "CIVICRM_BASE_URL": "https://crm.example.org",
        "CIVICRM_CMS": "drupal",
        "CIVICRM_API_KEY": "…",
        "CIVICRM_ALLOW_WRITES": "false"
      }
    }
  }
}

Tools

Diagnostics | Tool | What it does | | --- | --- | | civicrm_system_info | Connectivity / version sanity check; resolves the authenticated bot contact. |

Read | Tool | What it does | | --- | --- | | civicrm_find_contacts | Search contacts by name or primary email. | | civicrm_get_contact | Fetch one contact by id, with sensible default fields. | | civicrm_get_relationships | List a contact's relationships with direction resolved. | | civicrm_get_contributions | List contributions with filters (donor, date window, status, type) and running sum. | | civicrm_list_events | List events (defaults to upcoming only). |

Introspection | Tool | What it does | | --- | --- | | civicrm_list_entities | List every APIv4 entity available on the install (incl. extensions). | | civicrm_describe_entity | Return fields + actions for an entity. Call this before civicrm_api4 if unsure. |

Write (require CIVICRM_ALLOW_WRITES=true) | Tool | What it does | | --- | --- | | civicrm_create_contact | Create a contact; chains email/phone creation. | | civicrm_update_contact | Update fields on an existing contact by id. | | civicrm_log_activity | Record an Activity (Phone Call, Meeting, Email, custom types). | | civicrm_record_contribution | Record a donation / contribution. | | civicrm_add_to_group | Add a contact to a group (idempotent). | | civicrm_remove_from_group | Mark a contact as Removed from a group (preserves history). | | civicrm_register_for_event | Register a contact for an event (Participant.create). | | civicrm_create_membership | Create a Membership record; CiviCRM auto-calculates dates from the type. |

Escape hatch | Tool | What it does | | --- | --- | | civicrm_api4 | Generic APIv4 passthrough — any entity, any action. Gated by env flags. |

Safety

  • Writes (create, update, save, submit) are refused unless CIVICRM_ALLOW_WRITES=true.
  • Deletes (delete, replace) are refused unless CIVICRM_ALLOW_DELETES=true.
  • api_key and hash fields are stripped from contact responses.
  • stdout is reserved for the MCP protocol; logs go to stderr.

Licence

MIT