e0ipso/drupal-bridge-mcp
If you are the rightful owner of drupal-bridge-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Drupal Bridge MCP Server facilitates seamless integration between Drupal sites and Model Context Protocol (MCP) tools, enabling dynamic tool discovery and access management.
Drupal Bridge MCP Server
🚀 Quick Start
🛠️ Available Tools
MCP tools are auto-discovered from the Drupal site. Just create the tools using JSON-RPC MCP.
How It Works
- Server fetches tool definitions from
/mcp/tools/list - Extracts required OAuth scopes from each tool's
annotations.auth.scopes
This eliminates manual scope configuration and automatically adapts to backend tool changes.
Automatic Scope Discovery
Scopes are extracted from tool metadata:
{
"name": "examples.contentTypes.create",
"annotations": {
"auth": {
"scopes": ["content_type:write"],
"level": "required"
}
}
}
The server automatically requests the content_type:write scope during OAuth flow.
Tool Access Validation
Before invoking a tool, the server validates:
- Authentication - Tool requires auth and session is authenticated
- Scopes - Session has all required OAuth scopes
- Permissions - Drupal validates permissions server-side
Error example:
Insufficient OAuth scopes for tool "examples.contentTypes.create".
Required: content_type:write
Missing: content_type:write
Current: profile, content_type:read
Authentication Levels
Tools can declare three authentication levels:
none: Public tools, no authentication requiredoptional: Enhanced functionality with auth, but works withoutrequired: Enforces authentication and scope validation
If a tool doesn't declare annotations.auth, it defaults to level='none' (public access).
📋 Development
# Install dependencies
npm install
# Run in development
npm run dev
# Build for production
npm run build
# Type check
npm run type-check
Use the great MCP Inspector project to validate the MCP server changes.
npx @modelcontextprotocol/inspector
📄 License
👨💻 Author
Mateu Aguiló Bosch (e0ipso) mateu@mateuaguilo.com