Part of the agents epic #421.
Rationale
The inverse direction of the MCP client: expose selected tools — or whole agents — of an actor system as an MCP server, so external agent hosts can call into it. Same in-house JSON-RPC layer as the client issue; no SDK requirement.
Scope
mcpRoutes(registry, { expose, auth }) plugging into the HTTP DSL (streamable HTTP transport), reusing BearerTokenAuth; plus a stdio runner for CLI embedding.
- Incoming
tools/call → ToolRegistry.invoke (schema-validated, traced, supervised — same path as internal calls).
askAgentTool(agentRef, definition): expose a whole agent as a single MCP tool.
const routes = concat(
mcpRoutes(agents.tools, { expose: ['get_weather'], auth: BearerTokenAuth(config) }),
apiRoutes,
);
Documentation
"MCP" docs page (server half, EN + DE) incl. security guidance (auth required by default outside dev); JSDoc; CHANGELOG.
Acceptance
- End-to-end test: an MCP client fixture lists and calls an exposed tool over HTTP with auth; unauthorized calls rejected; stdio runner smoke-tested.
Non-goals
MCP resources/prompts; multi-tenant authorization schemes beyond the existing middleware.
Relates
Epic #421; depends on #423 (ToolRegistry) and shares the JSON-RPC layer with the MCP client issue. Dependency policy #419.
Part of the agents epic #421.
Rationale
The inverse direction of the MCP client: expose selected tools — or whole agents — of an actor system as an MCP server, so external agent hosts can call into it. Same in-house JSON-RPC layer as the client issue; no SDK requirement.
Scope
mcpRoutes(registry, { expose, auth })plugging into the HTTP DSL (streamable HTTP transport), reusingBearerTokenAuth; plus a stdio runner for CLI embedding.tools/call→ToolRegistry.invoke(schema-validated, traced, supervised — same path as internal calls).askAgentTool(agentRef, definition): expose a whole agent as a single MCP tool.Documentation
"MCP" docs page (server half, EN + DE) incl. security guidance (auth required by default outside dev); JSDoc; CHANGELOG.
Acceptance
Non-goals
MCP resources/prompts; multi-tenant authorization schemes beyond the existing middleware.
Relates
Epic #421; depends on #423 (ToolRegistry) and shares the JSON-RPC layer with the MCP client issue. Dependency policy #419.