MCP increment 1: the /mcp server (core module, off by default) - #138
Merged
Conversation
Tiger as an MCP server (TIGERMCP.md §11 step 1). An external AI client drives the install through the SAME token-authenticated, ACL-gated /api surface — reach, not capability. - Tiger_Mcp — facade: the enable gate (tiger.mcp.enabled, OFF by default) + protocol version negotiation. - Tiger_Mcp_Server — the JSON-RPC 2.0 engine: initialize / tools/list / tools/call / ping, notifications ignored, batch refused. tools/list = Tiger_Agent_Tools::catalog (role) serialized to MCP tools (name = module__service__method, permissive inputSchema for now — Forms typing is increment 2); tools/call parses the name and runs the op through a dispatch seam, wrapping the /api envelope as MCP content (isError on result=0). - modules/mcp — Mcp_ServerController (the /mcp HTTP surface: reads the JSON-RPC body, resolves the Bearer token identity else session — mirrors ServiceFactory — and dispatches tools/call via ServiceFactory as that identity), routes.ini (/mcp, via the module-routes ingester), acl.ini (public controller like ApiController; the token + each service's own ACL do the real gating). OFF by default → /mcp 404s. - Tests: engine unit (lifecycle, name mapping, envelope wrapping, batch/notification/ unknown) + controller integration (404 disabled, initialize serverInfo, tools/list reflects the admin catalog). Verified live on dev over HTTP. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increment 1 of TigerMCP (TIGERMCP.md §11): Tiger as an MCP server. An external AI client (Claude Desktop/Code, Cursor, ChatGPT) drives the install through the same token-authenticated, ACL-gated
/apisurface the browser + in-app agent use — reach, not capability. One endpoint,/mcp, off by default.What ships
Tiger_Mcp— facade: the enable gate (tiger.mcp.enabled, OFF by default) + protocol-version negotiation.Tiger_Mcp_Server— the JSON-RPC 2.0 engine:initialize/tools/list/tools/call/ping; notifications ignored, batch refused.tools/list=Tiger_Agent_Tools::catalog($role)→ MCP tools (module__service__method, permissiveinputSchema— Form typing is increment 2);tools/callparses the name and runs the op through a dispatch seam, wrapping the/apienvelope as MCP content (isErroronresult=0).modules/mcp—Mcp_ServerController(reads the JSON-RPC body, resolves the Bearer token identity else session — mirroringServiceFactory— and dispatchestools/callviaServiceFactoryas that identity),routes.ini(/mcp, ingested by the module-routes consumer),acl.ini(public controller likeApiController; the token + each service's own ACL do the real gating). Disabled →/mcp404s.Why thin
No new engine or privilege — an MCP tool call is an
/apicall under a different envelope, reusing the built Bearer auth, ACL, tool reflection, and dispatch.Tests + live
Engine unit (lifecycle, name round-trip, envelope wrapping, batch/notification/unknown) + controller integration (404 disabled ·
initializeserverInfo ·tools/listreflects the admin catalog). 831 unit + 1099 integration green. Verified live on tiger-dev over HTTP:404disabled →initializehandshake (serverInfo {name:"Tiger"}) →tools/listreflecting the role surface (docs__search__query, …).🤖 Generated with Claude Code