Skip to content
LeadMCPDocs

Connect a client

Add the server to your agent.

Set up from your agent in one line

Paste this line into Claude Code, Codex, Cursor or another coding agent. The agent reads the setup steps, shows you a link and a code, and you click Approve in your browser. A new user creates the account on that page.

Give this to your agent
set up https://leadmcp.ai/SKILL.md

Pick your client. Each one needs the server URL, and most of them sign in with OAuth.

Claude app

OAuth, one click

Open Settings, then Connectors. Click Add, then Add custom connector. Name it LeadMCP and paste the server URL. Click Continue. Keep the detected options: Authentication is Sign in now, and OAuth client is Register automatically. Add no headers. Click Add, then Connect, then Approve.

MCP server URL
https://mcp.leadmcp.ai

ChatGPT

OAuth, one click

Open Settings, then Plugins. Click Add, then Add MCP server. Name it LeadMCP and pick Streamable HTTP. Paste the server URL. Leave the bearer token and the headers empty. Click Save. Open the MCPs tab, click Authenticate, then click Approve.

MCP server URL
https://mcp.leadmcp.ai

Claude Code

Device flow

Register the client and open verification_uri_complete from the reply. The page shows the user_code: check that it matches, and click Approve. A client that cannot open a link prints verification_uri and user_code instead. Then poll for the token and add the server with the token on the Authorization header.

Device flow
curl -s -X POST https://leadmcp.ai/api/oauth/device \
  -H "Content-Type: application/json" \
  -d '{"client_name":"Claude Code"}'

# Open verification_uri_complete, check that the page shows user_code, click Approve, then poll:
curl -s -X POST https://leadmcp.ai/api/oauth/token \
  -d "grant_type=urn:ietf:params:oauth:grant-type:device_code&device_code=<device_code>&client_id=<client_id>"

claude mcp add --transport http leadmcp https://mcp.leadmcp.ai --header "Authorization: Bearer <access_token>"

Codex

Device flow

Run the same device flow as Claude Code. Then add the server to ~/.codex/config.toml with the token on the Authorization header.

~/.codex/config.toml
[mcp_servers.leadmcp]
url = "https://mcp.leadmcp.ai"
http_headers = { Authorization = "Bearer <access_token>" }

Cursor

Bearer key

Open Settings, then MCP, then Add new global MCP server. Paste this into .cursor/mcp.json with your key in the header. Save the file and turn the leadmcp server on.

.cursor/mcp.json
{
  "mcpServers": {
    "leadmcp": {
      "url": "https://mcp.leadmcp.ai",
      "headers": {
        "Authorization": "Bearer lm_live_YOUR_API_KEY"
      }
    }
  }
}

REST, and any other tool

Bearer key

Send the key as a bearer token on every request. Run a count before you spend contact credits: a count costs nothing and tells you how big the audience is.

POST /contacts/count, no contact credits spent
curl -sS -X POST "https://api.leadmcp.ai/v1/contacts/count" \
  -H "Authorization: Bearer lm_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter":{"countries":["us"],"seniority":["vp"],"functions":["marketing_and_advertising"]}}'