[codex] Add MCP project management tool#108
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d15ef46 to
47cc584
Compare
Monitoring Plan: MCP Server Tool Registration Refactored into ModulesWhat this PR does: Reorganizes internal MCP server code — moves tool, resource, and prompt registration from a single large file into separate module files. No tools added or removed, no user-visible behavior change intended. Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
25043a6 to
d92b043
Compare
|
MCP tool registration refactor deployed cleanly at 2 minutes post-deploy in Production. Signals (all healthy):
Risks watched (all clean): Module initialization failure, broken tool registration, MCP endpoint errors, profiles resource removal impact Monitoring continues across 72-hour window. |
masnwilliams
left a comment
There was a problem hiding this comment.
reviewed — clean, follows the house pattern, typechecks, and the SDK calls all line up against @onkernel/sdk@0.58.0. import + registration wired correctly. nothing blocking.
nits (optional)
src/lib/mcp/tools/projects.ts:152—error instanceof Error ? error.message : String(error)is actually better thanapps.tswhich just interpolates${error}. worth standardizing the codebase on this helper (see #112 which extractserrorMessage).- no
server.resource("projects", ...)companion likeapps.tshas — not required (other tools omit it too), just noting the asymmetry. register.tsinsertion splitsregisterBrowserCapabilitiesfromregisterBrowserPoolCapabilities— purely cosmetic.
agent-fit
lightweight project CRUD — appropriate for an agent. one cross-cutting suggestion that applies to all the new tools: none set MCP tool annotations (readOnlyHint on list/get, destructiveHint on delete). adding them lets clients auto-run reads and prompt on destructive ops — the standard mechanism GitHub/Stripe-style servers rely on. zero behavior change.
masnwilliams
left a comment
There was a problem hiding this comment.
approving — clean, follows the house pattern, typechecks, SDK calls verified. only optional nits (see prior review), nothing blocking.
Summary
manage_projectsfor Kernel project create/list/get/update/delete workflows.src/lib/mcp/tools/projects.tssoroute.tsstays HTTP/auth-only.Agent Experience / Flow
This PR gives agents a first-class way to discover and select the project boundary before doing resource-scoped work. Projects are the isolation primitive that later tools, especially API-key creation, depend on through
project_id.Typical flow:
manage_projects listto discover existing projects and avoid creating duplicates.queryon list orgetby knownproject_idto resolve the exact target.manage_projects create name=<name>and keeps the returnedproject_idfor downstream tool calls.project_idintomanage_api_keys createfrom the next PR.manage_projects update project_id=<id> name=<new>orstatus=archived.deletefor scratch or explicitly requested projects, because project deletion affects the resource boundary for other workflows.Agent ergonomics:
project_idhandoff to later tools.Validation
git diff --check codex/route-tools-breakdown...HEADKERNEL_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 branch --base codex/route-tools-breakdownhttp://127.0.0.1:3002/mcpwithAPI_BASE_URL=http://127.0.0.1:3001: initialized MCP, verifiedmanage_projectswas listed, created a scratch project, got/updated/listed/deleted it, and confirmed post-delete get failed as expectedNote
Medium Risk
Introduces authenticated create/update/delete against org projects; mistakes or overly broad MCP access could change isolation boundaries, though behavior mirrors existing MCP tool patterns.
Overview
Exposes Kernel project lifecycle over MCP via a new
manage_projectstool (create, list, get, update, delete), including list pagination and archive-by-status on update.Wires it in through
registerProjectCapabilitiesinregister.ts, with implementation isolated inprojects.tsusing the authenticated Kernel client like other MCP tools.Reviewed by Cursor Bugbot for commit 608f5aa. Bugbot is set up for automated code reviews on this repo. Configure here.