MCP increment 3: stdio bridge + admin Connect screen - #140
Merged
Conversation
Makes the MCP server one-click to connect (TIGERMCP.md §11 step 3). - bin/mcp-bridge.php — a ZERO-Node PHP stdio<->HTTP relay. MCP clients (Claude Desktop/Code, Cursor) launch it; it POSTs each stdin JSON-RPC line to the install's /mcp with a Bearer token and writes the response back. Config via env (TIGER_MCP_URL / TIGER_MCP_TOKEN or argv). Guards the stdout channel (only JSON-RPC out; notifications relay nothing; a transport failure / non-JSON becomes a JSON-RPC error with the request id). curl with a stream fallback; sends a User-Agent (WAF). - modules/mcp Connect screen — Mcp_AdminController (/mcp/admin, nav-registered under Settings), Mcp_Service_Settings (enable toggle → tiger.mcp.enabled), the view (enable switch; mint/list/revoke tokens reusing the core Tiger_Service_Token over /api; ready-to-paste mcpServers config for npx mcp-remote AND the PHP bridge, with a token field that rebuilds the config live; a download action serving the bridge). - Tests: bridge decision logic (relay / notification / transport-error / non-JSON / disabled-404) unit; the enable service (write flag + admin gate) and the Connect controller (view vars + bridge download) integration. Deployed + smoke-tested on dev. 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 3 of TigerMCP (§11): make the MCP server one-click to connect.
Ships
bin/mcp-bridge.php— a zero-Node PHP stdio↔HTTP relay. An MCP client (Claude Desktop/Code, Cursor) launches it; it POSTs each stdin JSON-RPC line to the install's/mcpwith a Bearer token and writes the response back. Config via env (TIGER_MCP_URL/TIGER_MCP_TOKEN) or argv. Guards the stdout protocol channel — only JSON-RPC out, notifications relay nothing, a transport failure / non-JSON response becomes a JSON-RPC error carrying the request id (so a client never hangs). curl with a stream fallback; sends a User-Agent (WAF-safe)./mcp/admin, nav-registered under Settings, admin-gated):Mcp_Service_Settingswritestiger.mcp.enabled.Tiger_Service_Tokenover/api(plaintext shown once, copy).mcpServersconfig for bothnpx mcp-remote(no install) and the PHP bridge (zero-Node), with a token field that rebuilds the config live, a download action serving the bridge, and a curl test snippet.Tests + live
Bridge decision logic (relay / notification / transport-error / non-JSON-guard / disabled-404) unit; enable service (writes flag, admin-gated) + Connect controller (view vars, bridge download) integration. 837 unit + 1104 integration green. Deployed to tiger-dev: Connect screen loads (admin-gated), download wired, nav didn't fatal,
/mcpserver still responds.🤖 Generated with Claude Code