Download the PHP package blackcube/mcp without Composer
On this page you can find all versions of the php package blackcube/mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blackcube/mcp
More information about blackcube/mcp
Files in blackcube/mcp
Package mcp
Short Description MCP server for the Blackcube admin data layer
License BSD-3-Clause
Homepage https://github.com/blackcubeio/mcp
Informations about the package mcp
Blackcube MCP
MCP server exposing the content administration operations of the Blackcube ecosystem, on top of blackcube/dcore. Opaque MCP keys or OAuth2 access tokens issued by the dboard authorization server, tools gated on dboard permissions, Streamable HTTP transport mounted as a PSR-15 middleware.
You generate an MCP key, or let an LLM client register itself and ask an administrator for consent; then the agent drives the content tree, blocs, taxonomy and discoverability through dcore — no parallel data path, no business logic duplicated.
Authentication
Two credentials open the server, both carrying dboard permissions:
- an opaque MCP key, generated in the dboard "MCP keys" screen or in the console, for the agents you run yourself;
- an OAuth2 access token issued by the dboard authorization server, for LLM clients: the client registers itself (RFC 7591), sends the administrator to the consent screen (authorization code + PKCE), and receives a token bounded by the permissions that administrator holds. The bound is checked again on every request: a right lost in dboard is lost on the server at once.
The server publishes its protected resource metadata (RFC 9728) under /.well-known/oauth-protected-resource followed by the endpoint path, and points at /dboard/oauth/mcp, its population on the dboard side. Each tool declares the dboard permissions it gates on (PERMISSIONS), and MCP:CONNECT is required for any credential.
Quickstart
The package is a dboard addon. Its DI, routes and parameters are merged by yiisoft/config; the host application declares the addon and its migrations in its parameters:
Psr\Clock\ClockInterface is expected from the host application (blackcube/oauth2 provides one); the package does not bind it.
locale (default en) is set on the translator for the endpoint only: every message sent back to the client, validation errors included, stays in that locale whatever the application locale.
allowedHosts (default []) lists the host names the endpoint answers to; any other Host header gets a 403. Left empty, only the host of the current request is allowed. An application usually fills it from a comma-separated environment variable (MCP_ALLOWED_HOSTS="cms.example.com, localhost", split on /\s*,\s*/).
Run the migrations, then create a key. Scopes are dboard permissions: MCP:CONNECT is mandatory, the others are the permissions the tools gate on (McpAddon::getScopes() lists them all). The token is printed once.
mcp:keyList, mcp:keyRevoke and mcp:keyGc complete the console side; the dboard "MCP keys" screen does the same, rotation included.
Point the MCP client at the endpoint (Streamable HTTP) with the token as a bearer:
An OAuth2-capable client needs no key: it discovers the authorization server from /.well-known/oauth-protected-resource/mcp, registers itself and asks an administrator for consent.
Tests
License
BSD-3-Clause. See LICENSE.md.
Author
Philippe Gaultier [email protected]
All versions of mcp with dependencies
mcp/sdk Version ^0.9
blackcube/active-record Version ^1.0
blackcube/dboard Version ^1.0
blackcube/dcore Version ^1.0
blackcube/handler Version ^1.0
blackcube/injector Version ^1.0
blackcube/bridge-form-model Version ^1.0
guzzlehttp/guzzle Version ^8.3
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
yiisoft/active-record Version ^1.1
yiisoft/aliases Version ^3.1
yiisoft/cache Version ^3.2
yiisoft/cache-file Version ^3.2
yiisoft/csrf Version ^2.2
yiisoft/db Version ^2.1
yiisoft/db-migration Version ^2.2
yiisoft/form-model Version ^1.1
yiisoft/hydrator Version ^1.6
yiisoft/injector Version ^1.2
yiisoft/log Version ^2.2
yiisoft/yii-console Version ^2.4