Skip to content

Connect a coding agent

Opslane has a remote Model Context Protocol (MCP) server. It lets a coding agent read your latest daily summary, open an issue with its evidence, and link the pull request that fixes it.

The agent setup runbook offers to configure this connection during SDK onboarding. It stores the key in a private environment file and uses an environment reference in your agent configuration. Follow the manual steps below to connect later.

The server accepts POST /mcp at your Opslane address. For hosted Opslane, that is https://app.opslane.com/mcp. It provides five tools:

ToolWhat it does
opslane_digestGet the latest daily summary for the project
opslane_issueGet one issue and its evidence from an id or URL
opslane_link_prLink a GitHub pull request to an issue
opslane_related_eventsCount events and issues with the same error message
opslane_session_timelineGet the browser activity timeline for one issue

In the dashboard, open Project settings → API keys and create an MCP key. It starts with opslane_ak_ and is shown once. The key selects one project and can read that project’s issues and link pull requests.

This key can read private data. Keep it in an environment variable, never in a committed file. The API keys guide explains expiry and revocation.

Terminal window
export OPSLANE_API_KEY=opslane_ak_...

For Claude Code, add the server from the terminal:

Terminal window
claude mcp add --transport http opslane https://app.opslane.com/mcp \
--header 'Authorization: Bearer ${OPSLANE_API_KEY}'

The single quotes preserve the environment reference for Claude Code to read when it connects. Start the agent from a shell where OPSLANE_API_KEY is exported.

To share the server address with your team, commit this .mcp.json. Each person still supplies their own key through the environment:

{
"mcpServers": {
"opslane": {
"type": "http",
"url": "https://app.opslane.com/mcp",
"headers": { "Authorization": "Bearer ${OPSLANE_API_KEY}" }
}
}
}

For Codex, configure the bearer-token environment variable by adding the server to ~/.codex/config.toml:

[mcp_servers.opslane]
url = "https://app.opslane.com/mcp"
bearer_token_env_var = "OPSLANE_API_KEY"

For a self-host, replace https://app.opslane.com with your own address.

Ask the agent to call opslane_digest to test the connection. A missing, invalid, expired, or revoked key returns 401. An ingest or source-map key returns 403 insufficient_scope.

Opslane ships a Claude Code skill so the agent works a digest item the way you would. It fixes a diagnosed error on its own. For a friction issue, where the right fix is a product call, it stops and asks you which behavior you want before it writes any code.

The skill lives at examples/agent-skills/opslane/SKILL.md. Download it into your repo:

Terminal window
mkdir -p .claude/skills/opslane
curl -fsSL https://raw.githubusercontent.com/opslane/opslane/main/examples/agent-skills/opslane/SKILL.md \
-o .claude/skills/opslane/SKILL.md

If you already have an Opslane checkout, copy examples/agent-skills/opslane/SKILL.md from it instead.

Then ask the agent what is broken in production, and it will read the digest, open an issue, and either fix it or ask you the product question first.

Tool output is plain text. Values from a browser session, such as an error message or URL, appear between <untrusted> tags. These tags tell the agent to treat the text as data, not instructions. Opslane also limits how often each project can call the server.