ifcastle / mcp
A stateless Model Context Protocol server over HTTP: both protocol eras, a tool registry and a bearer check.
dev-main / 0.1.x-dev
2026-10-28 10:57 UTC
Requires
- php: >=8.5
- ifcastle/protocol-contracts: ^0.7
- psr/log: ^3.0
Requires (Dev)
- ifcastle/codestyle: ^0.1
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-28 15:33:06 UTC
README
A stateless Model Context Protocol server over Streamable HTTP for IFCastle
applications: tools only, every answer application/json, no sessions.
It serves the current revision, 2026-07-28 (per-request _meta, server/discover, mirrored headers), and the older
era of 2025-11-25 and 2025-06-18 (initialize without a session id) at the same endpoint, choosing the era per
request by its body. The host application supplies:
- a
BearerAuthenticatorInterface, which turnsAuthorization: Bearer <token>into the principal tools run as; - a
ToolRegistryofTooldefinitions, each with a JSON Schema (the subsetSchemaValidatorchecks) and a handler; - the
Originvalues a browser may send.
$server = new McpServer(new ServerInfo('my-app', '1.0'), $tools, $authenticator, ['https://my-app.example']); $response = $server->handle($httpRequest); // status, headers, body to send as they are