SIGN IN SIGN UP

MCP connectors v1: admin-registered HTTP (#481)

servers with tools injected across harnesses Adds generic MCP (Model Context Protocol) support. A JSON-RPC 2.0 HTTP client accepts plain-JSON and SSE-framed responses with none, bearer, or OAuth2 client-credentials auth; a durable registry stores admin-registered servers; and a tool service caches tools/list snapshots (refreshing on registry change and on an interval), namespaces tools as serverId_toolName, audits each call, and clamps result size. All harnesses receive MCP tools in the shared tool set, results pass through the external-content screen like any untrusted tool output, and read-only contexts keep only read-only servers' tools. An org-admin-only API registers servers with URL validation, secret redaction on read, and a live tools/list probe before save. Deliberately out of scope: stdio transport, MCP resources/prompts, and user-supplied endpoints (SSRF surface); per-user OAuth is left for a follow-up.

**Deployment notes**

New DurableMap mcp_servers via the existing artifactMap pattern — created idempotently at
boot, no migration.
Entirely opt-in: no tools injected until an admin registers a server via the new /v1/admin/mcp-
servers routes; no new env vars or secrets required at upgrade.
Server auth secrets (bearer/client-credentials) are stored in the durable map, i.e. plaintext in
Postgres, redacted only at the API — same posture as other stored config, but worth a line in docs
for orgs with stricter secret handling.
Blue-green: old instances ignore the table and inject no MCP tools during overlap — sessions
differ in toolset across instances for the deploy window, which the tool-schema path already
tolerates (toolsets vary per turn).

<!-- codesmith:footer -->
---
<a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/481"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789249139&installation_model_id=19911&pr_number=481&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F481&signature=54e46803785bd8adba41e9ef32817c4976964e76af093889d44dffdaabde917b"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
R
Regan Bell committed
add5f87b7cfc73bf4f7643c1a9f6514ddbb5e84d
Parent: 73d793b
Committed by GitHub <noreply@github.com> on 8/13/2026, 9:52:12 PM