Download the PHP package bloomidea/drush-mcp-bridge without Composer

On this page you can find all versions of the php package bloomidea/drush-mcp-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drush-mcp-bridge

drush-mcp

MCP server for Drupal via Drush. Lets AI agents (Claude Code, Gemini CLI, etc.) interact with any Drupal 10+/11+ site - locally, over SSH, or via Docker - by executing Drush commands.

Two packages:

Requirements

Quick Start

Install the MCP server:

Install the Drush bridge on your Drupal site:

Add the agent skill so your agent knows how to work with Drupal entities, fields, and groups:

"create a task in the Atrium group" / "list all published articles" / "check Drupal status" / "add a comment to node 123"

Works with Claude Code, Cursor, Codex, Gemini, Windsurf, and 37+ agents.

Register in Claude Code (local):

Or with SSH:

Configuration

Three methods: CLI flags, YAML config file, or environment variables.

CLI Flags

Config File

Create drush-mcp.yml in your project root or home directory, or pass --config path:

Drush Site Aliases

If your project already uses Drush site aliases (drush/sites/self.site.yml), the fields map directly to drush-mcp.yml:

Drush alias field drush-mcp equivalent
host host
user user
root root
uri uri
docker.service container

So a Drush alias like:

Becomes:

The main difference is that drush-mcp requires an explicit transport field and supports additional options like containerFilter for dynamic Docker container lookup.

File upload settings (per-site)

drupal_file_upload and drupal_file_attach accept optional file_upload settings in drush-mcp.yml (all keys optional, defaults shown):

Without a uri configured for the site, the tool still works but url in the response is null (drush in CLI mode without --uri cannot build a routable public URL).

Environment Variables

Variable Description
DRUSH_MCP_TRANSPORT local, ssh, or docker
DRUSH_MCP_HOST SSH/Docker host
DRUSH_MCP_USER SSH/Docker user
DRUSH_MCP_ROOT Drupal root path
DRUSH_MCP_COMMAND Local command (e.g. ddev drush)
DRUSH_MCP_CONTAINER Docker container name
DRUSH_MCP_CONTAINER_FILTER Docker filter for dynamic container lookup

Dynamic Container Resolution

When using Docker-based hosting platforms (Coolify, Docker Swarm, etc.), container names change on every deploy. Use --container-filter or the containerFilter config option with any valid docker ps --filter expression:

Or in drush-mcp.yml:

The container name is resolved fresh on every command via docker ps --filter, so it automatically picks up new containers after deploys.

Coolify Setup

If your Drupal site runs on Coolify:

  1. Set a service name in Coolify: Configuration > General > Name (e.g., atrium-web)
  2. Use the label filter:

  3. Install the bridge on your Drupal site: composer require bloomidea/drush-mcp-bridge
  4. Deploy - the bridge commands are available immediately

Tools

All 19 tools are available regardless of transport:

Tool Description
drupal_entity_create Create entity from JSON fields
drupal_entity_read Load entity by type + ID
drupal_entity_update Update fields on existing entity
drupal_entity_list Query entities with filters
drupal_entity_delete Delete entity by type + ID
drupal_introspect Discover entity types, bundles, fields
drupal_cache_rebuild Clear all caches
drupal_watchdog View recent log entries
drupal_status Site info (version, DB, PHP)
drupal_config_get Read configuration value
drupal_config_set Write configuration value
drupal_field_info Field definitions for entity type
drupal_user_create Create user account
drupal_user_block Block user account
drupal_file_upload Upload bytes and create a managed file entity
drupal_file_attach Upload bytes and attach to a file/image field on a node, comment, or other entity in one round trip
drupal_drush Run any Drush command
drupal_php_eval Execute PHP code
drupal_sql_query Run SQL query

Multi-site

When multiple sites are configured, all tools accept a site parameter to target a specific site. With a single site configured, it is resolved automatically.

Drush Bridge Commands

The bloomidea/drush-mcp-bridge Composer package provides structured entity commands auto-discovered by Drush:

Command Description
mcp:entity-create Create an entity
mcp:entity-read Read an entity
mcp:entity-update Update an entity
mcp:entity-list Query entities
mcp:introspect Introspect entity types and fields
mcp:file-upload Upload bytes (read from stdin) and create a managed file entity
mcp:file-attach Upload bytes and attach to a file/image field on an entity, with file.usage registration and rollback on failure

Install via Composer and Drush picks them up automatically - no additional registration needed.

Important: The bridge command class file must be named *DrushCommands.php (not *Commands.php) for Drush 12's PSR-4 discovery. The class also provides a static create() factory method for dependency injection from Drupal's service container.

How is this different from the Drupal MCP Server module?

The MCP Server Drupal module takes a different approach: it runs the MCP server inside Drupal as a PHP module, exposing tools via HTTP with OAuth 2.1 authentication.

drush-mcp runs outside Drupal as a standalone TypeScript process that executes Drush commands over shell, SSH, or Docker. This leads to several practical differences:

drush-mcp MCP Server module
Install on Drupal Optional Composer package (bridge) Required module + Tool API + Simple OAuth
Runs as External Node.js process Inside Drupal's PHP runtime
Transport STDIO (local shell, SSH, Docker) HTTP endpoint (/_mcp)
Auth model SSH keys / shell access OAuth 2.1 tokens
Config YAML file or CLI flags Drupal config entities
Tools 17 fixed tools + arbitrary Drush Extensible via Tool API plugins
Multi-site Built-in (one server, many sites) One instance per Drupal site
Works without Drupal changes Yes (built-in Drush commands work without the bridge) No (module must be installed and configured)

When to use drush-mcp: You already have SSH/shell access to your sites, want to connect multiple Drupal sites through one MCP server, or prefer not to install additional Drupal modules. Good for development workflows with DDEV/Lando and for ops teams managing multiple sites.

When to use MCP Server module: You need fine-grained OAuth-based access control, want to expose custom Tool API plugins, or prefer keeping everything within Drupal's ecosystem.

Security

There are no artificial capability tiers. If you have Drush access to a site, you have access to all tools.

The security boundary is transport access: SSH keys, Docker socket permissions, or local process access. Bridge commands (mcp:entity-*) enforce Drupal's entity access checks. Power tools (drupal_drush, drupal_php_eval, drupal_sql_query) do not - treat them accordingly.

License

MIT


All versions of drush-mcp-bridge with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
drush/drush Version ^12 || ^13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bloomidea/drush-mcp-bridge contains the following files

Loading the files please wait ...