LeadsAgent/ Documentation
Connectors
OverviewQuickstartAuthenticationAPI referenceMCPConnect ChatGPTConnect ClaudeCredits & limitsErrors & retriesConnect OpenCodeConnect Claude CodeConnect CodexConnect CursorConnect VS CodeConnect AntigravityConnect n8nAPI, MCP & plugins

Connect OpenCode

Use LeadsAgent from OpenCode with a remote MCP server and your own API key.

Set up with your AI assistant

Paste the prompt into OpenCode. It includes setup steps and a read-only connection check.

OpenCode — Terminal (CLI): sign in with LeadsAgent (recommended)

The opencode command and its terminal UI.

  1. OpenCode V2: add the server for all projects (drop --global for this project only).
    Terminal · V2
    opencode mcp add leadsagent --url https://leadsagent.io/mcp/v1 --global
  2. Or merge this V2 configuration into opencode.json. V2 nests servers under mcp.servers.
    opencode.json · V2
    {
      "mcp": {
        "servers": {
          "leadsagent": {
            "type": "remote",
            "url": "https://leadsagent.io/mcp/v1",
            "disabled": false
          }
        }
      }
    }
  3. OpenCode V1: run opencode mcp add and answer the prompts (remote, the URL above). Or merge this into opencode.json.
    opencode.json · V1
    {
      "mcp": {
        "leadsagent": {
          "type": "remote",
          "url": "https://leadsagent.io/mcp/v1"
        }
      }
    }
  4. Start sign-in.
    Terminal
    opencode mcp auth leadsagent
  5. A browser opens. Sign in with your LeadsAgent account and approve access.
  6. Check it.
    Terminal
    opencode mcp list

OpenCode — Terminal (CLI): use an API key

  1. On the LeadsAgent setup page, select “Create an API key”. Name it for this app and set its expiry and limits. Copy it once; it starts with la_.
  2. Set LEADSAGENT_API_KEY in the environment used by this app. Restart the app so it reads the variable. Keep the value out of chats and shared files.
    Terminal
    LEADSAGENT_API_KEY
  3. OpenCode V2: add the server with the key header. Keep {env:LEADSAGENT_API_KEY} as written; OpenCode fills it in.
    Terminal · V2
    opencode mcp add leadsagent --url https://leadsagent.io/mcp/v1 --header 'X-API-Key={env:LEADSAGENT_API_KEY}' --global
  4. Or merge this V2 configuration into opencode.json. Keep the environment reference as written.
    opencode.json · V2
    {
      "mcp": {
        "servers": {
          "leadsagent": {
            "type": "remote",
            "url": "https://leadsagent.io/mcp/v1",
            "disabled": false,
            "oauth": false,
            "headers": {
              "X-API-Key": "{env:LEADSAGENT_API_KEY}"
            }
          }
        }
      }
    }
  5. OpenCode V1, or to edit by hand: merge this into opencode.json(c). In V2 the entry goes under mcp.servers instead of mcp.
    opencode.json · V1
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "leadsagent": {
          "type": "remote",
          "url": "https://leadsagent.io/mcp/v1",
          "oauth": false,
          "headers": {
            "X-API-Key": "{env:LEADSAGENT_API_KEY}"
          }
        }
      }
    }
  6. Restart OpenCode, then check the server. In V2, /mcps also opens the server controls.
    Terminal
    opencode mcp list

OpenCode — Desktop app: sign in with LeadsAgent (recommended)

The OpenCode desktop app (V2). It uses the same opencode.json configuration as the CLI.

  1. Add the server once from a terminal. The desktop app reads the same global configuration.
    Terminal
    opencode mcp add leadsagent --url https://leadsagent.io/mcp/v1 --global
  2. Restart the desktop app. Open the MCP server controls (/mcps) and connect leadsagent, or run opencode mcp auth leadsagent in a terminal.
    In OpenCode
    /mcps
  3. A browser opens. Sign in with your LeadsAgent account and approve access.

OpenCode — Desktop app: use an API key

  1. On the LeadsAgent setup page, select “Create an API key”. Name it for this app and set its expiry and limits. Copy it once; it starts with la_.
  2. Set LEADSAGENT_API_KEY in the environment used by this app. Restart the app so it reads the variable. Keep the value out of chats and shared files.
    System environment
    LEADSAGENT_API_KEY
  3. Add the server once from a terminal.
    Terminal
    opencode mcp add leadsagent --url https://leadsagent.io/mcp/v1 --header 'X-API-Key={env:LEADSAGENT_API_KEY}' --global
  4. Restart the desktop app so it reads the variable. Open /mcps to check leadsagent is connected.
    In OpenCode
    /mcps

Source: OpenCode docs: MCP servers · Open in Connectors

Agent documentation indexOpenAPI JSONMarkdown quickstart