Endpoint
https://api.bilanc.co/mcpSign-in
- “How has our PR cycle time changed over the last three months, by team?”
- “Which squads have the highest AI adoption rate, and did their PR throughput move with it?”
- “Show me the PRs that have been open longest in the payments repo.”
- “What’s our workflow success rate this quarter versus last?”
- “Which files in the checkout service churn the most, and what’s in them?”
What the server exposes
The Bilanc MCP server is read-only, and exposes six tools in two groups.Analytics — SQL over your marts schema
describe_marts_schema first, then writes SQL against tables like pull_requests, pull_request_reviews, pull_request_commits, pull_request_files, issues, release_details, workflow_runs, ai_copilot, team_users, and user_metrics.
query_marts is deliberately narrow. Exactly one SELECT (or WITH … SELECT) per call, no trailing semicolon. Table names are unqualified — the schema search path is preset, and a schema or database prefix is rejected, as are writes, DDL, multiple statements, tables outside the whitelist, and information_schema.
Code — read-only inspection of your repositories
Claude Code (CLI)
Add the server, then authenticate from inside Claude Code.--scope user makes it available in every project on your machine. Use --scope project instead to write it into the repo’s .mcp.json and share it with your team (each person still signs in individually).
Then start Claude Code and run:
.mcp.json in your repo root:
Claude.ai
Bilanc is added as a custom connector.- Open Settings, and under Customize click Connectors.
- Click Add → Add custom connector.
- Set Name to
Bilancand Remote MCP server URL tohttps://api.bilanc.co/mcp. - Under Advanced settings, leave OAuth Client ID and OAuth Client Secret empty — Bilanc registers a client for you automatically.
- Under Connection methods, leave Individual sign-in on, so each member signs in to Bilanc with their own account.
- Click Add, then Connect and sign in to Bilanc.

Adding Bilanc as a custom connector in claude.ai. Leave the OAuth client fields empty and keep Individual sign-in on.
ChatGPT
In ChatGPT, MCP servers are added as plugins (previously called connectors), and custom ones require developer mode. 1. Turn on developer mode. Go to Settings → Security and login → Developer mode and switch it on. On Business and Enterprise workspaces, a workspace owner may need to allow developer mode first. 2. Create the plugin. Open Plugins from the sidebar and click the + button, then fill in the New Plugin dialog:- Name:
Bilanc - Connection: leave it on Server URL and enter
https://api.bilanc.co/mcp - Authentication: OAuth
- Registration method should be Dynamic Client Registration (DCR). This is selected automatically. (CIMD shows as unavailable — Bilanc doesn’t advertise it, which is expected.) The Auth, Token, Registration, and Resource URLs are discovered from the server and shouldn’t need editing.
- Under Default scopes,
read:martsshould be ticked. - Under OpenID support, untick “OIDC enabled”. It is on by default, and it must be off.

The New Plugin dialog in ChatGPT — Authentication set to OAuth, and 'OIDC enabled' unticked under OpenID support.
Codex CLI
codex mcp login opens your browser to sign in to Bilanc. Confirm it worked with codex mcp list.
The equivalent entry in ~/.codex/config.toml:
codex mcp add --url isn’t recognised, upgrade Codex, or add this to ~/.codex/config.toml:Gemini CLI
Add the server to~/.gemini/settings.json (or .gemini/settings.json in a project):
/mcp list to confirm the server and its tools are loaded.
http://localhost:7777/oauth/callback, so run it on a machine where you can open a browser.Cursor
Cursor reads MCP servers from a JSON file. Use~/.cursor/mcp.json to make Bilanc available in every project, or .cursor/mcp.json in a repo to share it with your team (each person still signs in individually):
mcp.json for you to paste the block above into.
Save the file and bilanc appears in the MCP server list with a Needs login state. Click it and your browser opens to sign in to Bilanc and approve access. Once it completes, the entry turns green and lists the six tools.
Then just ask in Agent mode — Cursor picks the tools up automatically. Toggle the server off in the same panel if you don’t want it available in a given chat.
OpenCode
opencode mcp auth opens your browser to sign in to Bilanc and approve access. OpenCode sees the 401, discovers the authorization server, and registers a client dynamically — there’s nothing to fill in. The token is stored in ~/.local/share/opencode/mcp-auth.json and refreshed for you. Confirm with opencode mcp list, which shows the server and its auth status.
Global or project
Passing--url always writes to your global config, ~/.config/opencode/opencode.json, making Bilanc available in every project.
To choose, run opencode mcp add with no arguments. Inside a git repository its first prompt is Location:
- Current project — writes to
opencode.jsonin the repo root, so the server is shared with your team (each person still signs in individually) - Global — writes to
~/.config/opencode/opencode.json
bilanc), a type (Remote), and the URL (https://api.bilanc.co/mcp). Answer Yes to Does this server require OAuth authentication? — it defaults to No — and No to Do you have a pre-registered client ID?, since Bilanc registers one for you.
Either way, you can write the entry by hand instead — opencode.json in a repo root for the project, or ~/.config/opencode/opencode.json for every project:
opencode mcp logout bilanc.
opencode mcp debug bilanc prints the OAuth flow step by step — discovery, registration, and token exchange — which is usually enough to see where it stopped.Hermes
hermes mcp login opens your browser to sign in to Bilanc. The token is cached at ~/.hermes/mcp-tokens/bilanc.json and reused until it needs refreshing.
hermes mcp add writes the server into ~/.hermes/config.yaml, under mcp_servers. The equivalent entry, if you’d rather edit the file directly:
client_id and client_secret out — Bilanc supports dynamic client registration, so Hermes registers itself.
Check it with hermes mcp test bilanc, and use hermes mcp configure bilanc if you want to narrow which of the six tools Hermes loads. If you edit the config during a session, run /reload-mcp rather than restarting.
oauth.redirect_uri to a proxied callback — see Connection details for the API key alternative.Connection details
For any other MCP client, or if you’re debugging a connection:Troubleshooting
The server shows 'needs authentication' or returns 401
The server shows 'needs authentication' or returns 401
/mcp in Claude Code, /mcp auth bilanc in Gemini CLI, codex mcp login bilanc in Codex, opencode mcp auth bilanc in OpenCode, hermes mcp login bilanc in Hermes, Needs login on the server in Cursor’s Tools & Integrations panel, or Connect on the connector in claude.ai and ChatGPT.ChatGPT can't finish setting up the plugin
ChatGPT can't finish setting up the plugin
The assistant says it can't see a team, repo, or member
The assistant says it can't see a team, repo, or member
A repository is missing from code_list_repos
A repository is missing from code_list_repos
main.query_marts rejected my assistant's SQL
query_marts rejected my assistant's SQL
SELECT per call. The usual causes are a trailing semicolon, two statements in one call, a schema-qualified table name (marts.pull_requests rather than pull_requests), or a table that isn’t in the whitelist. Ask the assistant to call describe_marts_schema first — it rejects anything that tool doesn’t list.I need this on a headless machine or in CI
I need this on a headless machine or in CI
Authorization: Bearer <key>, generated from your Bilanc dashboard under Settings → API Keys. Organization-scoped keys won’t work here. In OpenCode that means setting "oauth": false alongside an Authorization header, otherwise it still tries the browser flow when it sees a 401. For a pipeline that just needs numbers, the Metrics API is usually the simpler option.
