The CodeAnt CLI ships an MCP (Model Context Protocol) server that exposes CodeAnt's scan/review/PR data as tools Claude (and any other MCP client) can call directly.
- Entrypoint:
codeant mcp— stdio transport, single subcommand registered in src/index.js. - Server: src/mcp/server.js — uses
@modelcontextprotocol/sdkand registers tools viaserver.registerTool(...). - Bundle: the mcpb/ directory + scripts/build-mcpb.mjs produce a
.mcpbDesktop Extension bundle (dist/codeant.mcpb).
| Name | Read/Write | What it does |
|---|---|---|
codeant_scans_orgs |
read | List authenticated CodeAnt orgs. |
codeant_scans_repos |
read | List repos in an org. |
codeant_scans_history |
read | Recent scan runs for a repo. |
codeant_scans_get |
read | Severity/category summary for one scan. |
codeant_scans_results |
read | Full findings (SAST, SCA, secrets, IaC, …) for one scan. |
codeant_scans_dismissed |
read | Dismissed alerts for a repo. |
codeant_pr_list |
read | List PRs/MRs across GitHub, GitLab, Bitbucket, Azure DevOps. |
codeant_pr_get |
read | Detail for a PR/MR. |
codeant_pr_comments |
read | Comments on a PR, filtered. |
codeant_comments_search |
read | Free-text search across CodeAnt review comments. |
codeant_review_local |
read | Run a CodeAnt review on local working-copy changes. |
codeant_scans_start |
write | Trigger a new scan. Gated. |
codeant_pr_resolve |
write | Resolve a PR conversation thread. Gated. |
Write tools are only registered when CODEANT_READ_ONLY=0. Default = read-only.
Every tool carries MCP annotations (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so the client can decide whether to auto-approve calls.
| Var | Purpose | Default |
|---|---|---|
CODEANT_API_TOKEN |
API token (CodeAnt account → settings → API). Required. | — |
CODEANT_API_URL |
API base URL. Override for self-hosted. | https://api.codeant.ai |
CODEANT_READ_ONLY |
1 to hide write tools, 0 to expose them. |
1 |
The CLI also reads these from ~/.codeant/config.json when not set in env. For MCP usage prefer env — it keeps per-client config explicit.
claude mcp add codeant -s user -e CODEANT_READ_ONLY=1 -- codeant mcp-s user puts it in your user-scope config so it works in every project. Use -s project to scope it to one repo (writes a .mcp.json at the repo root).
For a single project, you can instead drop this .mcp.json next to the project root:
{
"mcpServers": {
"codeant": {
"command": "codeant",
"args": ["mcp"],
"env": { "CODEANT_READ_ONLY": "1" }
}
}
}Verify with /mcp inside a Claude Code session.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on Windows and add a codeant block:
{
"mcpServers": {
"codeant": {
"command": "codeant",
"args": ["mcp"],
"env": { "CODEANT_READ_ONLY": "1" }
}
}
}Requires the codeant CLI to be on the desktop app's PATH. If you hit "command not found" in ~/Library/Logs/Claude/mcp-server-codeant.log, swap "command": "codeant" for "command": "node" with "args": ["<absolute-path-to>/codeant-cli/src/index.js", "mcp"].
Quit Claude Desktop (Cmd-Q — not just close the window) and relaunch. The server appears under Settings → Connectors.
The MCPB bundle is the only path that does not assume the user has the CodeAnt CLI installed — it ships everything in the bundle. This is what we submit to the Anthropic directory.
npm run mcpb:build
open -a Claude dist/codeant.mcpbClaude pops an install dialog asking for the user_config fields:
- CodeAnt API token (sensitive, required)
- API base URL (defaults to
https://api.codeant.ai) - Read-only mode (defaults to on)
After install, manage it in Settings → Connectors.
If you also have a manual claude_desktop_config.json entry from path B, you'll see codeant listed twice — remove one to avoid duplicate tool listings.
codeant.mcpb (zip)
├── manifest.json # from mcpb/manifest.json, version pinned to package.json
├── icon.png # 256×256, from mcpb/icon.png
├── server/
│ └── index.js # thin entry wrapper, calls startMcpServer()
├── src/ # the entire CLI source tree
├── node_modules/ # production deps only (npm install --omit=dev)
└── package.json # trimmed: only name/version/type/dependencies
The bundle is self-contained — Claude Desktop ships its own Node runtime, so no global install is required on the user's machine.
npm run mcpb:buildUnder the hood this runs scripts/build-mcpb.mjs:
- Clean
dist/mcpb-stage/anddist/codeant.mcpb. - Copy
src/andmcpb/server/into the staging dir. - Write a trimmed
package.jsoncontaining only production deps. - Run
npm install --omit=devinside the staging dir. - Copy
mcpb/manifest.json(withversionoverridden from the rootpackage.json) andmcpb/icon.png. - Zip the staging dir as
dist/codeant.mcpb.
Result is typically ~11 MB. Verify the bundled server speaks MCP:
cd dist/mcpb-stage
(printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}'; sleep 1) | node server/index.jsExpect 11 tools in the tools/list response (or 13 if CODEANT_READ_ONLY=0).
Edit version in package.json. The build script pins the manifest's version field from there, so you do not need to touch mcpb/manifest.json for normal bumps.
mcpb/icon.png should be a 256×256 PNG. The current one was rasterized from ../vscode-build/assets/Logo.svg via qlmanage. To regenerate from a new SVG:
qlmanage -t -s 256 -o /tmp /path/to/Logo.svg
cp /tmp/Logo.svg.png mcpb/icon.png
npm run mcpb:buildCodeAnt's MCP server uses stdio + a packaged bundle, so the submission route is Desktop Extensions (MCPB), not the remote-connector form.
- Submission URL: https://claude.com/docs/connectors/building/submission
- Bundle: upload
dist/codeant.mcpb - Required metadata: already in mcpb/manifest.json — display name, description, author, homepage, documentation, repository, license, keywords,
privacy_policies,toolsstatic listing,user_configschema. - Privacy policy. Linked from both README.md and the manifest's
privacy_policiesfield (https://codeant.ai/privacy).
Reviewer notes worth preparing:
- Auth model. CodeAnt uses a user-scoped API token entered into
user_config.api_token. The token never leaves the user's machine — the bundle talks toapi.codeant.ai(or the user's self-hosted URL) directly. No third-party OAuth flow needed. - Sandbox creds. Email support@codeant.ai for a reviewer sandbox token; paste it into the submission form's reviewer-notes field along with an org slug that has scans + PRs to browse.
- Write tools. Gated behind
user_config.read_only(defaults to on). Reviewers can toggle off to testcodeant_scans_start/codeant_pr_resolve.
| Symptom | Where to look |
|---|---|
| Server fails to start in Claude Desktop | ~/Library/Logs/Claude/mcp-server-codeant.log |
| Tool calls return errors | Same log — server stderr is captured there. |
| Tool not listed at all | Check CODEANT_READ_ONLY — write tools are hidden when set to 1. |
| Auth errors on every tool | Confirm CODEANT_API_TOKEN is set in the MCP env (not just in ~/.codeant/config.json). |
| MCPB install dialog never appears | Open .mcpb with open -a Claude dist/codeant.mcpb to force the desktop app to handle it. |