Skip to content

fix(C6): remove MCP aggregator; slim connect.chitty.cc/mcp (closes #190)#196

Open
chitcommit wants to merge 1 commit into
mainfrom
fix/remove-mcp-aggregator-190
Open

fix(C6): remove MCP aggregator; slim connect.chitty.cc/mcp (closes #190)#196
chitcommit wants to merge 1 commit into
mainfrom
fix/remove-mcp-aggregator-190

Conversation

@chitcommit

Copy link
Copy Markdown
Contributor

Summary

  • Removes the mcp.chitty.cc aggregator handler + route from this worker
  • connect.chitty.cc/mcp becomes the slim per-service MCP with no auth (upstream aggregator gateway authenticates and proxies in)
  • Updates stale OAuthProvider comment

Closes #190.

Topology

  • mcp.chitty.cc = standalone aggregator service (NOT this worker) — to claim hostname separately
  • connect.chitty.cc/mcp = ChittyConnect's own MCP exposing connect-specific tools, no auth at this layer

Outage window

mcp.chitty.cc returns 404 until the standalone aggregator deploys.

Test plan

  • Deploy to staging, verify connect.chitty.cc/mcp JSON-RPC works without auth
  • Confirm mcp.chitty.cc/* route no longer claimed by this worker
  • Standalone aggregator service ready to claim mcp.chitty.cc

🤖 Generated with Claude Code

…p without auth

Closes #190.

- src/index.js: replace mcp.chitty.cc/mcp handler with connect.chitty.cc/mcp,
  no auth (upstream aggregator gateway authenticates and proxies in)
- wrangler.jsonc: drop mcp.chitty.cc/* route from this worker
- update stale OAuthProvider comment to reflect new topology

The standalone mcp.chitty.cc aggregator service will claim that hostname
separately. Outage window: mcp.chitty.cc returns 404 until standalone deploys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 22, 2026 06:56
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@chitcommit has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 25 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e10c6131-2e12-47ec-abdf-2e2dcd2b655c

📥 Commits

Reviewing files that changed from the base of the PR and between 973b4d9 and 815e478.

📒 Files selected for processing (2)
  • src/index.js
  • wrangler.jsonc
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remove-mcp-aggregator-190

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
chittyconnect 815e478 May 22 2026, 06:56 AM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the mcp.chitty.cc route/handler from the ChittyConnect worker and makes connect.chitty.cc/mcp the primary JSON-RPC MCP entrypoint served directly by the McpConnectAgent Durable Object.

Changes:

  • Removed mcp.chitty.cc/* from the production Cloudflare Worker routes so this worker no longer claims that hostname.
  • Switched the /mcp JSON-RPC handler gate from mcp.chitty.cc to connect.chitty.cc and updated related inline comments/log message.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
wrangler.jsonc Removes the mcp.chitty.cc/* production route so the worker only serves connect.chitty.cc/*.
src/index.js Routes connect.chitty.cc/mcp to the MCP DO handler and updates OAuth/MCP documentation comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.js
// (standalone mcp.chitty.cc service) authenticates and proxies in.
if (host === "connect.chitty.cc" && url.pathname === "/mcp") {
try {
return mcpAgentHandler.fetch(request, env, ctx);
Comment thread src/index.js
Comment on lines +2298 to 2303
// connect.chitty.cc/mcp — ChittyConnect's own slim MCP exposing only
// connect-specific tools. No auth: the upstream aggregator gateway
// (standalone mcp.chitty.cc service) authenticates and proxies in.
if (host === "connect.chitty.cc" && url.pathname === "/mcp") {
try {
return mcpAgentHandler.fetch(request, env, ctx);
Comment thread src/index.js
// connect.chitty.cc/mcp — ChittyConnect's own slim MCP exposing only
// connect-specific tools. No auth: the upstream aggregator gateway
// (standalone mcp.chitty.cc service) authenticates and proxies in.
if (host === "connect.chitty.cc" && url.pathname === "/mcp") {
Comment thread wrangler.jsonc
Comment on lines 316 to 318
"routes": [
{ "pattern": "connect.chitty.cc/*", "zone_name": "chitty.cc" },
{ "pattern": "mcp.chitty.cc/*", "zone_name": "chitty.cc" }
{ "pattern": "connect.chitty.cc/*", "zone_name": "chitty.cc" }
],
@chitcommit

Copy link
Copy Markdown
Contributor Author

⚠️ BLOCK — verified: this exposes connect.chitty.cc/mcp unauthenticated to the internet

The diff removes worker auth on connect.chitty.cc/mcp with the rationale "No auth: the upstream aggregator gateway (standalone mcp.chitty.cc service) authenticates and proxies in." That assumption does not hold against live state:

  1. Live probe: POST https://connect.chitty.cc/mcp returns HTTP 404 from the worker (CORS headers present) — NOT a Cloudflare Access challenge (302/403). An Access-fronted path returns the Access gate even for unknown routes.
  2. Cloudflare Access API (account ChittyCorp): the only Access app on connect.chitty.cc is connect.chitty.cc/secrets-portal. There is no Access app covering connect.chitty.cc/mcp (full app list checked — 70 apps).

So connect.chitty.cc/mcp is a public-DNS route with nothing restricting it to the aggregator. After this merges + deploys, any internet client can POST to it and call ChittyConnect's slim MCP tools unauthenticated. There is no network boundary enforcing 'only the gateway proxies in.'

Required before merge — pick one:

  • (a) Worker-side auth gate on connect.chitty.cc/mcp: validate the gateway's service token (e.g. CHITTYCONNECT_SERVICE_TOKEN / Cf-Access-Jwt-Assertion) before dispatching to the MCP agent; OR
  • (b) A CF Access self-hosted app on connect.chitty.cc/mcp scoped to the aggregator (service-token / mTLS); OR
  • (c) Drop the public route entirely and have the aggregator reach the slim MCP via a Cloudflare service binding (no public DNS), which is the real 'proxies in' model.

(a) or (c) are the durable fixes. Until one is in place, this is a live unauthenticated-exposure of the MCP tool surface.

@chitcommit

Copy link
Copy Markdown
Contributor Author

Resolution direction: the exposure here is to be closed via linked app authconnect.chitty.cc/mcp gets its OAuth from the CF-managed MCP Portal (Model B), not a standalone worker auth gate or a separate service-token Access app. This aligns with the MCP Portal projection work (#248).

Verified live state (for the record): connect.chitty.cc/mcp currently returns 404 (route not deployed) and has no Access app fronting it — only mcp.chitty.cc is auth-protected (401). So:

  • No live exposure today (route 404s until this ships).
  • This PR must NOT merge as a bare unauthenticated route. Gate: the portal linked-app auth on connect.chitty.cc/mcp must be in place first, then this route can ship behind it.

Holding #196 pending the portal-link wiring rather than building a parallel service-token Access app.

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.

fix: connect.chitty.cc/mcp returns 404 — JSON-RPC handler not mounted on connect host

2 participants