Skip to content

This document supplements <cite doc-id="J3pxwfjAmiZfzhkaFHbc5rFSnUd" file-type="wiki" title="接入 Lovrabet 运行态 MCP" type="doc"></cite>. The conventions stay the same: the server URL is https://runtime.lovrabet.com/api/mcp, and every request must carry the X-Lovrabet-AccessKey: <ACCESS_KEY> header. Below are copy-and-paste configurations for common Agent clients and IDEs.

TIP

Get your AccessKey from the Lovrabet user center. Never put a real key into shareable configs or send it to others. For multi-app scenarios, you can also add X-Lovrabet-App-Code: <APP_CODE>.

Three things to check before configuring

  1. Transport: The runtime MCP is hosted over Streamable HTTP — it is not a local npx process.
  2. Authentication: It uses the custom header X-Lovrabet-AccessKey — not cookies, and not a key stuffed into the URL.
  3. Verify after configuring: Ask in a chat, "Is the current Lovrabet runtime MCP authenticated?" Success means you get real user information back.

Cursor

Config files:

  • Global: ~/.cursor/mcp.json
  • Current project only: .cursor/mcp.json in the project root
json
{
  "mcpServers": {
    "lovrabet-runtime": {
      "url": "https://runtime.lovrabet.com/api/mcp",
      "headers": {
        "X-Lovrabet-AccessKey": "<ACCESS_KEY>"
      }
    }
  }
}

You can also paste the same content in Cursor Settings → Tools & MCP → New MCP Server. Reference an environment variable with ${env:LOVRABET_ACCESS_KEY} so the key is never written to disk in plain text.

Reference: [Cursor MCP documentation]

Claude Code

