Skip to content

Installation

Planned

There is no release yet. These steps describe how installation will work.

Requirements

  • CiviCRM 6.16 or later
  • PHP 8.2 to 8.4
  • A site served over HTTPS (OAuth sign-in requires it)
  • WordPress or CiviCRM Standalone. Drupal and Backdrop are planned (see the Roadmap)

CiviCRM Standalone: allow the sign-in discovery address

Standalone's stock .htaccess refuses every address containing /., which includes the address AI clients use to find the sign-in server (civicrm/mcp/oauth/.well-known/…), so they cannot connect. In the .htaccess at the site root, change the line RewriteRule "/\.|^\.(?!well-known/)" - [F] to RewriteRule "/\.(?!well-known/)|^\.(?!well-known/)" - [F]. Other hidden paths, such as .git and .env, stay refused. On nginx, allow .well-known the same way. The Setup checklist shows the authorization-server check failing with 403 until this is done.

Denying the extension folder in nginx

The admin screens load JavaScript from the extension's ang/ folder; on Apache, the extension's own ang/.htaccess allows it. If your nginx (or other front-end server) denies the extension folder, allow ang/*.js only, or the Setup checklist will not load.

Install a release

Install from a release, through the CiviCRM extensions screen or with cv ext:download civicrm_mcp, once one exists.

Do not install from a git clone on a live site

On WordPress the CiviCRM extensions directory is served publicly by the web server. A clone includes the .git/ directory, which would expose the repository's history. Use a release, or a git archive export, instead.

A release includes third-party code in its vendor/ directory: the official PHP MCP SDK and the packages it needs that CiviCRM does not already ship, under their own prefixed namespaces so they cannot clash with another extension's copies. There is no build step.

Then enable it:

cv ext:enable civicrm_mcp
cv flush

Next, work through Setup. Nobody can connect until you do.