Skip to content

feat: add hosted Cap MCP connector - #2332

Merged
richiemcilroy merged 6 commits into
mainfrom
feature/hosted-cap-mcp
Sep 22, 2026
Merged

richiemcilroy merged 6 commits into
mainfrom
feature/hosted-cap-mcp

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a hosted Streamable HTTP MCP endpoint with three bounded, read-only recording tools and an optional in-chat recording card.
  • Add separate OAuth discovery, dynamic client registration, PKCE consent, scoped credentials, refresh rotation, revocation, quota, and cleanup. Existing CLI OAuth and local MCP paths are unchanged.
  • Add generated database migrations, a recording list index, and connector setup docs.

Validation

  • MCP protocol, OAuth, data, and existing agent API unit suites: 45 tests passed on the current head.
  • CLI MCP protocol and cancellation tests: 2 passed.
  • Scoped Biome, route type generation, the workspace TypeScript build, and git diff --check passed in an isolated worktree.
  • Generated migration journal/snapshot chain and SQL structure verified; the MCP card bundle matches its TypeScript source.

Protocol boundary

The hosted MCP and OAuth routes use Effect HttpApi builders with a lightweight adapter that preserves the SDK response stream and each route's bounded request handling. The shared app handler initializes unrelated backend services and applies Cap-only CORS, so the connector uses its own Effect adapter for external hosts. Existing CLI, local MCP, and agent API handlers remain unchanged.

Rollout notes

  • Apply migrations 0046 through 0048 before enabling the hosted connector. Configure the rl_mcp_client_registration Vercel Firewall rule as an additional public-traffic control.
  • Live connection in ChatGPT, Claude, and Muse requires host-side setup after deployment; the protocol is covered by request-level tests, and Muse directory availability has not been verified.
  • The repository's db:check and db:check-integrity scripts currently fail because of their existing command/path configuration; migration integrity was checked directly. Full app typecheck in the shared local checkout is blocked by unrelated dirty files and stale generated declarations. The PR's fresh CI typecheck and security scan passed on the latest head; desktop matrix jobs are still running.

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the latest route-export correction introduces no new actionable issue.

Summary

Adds a hosted, read-only MCP connector for Cap recordings.

  • Implements OAuth discovery, dynamic client registration, PKCE authorization, scoped token issuance, refresh rotation, and revocation.
  • Adds bounded MCP tools for listing recordings and reading recording details, summaries, and transcript cues.
  • Adds credential cleanup, registration quotas, generated database migrations, connector documentation, tests, and MCP card drift checking.
  • The latest change preserves the protected-resource route’s Node.js runtime through a local export.

Reviews (5) · Last reviewed commit: "fix: declare MCP discovery runtime local..."

@socket-security

socket-security Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​modelcontextprotocol/​server@​2.0.01001008592100
Addednpm/​@​modelcontextprotocol/​ext-apps@​2.0.09910010097100

View full report

Comment thread apps/web/scripts/build-mcp-card.mjs Resolved
@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superagent found 1 security concern(s).

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy

Copy link
Copy Markdown
Member Author

hey @greptileai, please re-review the PR

@richiemcilroy
richiemcilroy merged commit ce004e9 into main Sep 22, 2026
27 of 31 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8a0cd167 Deployed Sep 22, 2026 by vercel[bot]
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