The recommended approach is to add the HTTP server with a single command (it writes to Claude Code's MCP configuration):

bash
claude mcp add --transport http lovrabet-runtime https://runtime.lovrabet.com/api/mcp \
  --header "X-Lovrabet-AccessKey: <ACCESS_KEY>"

To pin a specific app, add one more header:

bash
claude mcp add --transport http lovrabet-runtime https://runtime.lovrabet.com/api/mcp \
  --header "X-Lovrabet-AccessKey: <ACCESS_KEY>" \
  --header "X-Lovrabet-App-Code: <APP_CODE>"

You can also write the JSON by hand. Note: Claude Code requires "type": "http" (or streamable-http); a bare url is treated as a local stdio server and silently skipped.

json
{
  "mcpServers": {
    "lovrabet-runtime": {
      "type": "http",
      "url": "https://runtime.lovrabet.com/api/mcp",
      "headers": {
        "X-Lovrabet-AccessKey": "<ACCESS_KEY>"
      }
    }
  }
}

The configuration typically lives in a project-level .mcp.json or your user-level Claude config; defer to claude mcp list and the docs for your current version. After configuring, run /mcp to check the connection status.

Reference: [Claude Code MCP]

Codex

Codex (the CLI, IDE extension, and ChatGPT desktop app share the same source) uses TOML, not JSON. Edit ~/.codex/config.toml (or .codex/config.toml inside a trusted project):

toml
[mcp_servers.lovrabet-runtime]
url = "https://runtime.lovrabet.com/api/mcp"

[mcp_servers.lovrabet-runtime.http_headers]
"X-Lovrabet-AccessKey" = "<ACCESS_KEY>"

The safer approach is to keep the key in an environment variable and use env_http_headers:

toml
[mcp_servers.lovrabet-runtime]
url = "https://runtime.lovrabet.com/api/mcp"

[mcp_servers.lovrabet-runtime.env_http_headers]
"X-Lovrabet-AccessKey" = "LOVRABET_ACCESS_KEY"

Then export it in your shell:

bash
export LOVRABET_ACCESS_KEY="<ACCESS_KEY>"

You can also add the remote server via the CLI and fill in headers afterwards; custom headers are governed by http_headers / env_http_headers. Run /mcp in a session to check whether it is online.

Reference: [Codex MCP]

Trae

Open Trae → Settings → MCP (or MCP under Agents / AI management) and choose manual configuration. The Agent actually reads the global config, so prefer writing it through the UI, or edit:

  • macOS: ~/Library/Application Support/Trae/User/mcp.json
  • Windows: %APPDATA%\Trae\User\mcp.json
  • Linux: ~/.config/Trae/User/mcp.json
json
{
  "mcpServers": {
    "lovrabet-runtime": {
      "url": "https://runtime.lovrabet.com/api/mcp",
      "headers": {
        "X-Lovrabet-AccessKey": "<ACCESS_KEY>"
      }
    }
  }
}

If the UI offers an SSE / HTTP choice, pick the remote URL type and enter the URL and header above. After saving, fully restart Trae. In some versions the project-level .trae/mcp.json is not picked up by the Agent, so rely on the global config when connecting the runtime MCP.

Qoder

Open Qoder Settings (macOS: ⌘⇧,; Windows: Ctrl+Shift+,) → MCP → My Servers → + Add.

Option 1: paste JSON (if the UI offers Paste JSON / config editing):

json
{
  "mcpServers": {
    "lovrabet-runtime": {
      "type": "sse",
      "url": "https://runtime.lovrabet.com/api/mcp",
      "headers": {
        "X-Lovrabet-AccessKey": "<ACCESS_KEY>"
      }
    }
  }
}

Note: Qoder usually exposes remote servers as an SSE form field; per the official docs, Streamable HTTP works the same way — enter the URL as SSE and the client detects the transport automatically. If the UI has dedicated Streamable HTTP / Headers fields, prefer entering the same URL and X-Lovrabet-AccessKey there.

After saving, confirm a link icon appears next to the server in the list, then verify in an Agent-mode chat. If a confirmation prompt appears before a tool call, allow it as prompted.

Reference: [Qoder MCP]

If you use the Qoder CLI, this also works:

bash
qodercli mcp add -t http -s user lovrabet-runtime --url https://runtime.lovrabet.com/api/mcp

Whether custom headers are supported depends on your CLI version — check its help. If unsupported, fall back to configuring through the IDE UI.

Craft Agents

Craft Agents treats MCP as a Source. You can simply tell the Agent to "add the Lovrabet runtime MCP", or prepare the source config manually.

The runtime MCP uses a custom header, not OAuth. For reference:

json
{
  "type": "mcp",
  "name": "Lovrabet Runtime",
  "tagline": "Lovrabet 运行态业务数据与能力",
  "mcp": {
    "transport": "http",
    "url": "https://runtime.lovrabet.com/api/mcp",
    "headers": {
      "X-Lovrabet-AccessKey": "<ACCESS_KEY>"
    },
    "authType": "none"
  }
}

If the product UI only offers Bearer / OAuth with no way to set a custom header: Bearer lands in Authorization, which does not match what Lovrabet expects. On the current version, prefer an integration method that supports custom headers, or check with the Craft side how X-Lovrabet-AccessKey can be mapped.

Once connected, use /tools -v to list tools; after changes, use /source reload <source-name> to refresh.

Reference: [Craft Agents connecting to MCP]

Windsurf (Cascade)

The config file is usually ~/.codeium/windsurf/mcp_config.json. For remote servers the field is typically serverUrl (some versions also accept url):

json
{
  "mcpServers": {
    "lovrabet-runtime": {
      "serverUrl": "https://runtime.lovrabet.com/api/mcp",
      "headers": {
        "X-Lovrabet-AccessKey": "<ACCESS_KEY>"
      }
    }
  }
}

When copying from Cursor, change url to serverUrl — otherwise the server may silently fail to load. In Teams / Enterprise environments where remote MCP is disabled, an admin must enable it first. Restart Cascade after editing.

Reference: [Windsurf Cascade MCP]

Quick reference

| Client | Config location / entry point | Remote server field notes | |-|-| | Cursor | ~/.cursor/mcp.json or .cursor/mcp.json | url + headers | | Claude Code | claude mcp add --transport http or JSON | Requires type: http + headers | | Codex | ~/.codex/config.toml | url + http_headers / env_http_headers | | Trae | Settings → MCP; global mcp.json | url + headers; prefer global | | Qoder | Settings → MCP → Add | Remote URL; header via UI or JSON | | Craft Agents | Source / add via chat | transport: http + custom headers | | Windsurf | ~/.codeium/windsurf/mcp_config.json | Prefer serverUrl + headers |

Post-setup verification

plaintext
帮我确认当前 Lovrabet 运行态 MCP 是否已认证,并告诉我当前登录用户是谁。列出我能访问的应用。

If you get your real user identity and app list back, the client is connected. You can then follow <cite doc-id="Um3KwCKyEiB56YkGDn2cuCuTnOh" file-type="wiki" title="用运行态 MCP 查询与处理业务数据" type="doc"></cite> to query and process data.

Troubleshooting

The client connects but never authenticates

Check that the header name is exactly X-Lovrabet-AccessKey — not an Authorization Bearer, and not the old Access-Key spelling. For Claude Code, also confirm that type: http is declared.

Config copied from Cursor doesn't work in other clients

Field names don't port across clients: Windsurf expects serverUrl, Claude Code needs type, and Codex needs http_headers in TOML. Adapt the config per the sections above instead of pasting the whole block.

A local proxy or corporate network intercepts HTTPS

First hit https://runtime.lovrabet.com/api/mcp/health from a terminal. If neither a browser nor curl can reach it, fix the network before debugging client configuration.

基于飞书知识库同步生成,内容以飞书源文档为准