Download the PHP package wpboilerplate/wpb-mcp-servers-list without Composer

On this page you can find all versions of the php package wpboilerplate/wpb-mcp-servers-list. 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 wpb-mcp-servers-list

wpb-mcp-servers-list

A Composer library that retrieves all MCP servers registered in WordPress via the MCP Adapter plugin.

This package is intentionally display-free. It provides typed PHP data objects and an optional REST endpoint. How the data is styled and rendered is entirely up to the consuming plugin.


Requirements

Dependency Version
PHP >= 7.4
WordPress >= 6.8
Jetpack Autoloader ^5.0 (≥ v5.0.18, Composer dependency)
MCP Adapter plugin >= 0.5.0 (soft dependency)

The package works gracefully when MCP Adapter is not active — get_servers() simply returns an empty array and is_adapter_available() returns false.


Installation

Make sure your plugin loads the Jetpack Autoloader (installed alongside this package):

This package uses Jetpack Autoloader instead of the standard Composer autoloader to prevent class-version conflicts when multiple plugins require the same package. Always load vendor/autoload_packages.php, not vendor/autoload.php.


Usage

1. Collect server data

MCP Adapter registers servers during rest_api_init at priority 15. You must collect after that:

2. Read the data

3. Optional REST endpoint

Register the built-in endpoint so your admin JS can fetch server data:

The endpoint is admin-only by default (manage_options). Use the wpb_mcp_servers_list_rest_capability filter to change the required capability at runtime:

Note: The filter takes precedence over the $capability argument passed to RestEndpoint::register(). Non-admin users always receive a 401 Unauthorized response if neither the argument nor the filter grants them access.

Response shape:

4. Check adapter availability


API Reference

McpServersList

Method Returns Description
::instance() McpServersList Get singleton instance
::bootstrap() void Register collect() on rest_api_init at priority 20
::is_adapter_available() bool Check if MCP Adapter is active
->collect() void Collect all registered servers (idempotent)
->get_servers() ServerData[] All collected servers
->get_server( $id ) ServerData\|null Single server by ID
->has_servers() bool Whether any servers were collected
->is_collected() bool Whether collect() has run

RestEndpoint

Method Description
::register( $capability, $namespace, $route ) Register the REST endpoint (admin-only by default)
::get_schema() Get the JSON schema for the response

Constants: RestEndpoint::NAMESPACE, RestEndpoint::ROUTE

Filter: wpb_mcp_servers_list_rest_capability — override the required WordPress capability at runtime.

ServerData

Method Returns
get_id() string
get_name() string
get_description() string
get_version() string
get_endpoint_url() string
get_route_namespace() string
get_route() string
get_tools() ToolData[]
get_resources() ResourceData[]
get_prompts() PromptData[]
to_array() array

ToolData / PromptData

get_name(), get_description(), to_array()

ResourceData

get_name(), get_uri(), get_description(), to_array()


Changelog

See CHANGELOG.md.


License

GPL-2.0-or-later — see LICENSE.


All versions of wpb-mcp-servers-list with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
automattic/jetpack-autoloader Version ^5.0
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 wpboilerplate/wpb-mcp-servers-list contains the following files

Loading the files please wait ...