MCP setup
In MCP mode your agent takes tickets from Loopback while you work, inside your IDE or CLI, with the subscription you already pay for. See execution modes for when to choose it.
Create a token
In Settings, create an MCP token for one workspace. It starts with lbm_, is shown once and expires; it is revoked as soon as you lose access to the workspace. Keep it in an environment variable, LOOPBACK_MCP_TOKEN in the examples below, never in a file you commit.
Configure your agent
The remote server speaks MCP over Streamable HTTP and authenticates with a bearer token. Set the transport explicitly: some clients fall back to the old SSE transport when it is missing.
The token in your environment
Most clients read the token from LOOPBACK_MCP_TOKEN. Set it in your shell profile, or in the user environment on Windows, then restart the client. Clients that cannot read the environment get the token in their own file: paste it where the placeholder is.
export LOOPBACK_MCP_TOKEN='<LOOPBACK_MCP_TOKEN>'[Environment]::SetEnvironmentVariable("LOOPBACK_MCP_TOKEN", "<LOOPBACK_MCP_TOKEN>", "User")Claude Code
Run in a terminal
claude mcp add --transport http --scope user loopback https://api.loopback.so/mcp --header 'Authorization: Bearer ${LOOPBACK_MCP_TOKEN}'In .mcp.json
{ "mcpServers": { "loopback": { "type": "http", "url": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer ${LOOPBACK_MCP_TOKEN}" } } }}Claude Code subscriptions are allowed here: this is MCP mode, inside the official client.
Cursor
In ~/.cursor/mcp.json · .cursor/mcp.json
{ "mcpServers": { "loopback": { "url": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer ${env:LOOPBACK_MCP_TOKEN}" } } }}Global file; a project can use .cursor/mcp.json.
VS Code (GitHub Copilot)
In .vscode/mcp.json
{ "inputs": [ { "type": "promptString", "id": "loopback-token", "description": "Loopback MCP token", "password": true } ], "servers": { "loopback": { "type": "http", "url": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer ${input:loopback-token}" } } }}The key is servers; VS Code asks for the token once and stores it securely.
Windsurf
In ~/.config/devin/mcp_config.json · ~/.codeium/windsurf/mcp_config.json
{ "mcpServers": { "loopback": { "serverUrl": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer ${env:LOOPBACK_MCP_TOKEN}" } } }}Older versions read ~/.codeium/windsurf/mcp_config.json.
Zed
In settings.json
{ "context_servers": { "loopback": { "url": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer <LOOPBACK_MCP_TOKEN>" } } }}In the context_servers section of the settings; the token is written literally.
Kiro
In ~/.kiro/settings/mcp.json · .kiro/settings/mcp.json
{ "mcpServers": { "loopback": { "url": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer ${LOOPBACK_MCP_TOKEN}" }, "autoApprove": [ "loopback_get_ticket", "loopback_get_logs" ] } }}The IDE expands only the variables listed in its approved environment variables setting.
Continue
In .continue/mcpServers/loopback.yaml
name: Loopbackversion: 0.0.1schema: v1mcpServers: - name: loopback type: streamable-http url: https://api.loopback.so/mcp requestOptions: headers: Authorization: Bearer ${{ secrets.LOOPBACK_MCP_TOKEN }}The transport is streamable-http, with a hyphen.
Cline
In cline_mcp_settings.json · ~/.cline/mcp.json
{ "mcpServers": { "loopback": { "type": "streamableHttp", "url": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer <LOOPBACK_MCP_TOKEN>" }, "disabled": false, "autoApprove": [] } }}Without type, Cline uses the old SSE transport.
Antigravity
In ~/.gemini/config/mcp_config.json · .agents/mcp_config.json
{ "mcpServers": { "loopback": { "serverUrl": "https://api.loopback.so/mcp", "headers": { "Authorization": "Bearer <LOOPBACK_MCP_TOKEN>" } } }}serverUrl is required; url is not supported.
Codex
Run in a terminal
codex mcp add loopback --url https://api.loopback.so/mcp --bearer-token-env-var LOOPBACK_MCP_TOKENIn ~/.codex/config.toml
[mcp_servers.loopback]url = "https://api.loopback.so/mcp"bearer_token_env_var = "LOOPBACK_MCP_TOKEN"default_tools_approval_mode = "approve"The token is read from the environment variable at run time.
opencode
In ~/.config/opencode/opencode.json · opencode.json
{ "$schema": "https://opencode.ai/config.json", "mcp": { "loopback": { "type": "remote", "url": "https://api.loopback.so/mcp", "oauth": false, "headers": { "Authorization": "Bearer {env:LOOPBACK_MCP_TOKEN}" } } }}Without oauth: false, a missing token starts an OAuth discovery.
Tools
The tools Loopback exposes to your agent. Next to them, the agent uses the engine’s tools through its own MCP server: run_pipeline, get_impact_graph, search_logic_flow, verify_done and save_observation.
| Tool | Input | What it does |
|---|---|---|
loopback_next_ticket | workspace_id?, filters? | MCP mode only: leases the next ticket waiting for your agent and returns the job payload. |
loopback_get_ticket | job_id | The ticket of a job: subject, messages, attachments, widget context and, for proactive tickets, the error group. |
loopback_get_logs | job_id, query? | The log and error events linked to the job. |
loopback_submit_diagnosis | job_id, diagnosis | Submits category, root cause, file and line references, confidence and a public summary without code. |
loopback_submit_draft | job_id, body_md, kind? | Submits the reply draft to the customer, in the language of the ticket. |
loopback_report_fix | job_id, branch, head_sha, verify_report, tests, pr_number? | Reports a fix on a loopback/ branch with its commit SHA, verification and tests. |
loopback_escalate | job_id, reason | Hands the ticket to a person, with the reason. |
A ticket in MCP mode
loopback_next_ticketleases the next job waiting for your agent.loopback_get_ticketandloopback_get_logsreturn the ticket, the messages, the widget context and the related log events.- The agent finds the code and submits the diagnosis and, for a question, the reply draft.
- For a bug, the agent fixes it on a
loopback/branch, runs the tests and the verification, and pushes the branch. loopback_report_fixreports branch, commit SHA, verification and tests; Loopback opens the pull request.loopback_escalatehands the ticket to a person, with the reason.