protonsystems / site-audit-mcp
Read-only MCP integration for Site Audit tools.
Package info
gitlab.com/Proton.Systems/drupal/site-audit-mcp
Type:drupal-module
pkg:composer/protonsystems/site-audit-mcp
Requires
- php: ^8.3
- drupal/core: ^11
- drupal/mcp_server: ^2.0@beta
- drupal/mcp_server_tool_bridge: ^1.0@beta
- protonsystems/site-audit-tools: ^1.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This package provides the optional site_audit_mcp Drupal module. It exposes
the Site Audit read-only tools from site_audit_tools through Drupal MCP Server
and Tool Bridge, including detailed configuration, content-type comparison,
and aggregate bundle usage, including a paginated summary of empty and
low-population fields across supported bundles.
Install
composer require protonsystems/site-audit-mcp
drush en mcp_server mcp_server_tool_bridge site_audit_tools site_audit_mcp
Enabling the module creates enabled MCP mappings for the Site Audit tools. Update hooks add mappings for comparison and usage operations on existing installations. It does not publish every Drupal Tool API tool installed on the site.
Local STDIO transport
Enabling the module also creates the mcp_auditor role (from config/optional; update 10003 adds it to sites that enabled an earlier release). It grants only Access MCP server and View site audit model. Create one account with that role per environment and run the server under it:
drush user:create mcp-auditor --mail=mcp-auditor@example.com --password="$(openssl rand -base64 32)"
drush user:role:add mcp_auditor mcp-auditor
vendor/bin/drush mcp:server mcp-auditor
The password is never used by the STDIO transport; a random one keeps the account from being used to log in. The STDIO account argument selects which Drupal permissions are evaluated; it is not client authentication. Anyone able to launch that process can act with the selected account's permissions. Keep the command in a local MCP client configuration and do not run it as UID 1.
A site that exports its configuration keeps the role in its own config sync directory after the first export, so a config import does not remove it.
Several sites from one client
Each site is a separate STDIO server in the client configuration. MCP clients such as Claude Code prefix every tool with the server name, so the same seven tools from different sites do not collide. Every client session starts its own drush mcp:server process, and the tools are read-only, so several agents can use the same site at once.
{
"mcpServers": {
"site-a-prod": {
"command": "ssh",
"args": ["deploy-alias", "cd /var/www/site-a && vendor/bin/drush mcp:server mcp-auditor"]
},
"site-b-local": {
"command": "bash",
"args": ["-lc", "cd ~/projects/site-b && ddev drush mcp:server mcp-auditor"]
}
}
}
Remote HTTP transport
The MCP Server project also provides HTTP transport. This package does not configure authentication or publish an unauthenticated endpoint. Before making the endpoint reachable outside a trusted local environment, configure an authentication layer, TLS, network restrictions, and a least-privileged Drupal account.
Last verified: 2026-11-20