[codex] Break down MCP route registrations#107
Open
IlyaasK wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d15ef46 to
47cc584
Compare
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: PR is in the To monitor this PR anyway, reply with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/app/[transport]/route.tsintosrc/lib/mcpmodules grouped by workflow.registerMcpCapabilities(server)call.Validation
git diff --checkKERNEL_CLI_PROD_CLIENT_ID=dummy-prod KERNEL_CLI_STAGING_CLIENT_ID=dummy-staging KERNEL_CLI_DEV_CLIENT_ID=dummy-dev NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_Y2xlcmsuZXhhbXBsZS5jb20k bun run buildpython3 /Users/ilyaas/.codex/skills/autoreview/scripts/autoreview --mode localhttp://127.0.0.1:3002/mcpwithAPI_BASE_URL=http://127.0.0.1:3001: initialized MCP, verifiedtools/list,resources/list, andprompts/listreturned the expected registered surface (10 tools, 4 resources, 2 prompts)Note
Low Risk
Large file move with intended behavior parity; main risk is subtle registration-order or copy-paste drift during the split, not auth or API contract changes.
Overview
Refactors the MCP transport route so it no longer owns thousands of lines of tool, resource, and prompt registration. The handler now calls
registerMcpCapabilities(server)after auth wiring, keepingOPTIONS, Clerk/API-key auth, andwithMcpAuthin the route.New
src/lib/mcplayout: a sharedcreateKernelClienthelper (kernel-client.ts), a centralregister.tsthat wires domain modules,prompts.tsfor concept/debug prompts, andtools/*files (browsers, profiles, pools, proxies, extensions, apps, docs, computer actions, shell exec, Playwright). Logic is largely moved, not rewritten—same MCP surface, easier to maintain and extend.Reviewed by Cursor Bugbot for commit 629b37c. Bugbot is set up for automated code reviews on this repo. Configure here.