Skip to content
LoopCodeDocs

Extend LoopCode

MCP servers

Connect LoopCode to your tools and data with the Model Context Protocol — Linear, Notion, Sentry, GitHub, Supabase, Stripe and any MCP server, local or remote, with one-click sign-in.

What MCP gives you

MCP servers give LoopCode tools beyond your codebase: your issue tracker, your docs, your error monitoring, your database, your payments dashboard. Once connected, you can ask for things in plain words:

What are the top Sentry errors this week? Fix the one in the checkout service.
Implement the Linear issue ENG-412 and move it to In Review when the tests pass.

Add a server from the directory

The directory has ready-made connections that sign in with one click — Linear, Notion, Sentry, GitHub, Atlassian, Supabase, Stripe, Vercel, Playwright, Context7 and more:

bash
loopcode mcp catalog        # see the directory
loopcode mcp add linear     # add one; it opens your browser to sign in

In the desktop app, open Connections (from the View menu or ⌘ K) and pick one.

Add any server

bash
# A local server that talks over stdio
loopcode mcp add playwright -- npx -y @playwright/mcp@latest

# With environment variables
loopcode mcp add github -e GITHUB_TOKEN=${GITHUB_TOKEN} -- npx -y @modelcontextprotocol/server-github

# A remote server (streamable HTTP; sse also works)
loopcode mcp add --transport http docs https://mcp.example.com/mcp

# With a header
loopcode mcp add --transport http internal https://mcp.internal.example.com/mcp -H "Authorization: Bearer ${INTERNAL_TOKEN}"

# Written as JSON
loopcode mcp add-json analytics '{"url":"https://mcp.analytics.example.com/mcp"}'
OptionMeaning
-s, --scope projectThis project: .loopcode/mcp.json (the default)
-s, --scope userAll your projects: ~/.loopcode/mcp.json
-e, --env KEY=valueAn environment variable for a local server (repeatable)
-H, --header "Name: value"A request header for a remote server (repeatable)
-t, --transport httpA remote server

Manage servers

bash
loopcode mcp list            # every server, its state and its tools
loopcode mcp get <name>      # one server's configuration and status
loopcode mcp login <name>    # sign in to a remote server in the browser (OAuth)
loopcode mcp logout <name>   # forget that sign-in
loopcode mcp remove <name>

In a conversation, /mcp lists servers and lets you show a server's tools, sign in or out, turn it off without removing it, or remove it. In the desktop app, use Settings → Connections, which can also reconnect them all.

Bring your servers from Claude Code or Codex

bash
loopcode import

import finds the MCP servers you set up in Claude Code (~/.claude.json) and Codex (~/.codex/config.toml) and adds them. A server LoopCode already has is left as it is. /import does the same in a conversation.

The configuration file

Servers live in .loopcode/mcp.json (project) and ~/.loopcode/mcp.json (yours), in the shape Claude Code and Cursor use. A project .mcp.json — Claude Code's file — is read too.

.loopcode/mcp.json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
    },
    "docs": {
      "url": "https://mcp.example.com/mcp",
      "headers": { "Authorization": "Bearer ${DOCS_TOKEN:-}" }
    }
  }
}
FieldMeaning
command, args, env, cwdA local (stdio) server. Declare either command or url, not both
url, headersA remote server
typestdio, http or sse. Inferred when absent
disabledKeep it configured, but offer none of its tools
enabledTools / disabledToolsOffer only these tools / never these tools
timeoutPer-tool-call timeout in milliseconds (Claude Code's field); startup_timeout_sec and tool_timeout_sec (Codex's) work too
oauthA pre-registered OAuth app (clientId, clientSecret, callbackPort, scopes) for servers that do not let clients register themselves
scopesOAuth scopes to ask for at sign-in

Values may use ${VAR} and ${VAR:-default}, so a shared file never holds a secret.

Permissions and tools

Each server tool appears to the model as mcp__<server>__<tool>. Tools a server marks read-only run without asking; everything else follows your permission mode and rules like any command:

json
{ "permissions": { "allow": ["mcp__linear__list_issues"], "deny": ["mcp__stripe__create_refund"] } }

MCP tools are loaded on demand, so connecting many servers does not fill the context window. Servers can also offer resources — documents and records LoopCode can read by URI.

Troubleshooting

  • A server's own error output is kept in ~/.loopcode/logs/mcp/.
  • Servers reconnect by themselves after they drop.
  • A remote server showing needs sign-in wants loopcode mcp login <name> (or Sign in in /mcp).