Claude Code & Cursor — carbon via MCP
Public URLs use /mcp and /v1/session (rewritten to /api/mcp and /api/v1/session on this site). Use your existing isv_live_sk_ / isv_test_sk_ key. Estimates use the same token × coefficient model as production /v1/track (illustrative; not a watt-meter).
GET https://carbon-llm.com/mcp/manifest — tool manifest (no auth)
POST https://carbon-llm.com/api/mcp — Authorization: Bearer isv_…
GET https://carbon-llm.com/api/v1/session/<developer_id>/today — today's aggregates (URL-encode emails)
{
"tool": "track_carbon",
"input": {
"prompt_tokens": 1200,
"completion_tokens": 400,
"model": "claude-3-5-sonnet-20241022",
"session_id": "2026-03-30-my-repo",
"developer_id": "you@company.com"
}
}session_id and developer_id default if omitted (see API behaviour).
// ~/.claude/config.json (example — field names depend on Claude Code version)
{
"mcpServers": {
"carbon-llm": {
"url": "https://carbon-llm.com/mcp",
"headers": {
"Authorization": "Bearer isv_live_sk_…"
}
}
}
}carbon-llm) is local-only; the service is carbon-llm.// .cursor/mcp.json (illustrative — verify path with Cursor docs)
{
"mcpServers": {
"carbon-llm": {
"url": "https://carbon-llm.com/mcp",
"headers": {
"Authorization": "Bearer isv_test_sk_…"
}
}
}
}NEXT_PUBLIC_APP_URL (production host).Manifest (no auth): open https://carbon-llm.com/mcp/manifest in a browser or curl -sS https://carbon-llm.com/mcp/manifest.
POST with Bearer: see README for a minimal curl to https://carbon-llm.com/api/mcp.
Public path /mcp rewrites to /api/mcp — both refer to the same handler.
401 / invalid key: use a key from Dashboard → API keys; test and live keys both work for MCP — prefix isv_test_sk_ or isv_live_sk_.
Wrong host: MCP URL must match your deployed carbon-llm origin (no typo, https in production).
No events: confirm the IDE is calling the tool after responses; check dashboard usage when in doubt.