[codex] add Go MCP server mode - #65
Conversation
Zero automated PR reviewVerdict: No blockers found Blockers
Validation
ScopeHead: This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
WalkthroughThis PR introduces a new ChangesMCP Server Integration via CLI Serve Command
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Looks Good I reviewed the Go MCP server mode end-to-end. The new Validation I ran on head
I also smoke-tested the built
GitHub checks are green, including ubuntu/macos/windows Smoke, Performance Smoke, Zero Review, and CodeRabbit. No blockers from me. |
Vasanthdev2004
left a comment
There was a problem hiding this comment.
Looks Good
I reviewed the Go MCP server mode end-to-end. The new zero serve --mcp command exposes a narrow read-only tool registry by default, keeps write/shell tools behind the explicit --allow-unsafe-tools opt-in, and routes MCP tools/call execution through Registry.RunWithOptions so the existing permission metadata is enforced rather than bypassed. The MCP server implementation handles stdio framing, initialize, notifications, tool listing, tool calls, unknown-method errors, and schema conversion with focused Go coverage.
Validation I ran on head a6e82a9971a67311998aa2eb446f6876deac8129:
bun install --frozen-lockfilebun run typecheckbun test ./tests --timeout 15000— 291 pass / 0 failbun run buildbun run smoke:buildbun run smoke:gogo test ./internal/cli ./internal/mcp ./internal/toolsgo test -count=1 ./...git diff --check origin/main..HEAD
I also smoke-tested the built zero.exe serve --mcp path directly over MCP stdio framing:
- default mode listed only
glob,grep,list_directory, andread_file - default mode did not expose
write_fileand returned an error for awrite_filecall --allow-unsafe-toolsexposedwrite_fileand emitted the unsafe-tools warning on stderrzero serve --helpdocuments--mcp,--cwd, and--allow-unsafe-tools
GitHub checks are green, including ubuntu/macos/windows Smoke, Performance Smoke, Zero Review, and CodeRabbit.
No blockers from me.
Summary
zero serve --mcpinto the CLI with read-only tools exposed by default and an explicit--allow-unsafe-toolsopt-in for write/shell tools.Reviewers: @Vasanthdev2004 @anandh8x
Validation
go test -count=1 ./...npx --yes bun run typechecknpx --yes bun test ./tests --timeout 15000npx --yes bun run buildnpx --yes bun run smoke:build./zero --help./zero serve --help./zero serve --mcp, confirming only read-only tools are listed by defaultgit diff --check origin/main..HEADSummary by CodeRabbit
zero serve --mcpcommand to expose Zero's read-only tools over MCP (Model Context Protocol) stdio, enabling integration with MCP clients.--allow-unsafe-toolsflag to enable write operations through MCP.-C/--cwdoption to specify the workspace directory.