AI access (MCP)
Every tenant exposes its telemetry over an MCP server, so your own AI tooling — Claude Code, Cursor, VS Code, Codex CLI, Gemini CLI, JetBrains — can query metrics, logs, traces, and your demand set directly. Access is authenticated with a personal access token you create in the LeanSignal app. Unlike LeanBuddy, MCP access is not metered by credits: your client brings its own model, so the model spend happens — and is capped — in your own tooling.
The endpoint
Section titled “The endpoint”The MCP server is plain Streamable HTTP with bearer authentication, at a per-tenant host:
https://<tenant>-mcp.<region>.leansignal.io/mcpAuthorization: Bearer <token>The exact endpoint for your tenant is shown on the Preferences page, under Access tokens, with a copy button.
Create a token
Section titled “Create a token”- In the LeanSignal app, go to Preferences → Access tokens. The same tokens work for the CLI and for MCP.
- Give the token a name that identifies where it will live — e.g.
work laptop— and click Create. - Copy the token immediately — it is shown only once. What is stored and listed afterwards is only its prefix.
- Pick your client under Add it to your client and copy the ready-made configuration snippet — it already contains the endpoint and your new token.
Tokens expire after 90 days. The token list shows each token’s prefix, scopes, creation date, last use, and expiry; expired tokens stay listed until you remove them.
Scopes
Section titled “Scopes”Tokens are read-only by default: they can query stored and agent-local telemetry, demands, dashboards, and alert rules — but change nothing.
Editors and admins can opt a token into write access at creation time:
| Scope | What it allows |
|---|---|
| (default) | Read-only: query metrics, logs, traces, and the demand set. |
| Allow writes | The AI client can create and update demands, dashboards, alerts, rules, and channels — acting as you. |
| Also allow deletes | Deletes too. Deleting a demand object purges the stored telemetry only it covered, so this is gated behind its own switch. |
Grant write access only to tokens used by tooling you supervise — everything a write-scoped token does is done as your user. What write access unlocks — and the guardrails around it — has its own page: Agentic operations.
Connect a client
Section titled “Connect a client”Every MCP client that speaks Streamable HTTP needs the same two values: the
endpoint URL and the Authorization: Bearer <token> header. The Preferences
page generates these snippets with your values filled in; the shapes are:
Claude Code — run once in a terminal (per project, or add -s user for
everywhere):
claude mcp add --transport http leansignal \ https://<tenant>-mcp.<region>.leansignal.io/mcp \ --header "Authorization: Bearer <token>"Cursor — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per
project):
{ "mcpServers": { "leansignal": { "url": "https://<tenant>-mcp.<region>.leansignal.io/mcp", "headers": { "Authorization": "Bearer <token>" } } }}VS Code — .vscode/mcp.json (workspace) or the user-profile
mcp.json; used by Copilot agent mode:
{ "servers": { "leansignal": { "type": "http", "url": "https://<tenant>-mcp.<region>.leansignal.io/mcp", "headers": { "Authorization": "Bearer <token>" } } }}Codex CLI — ~/.codex/config.toml:
[mcp_servers.leansignal]url = "https://<tenant>-mcp.<region>.leansignal.io/mcp"http_headers = { "Authorization" = "Bearer <token>" }Gemini CLI — ~/.gemini/settings.json (global) or
.gemini/settings.json (per project):
{ "mcpServers": { "leansignal": { "httpUrl": "https://<tenant>-mcp.<region>.leansignal.io/mcp", "headers": { "Authorization": "Bearer <token>" } } }}JetBrains — Settings → Tools → AI Assistant → Model Context Protocol → Add, then enter the URL and header (header support varies by IDE version).
What the tools cover
Section titled “What the tools cover”The MCP tools mirror the app’s Stored / Available split: stored tools
query central storage (the demanded subset, 30-day retention), while
available_* tools query the agent’s local stores — everything collected at
the edge, for a short window — and need a connected agent. Control-plane
tools list agents, demands, dashboards, and alert rules. As with LeanBuddy,
an empty stored result usually means not demanded, not not happening —
check the demand set before concluding.
Revoke a token
Section titled “Revoke a token”Revoke a token from the same list on the Preferences page. Revocation deletes it permanently and any client still using it loses access immediately. Revoke tokens you no longer use, and rotate a token immediately if it may have leaked (for example, committed to a repository).
Thanks for your feedback!
Report sent — thank you!