Repository navigation
chore/remove mcp gateway code - #8156
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the full 124-file, 187-addition/18,735-deletion MCP Gateway removal against current HEAD Files Reviewed (124 files)
Previous Review Summary (commit 52d09ec)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 52d09ec)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the 124-file MCP Gateway removal (18,735 deletions, 309 additions); the retained direct-DB anonymization/revocation helpers preserve prior behavior, the relocated IP policy is a 100% rename, and no dangling references to the removed package, worker, routes, or tRPC routers remain. Files Reviewed (124 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 78.9K · Output: 17.9K · Cached: 2.4M Review guidance: REVIEW.md from base branch |
52d09ec to
b510efc
Compare
Summary
Removes the user-facing MCP Gateway feature end to end. This is the gateway that let users register external MCP servers and proxied/OAuth-authenticated them; it does not touch
kilo-mcp/.kilo/skills/kilo-mcp.Removed:
services/mcp-gateway, itsMCPGatewayInstanceDurable Object, Hyperdrive binding, Analytics Engine binding, and cron cleanup..well-knownmetadata, and connect-token routes.packages/mcp-gateway; the reusable public-IP policy helpers moved topackages/web-shared/src/lib/ai-gateway/providers/ip-address.tsfor the AI gateway SSRF policy..specs/mcp-gateway-auth.md, nav entries, admin audit action, KiloClaw integration guidance, and MCP catalog/skill entries.Stack:
Temporary cleanup retained
This PR keeps
apps/web/src/lib/mcp-gateway/blocking-service.tsandlifecycle-service.tsas small direct-DB helpers until #8157 drops the tables. This preserves account anonymization and block/refund grant revocation during the window between the two deploys. #8157 removes both helpers and their call sites.Verification
Automated checks run:
scripts/typecheck-all.sh --changes-onlytsgo --noEmit -p apps/web/tsconfig.jsonpnpm --filter @kilocode/storybook run typecheckpnpm --filter web test -- src/lib/user/index.test.ts(166 tests)pnpm --filter web test -- src/lib/admin/admin-action-audit.test.ts(31 tests)pnpm --filter web test -- ../../packages/web-shared/src/lib/ai-gateway/providers/ip-address.test.ts(31 tests)pnpm --filter kilo-mcp test(456 tests)oxlintforwebandkilo-mcppnpm format:changedandgit diff --checkVisual Changes
The MCP Gateway sidebar entries are removed. No replacement UI.
N/A
Reviewer Notes
Manual Cloudflare cleanup
The worker is auto-deployed from its workspace directory, so deleting it from the repo removes it from the CI matrix. The following Cloudflare resources still need manual cleanup in account
e115e769bcdd4c3d66af59d3332cb394:mcp-gateway; also delete themcp-gateway-devdev worker if it exists.mcp.kilosessions.aion zonekilosessions.ai. Remove the custom domain and its DNS record if Cloudflare does not remove them with the worker.MCPGatewayInstance(bindingMCP_GATEWAY_INSTANCE).624ec80650dd414199349f4e217ddb10(bindingHYPERDRIVE).mcp_gateway_events(bindingMCP_GATEWAY_ANALYTICS).0 3 * * *(deleted with the worker).MCP_GATEWAY_JWT_PUBLIC_KEYSET_JSON,MCP_GATEWAY_CREDENTIAL_KEYSET_JSON,MCP_GATEWAY_RATE_LIMIT_SECRET.ENVIRONMENT,APP_BASE_URL,MCP_GATEWAY_BASE_URL,SUPPORTED_SCOPES,GATEWAY_ACCESS_TOKEN_TTL_SECONDS,AUDIT_RETENTION_DAYS,UPSTREAM_REQUIRE_HTTPS,MCP_GATEWAY_JWT_ISSUER.No KV, D1, R2, or Queue bindings are declared.
Vercel cleanup
Remove these app-side env vars from deployment environments:
MCP_GATEWAY_BASE_URLMCP_GATEWAY_APP_BASE_URLMCP_GATEWAY_JWT_PRIVATE_KEYSET_JSONMCP_GATEWAY_CREDENTIAL_KEYSET_JSONMCP_GATEWAY_RATE_LIMIT_SECRETMCP_GATEWAY_ACCESS_TOKEN_TTL_SECONDSThese contain key material and should be deleted, not just unset.
Existing OAuth clients
Client registrations and grants are stored in the tables dropped by #8157. External MCP clients pointed at
mcp.kilosessions.aiwill stop working when the worker and custom domain are removed.