compcode-mcp
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@compcode-mcpSimulate commissions for the new plan I drafted."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@compcode/mcp
The official CompCode MCP server — commission plans as code, as native tools for Claude Code, Cursor, and any Model Context Protocol client.
CompCode is the first commission platform where plans are created, modified, and versioned via API. This server exposes the full plan lifecycle as MCP tools: author plans, assign reps, set quotas, simulate, recalculate, close the month, and export payroll — all from your agent.
Install
You need a CompCode workspace API key (ws_…) from Workspace settings → Integrations → API key.
Claude Code
claude mcp add compcode -e COMPCODE_API_KEY=ws_your_key -- npx -y @compcode/mcpCursor / generic mcp.json
{
"mcpServers": {
"compcode": {
"command": "npx",
"args": ["-y", "@compcode/mcp"],
"env": { "COMPCODE_API_KEY": "ws_your_key" }
}
}
}Environment variables
Variable | Required | Default | Purpose |
| yes* | — | Workspace API key ( |
| no |
| Point at another environment. |
* Falls back to ~/.compcode/config.json — shared with the CompCode CLI, so compcode login <ws_…> also configures this server.
Related MCP server: sahmk-mcp
Tools (29)
The same canonical tool contract is also served by CompCode's remote MCP endpoint (POST https://api.compcode.ai/v1/mcp, Streamable HTTP with your ws_… key as a Bearer token) — pick the transport that fits your client.
Plans — list_plans, get_plan (+history, +per-rep overrides), list_plan_templates (8 canonical starters), get_plan_schema (canonical config JSON Schema, no network), create_plan, update_plan (versioned — config changes create a new version), set_rep_overrides
Quotas & assignments — list_quotas, set_quota, delete_quota, list_assignments, assign_plan, unassign_plan
Commissions — simulate_plan (dry run against real deals; per-rep and per-period narrowing), get_commissions_dashboard (team / rep / per-deal trace), recalculate_commissions (rep/plan/workspace scopes run as a background job — a slow recalc returns { status: "running", jobId } instead of timing out), get_recalculation_status
Statements — list_statements, generate_statements, approve_statement (lock/unlock), export_statements (payroll CSV / JSON), add_statement_adjustment, remove_statement_adjustment (confirm-gated)
Discovery — list_deals, list_reps (email search), sync_reps_from_crm, list_fields (CRM field slugs + options), get_workspace, get_audit_log
Plus resources (compcode://schema/plan-config, compcode://templates, compcode://guide) and prompts for the five standard operator flows: connection check, plan authoring, rep onboarding, month close, and commission diagnosis.
Safety model
Plan config validation is client-side first.
create_plan/update_plan/simulate_planvalidate configs against the canonical schema before any network call, returning precise field-level errors.Simulate before you write. Tool descriptions steer agents to
simulate_planbeforecreate_plan. Simulation is advisory — it can diverge from the live engine and ignores per-rep overrides.Destructive ops are annotated.
approve_statement,unassign_plan,set_rep_overrides, andrecalculate_commissionscarrydestructiveHintso clients can require confirmation.Deliberately not exposed: plan deletion, workspace data reset, deal deletion, API-key regeneration, statement adjustments. Use the dashboard or raw API for those.
Rate-limited writes never auto-retry. A 429 on a write returns wait guidance instead of retrying, so an agent can't double-write.
Troubleshooting
Symptom | Fix |
|
|
| Set |
| Workspace tier limits: 120–1200 req/60s; |
Wrong environment | Set |
Development
pnpm --filter @compcode/mcp build # tsc → dist/
pnpm --filter @compcode/mcp test # vitest (85 tests, no network)
pnpm --filter @compcode/mcp dev # tsx src/index.ts
# Poke it interactively
npx @modelcontextprotocol/inspector node apps/mcp/dist/index.jsArchitecture: src/server.ts + src/tools/* are transport-agnostic and depend only on the CompCodeClient interface — the stdio shell lives entirely in src/index.ts, so the same tool layer can be mounted as a remote streamable-HTTP endpoint later.
Source of truth for this package is the private monorepo (apps/mcp); github.com/compcode-ai/mcp is a public mirror. To re-sync after a change here lands on develop:
git subtree split --prefix=apps/mcp -b mcp-mirror
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f --env-filter '
export GIT_AUTHOR_NAME="tech-compcode-ai" GIT_AUTHOR_EMAIL="tech@compcode.ai"
export GIT_COMMITTER_NAME="tech-compcode-ai" GIT_COMMITTER_EMAIL="tech@compcode.ai"
' mcp-mirror
git push https://github.com/compcode-ai/mcp.git mcp-mirror:main
git branch -D mcp-mirrorRun the rewrite every time, not just the first. The monorepo's own commits
carry individual authors; the public mirror publishes under one project
identity. subtree split regenerates the whole branch from monorepo history on
each sync, so a sync that skips the rewrite would reintroduce the original
authors and fork the hash chain — every later push would then need --force.
Applied consistently the rewrite is deterministic (same trees, same dates, same
author ⇒ same SHAs), so syncs stay plain fast-forwards.
The mirror carries apps/mcp and nothing above it, so the root
mcp-tools.contract.json is absent there and the two cross-transport
assertions in server.smoke.test.ts skip. That is expected: the contract binds
this package to apps/api/src/mcp, and both are only checkable together — here,
via the pre-push hook.
Links
Agent guide: https://compcode.ai/CLAUDE.md
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for managing affiliate and referral programs. Track referrals, manage affiliates, process conversions, and handle payouts through AI assistants like Claude, Cursor, and ChatGPT.18352MIT
- AlicenseAqualityAmaintenanceOfficial MCP server for interacting with Saudi market data (Sahmk) via natural language queries, enabling stock quotes, company info, and market summaries inside AI agents like Cursor and Claude Desktop.1511MIT
- AlicenseAqualityBmaintenanceOfficial MCP server for Scorezilla (leaderboards for games). Your AI coding assistant can bootstrap a leaderboard, inspect games and boards, read top-N standings, and paste ready-to-run SDK integration code — without leaving the editor.6821MIT
- Alicense-qualityCmaintenancePublic MCP server for integrating Cuprice pricing widgets from AI tools like Cursor, Claude Desktop, and Claude Code.1MIT
Related MCP Connectors
Official MCP server for OmniDimension. Drive voice agents, dispatch calls, and run bulk campaigns.
Official Miro MCP server - Supports context to code and creating diagrams, docs, and data tables.
Official MCP server for Lovable, the AI-powered full-stack app builder.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/compcode-ai/mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server