Skip to content

MCP increment 3: stdio bridge + admin Connect screen - #140

Merged
WebTigers merged 1 commit into
mainfrom
feat/mcp-bridge-connect
Aug 17, 2026
Merged

MCP increment 3: stdio bridge + admin Connect screen#140
WebTigers merged 1 commit into
mainfrom
feat/mcp-bridge-connect

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

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 /mcp with 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).
  • The Connect screen (/mcp/admin, nav-registered under Settings, admin-gated):
    • Enable toggleMcp_Service_Settings writes tiger.mcp.enabled.
    • Tokens — mint / list / revoke, reusing the core Tiger_Service_Token over /api (plaintext shown once, copy).
    • Ready-to-paste mcpServers config for both npx 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, /mcp server still responds.

🤖 Generated with Claude Code

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>
@WebTigers
WebTigers merged commit 7797232 into main Aug 17, 2026
13 checks passed
@WebTigers
WebTigers deleted the feat/mcp-bridge-connect branch August 17, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant