Download the PHP package wordpress/mcp-adapter without Composer

On this page you can find all versions of the php package wordpress/mcp-adapter. 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 mcp-adapter

MCP Adapter

Part of the AI Building Blocks for WordPress initiative

The official WordPress package for MCP integration that exposes WordPress abilities as Model Context Protocol (MCP) tools, resources, and prompts for AI agents.

Ask DeepWiki

Overview

This adapter bridges WordPress's Abilities API with the MCP specification, providing a standardized way for AI agents to interact with WordPress functionality. It includes HTTP and STDIO transport support, comprehensive error handling, and an extensible architecture for custom integrations.

Features

Core Functionality

MCP Component Support

Understanding Abilities as MCP Components

The MCP Adapter transforms WordPress abilities into MCP components:

For detailed information about MCP components, see the Model Context Protocol specification.

Architecture

Component Overview

Key Classes

McpAdapter

The main registry class that manages multiple MCP servers:

McpServer

Individual server management with comprehensive configuration:

Dependencies

Installation

With Composer (Primary Installation Method)

The MCP Adapter is designed to be installed as a Composer package. This is the primary and recommended installation method:

Using Jetpack Autoloader (Highly Recommended)

When multiple plugins use the MCP Adapter, it's highly recommended to use the Jetpack Autoloader to prevent version conflicts. The Jetpack Autoloader ensures that only the latest version of shared packages is loaded, eliminating conflicts when different plugins use different versions of the same dependency.

Add the Jetpack Autoloader to your project:

Then load it in your main plugin file instead of the standard Composer autoloader:

Benefits of using Jetpack Autoloader:

As a Plugin (Alternative Method)

Alternatively, you can install the MCP Adapter as a traditional WordPress plugin, though the Composer package method is preferred for most use cases.

From GitHub Releases

Download the latest stable release from the GitHub Releases page.

Development Version (Git Clone)

For the latest development version or to contribute to the project:

This will give you the latest development version from the trunk branch with all dependencies installed.

With WP-Env

Using MCP Adapter in Your Plugin

Using the MCP Adapter in your plugin is straightforward, just check availability and instantiate:

Basic Usage

The MCP Adapter automatically creates a default server that exposes registered WordPress abilities through a layered architecture. This provides immediate MCP functionality without requiring manual server configuration.

How it works:

Create a new ability (click to expand)

For detailed information about creating WordPress abilities, see the Abilities API developer documentation.

Connecting to MCP Servers

The MCP Adapter supports multiple connection methods. Here are examples for connecting with MCP clients:

STDIO Transport (Local Development)

For local development and testing, you can interact directly with MCP servers using WP-CLI commands:

MCP Client Configuration

Configure MCP clients (Claude Desktop, Claude Code, VS Code, Cursor, etc.) to connect to your WordPress MCP servers.

STDIO Transport Configuration for local sites (click to expand)
HTTP Transport via Proxy (click to expand) The [`@automattic/mcp-wordpress-remote`](https://www.npmjs.com/package/@automattic/mcp-wordpress-remote) proxy runs locally and translates STDIO-based MCP communication from AI clients into HTTP REST API calls that WordPress understands. Authentication uses [WordPress Application Passwords](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/).

Advanced Usage

Creating Custom MCP Servers

For advanced use cases, you can create custom MCP servers with specific configurations:

Custom Transport Implementation

The MCP Adapter includes production-ready HTTP transports. For specialized requirements like custom authentication, message queues, or enterprise integrations, you can create custom transport protocols.

See the Custom Transports Guide for detailed implementation instructions.

Custom Transport Permissions

The MCP Adapter supports custom authentication logic through transport permission callbacks. Instead of the default is_user_logged_in() check, you can implement custom authentication for your MCP servers.

See the Transport Permissions Guide for detailed authentication patterns.

Custom Error Handler

The MCP Adapter includes a default WordPress-compatible error handler, but you can implement custom error handling to integrate with existing logging systems, monitoring tools, or meet specific requirements.

See the Error Handling Guide for detailed implementation instructions.

Custom Observability Handler

The MCP Adapter includes built-in observability for tracking metrics and events. You can implement custom observability handlers to integrate with monitoring systems, analytics platforms, or performance tracking tools.

See the Observability Guide for detailed metrics tracking and custom handler implementation.

Migration

License

GPL-2.0-or-later


All versions of mcp-adapter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
wordpress/php-mcp-schema Version ^0.1.0
ext-json Version *
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 wordpress/mcp-adapter contains the following files

Loading the files please wait ...