Clay logo

LeadMagic has made more than one billion API calls with Clay and won The Unstoppable Wheel award.

Recap
LeadMagicDocs

Setup

Connect LeadMagic MCP to Claude, ChatGPT, Codex, Cursor, VS Code, Grok, Gemini CLI, and other AI clients

Connect the LeadMagic MCP server to your AI assistant in minutes. Production MCP uses OAuth: sign in with your LeadMagic account when the client prompts you. There is no local leadmagic-mcp package to install.

Claude uses https://mcp.leadmagic.io/mcp/anthropic for company enrichment, verified work email lookup, cost estimates, and credit balance.

Full catalog for other clients: https://mcp.leadmagic.io/mcp (Streamable HTTP). For a smaller catalog, choose a focused connection and use its URL in the same setup steps. Give each group a distinct server name when connecting more than one.

  • Auth: OAuth in the client. Never put a static API key, x-leadmagic-key, or X-API-Key in MCP config. Only clients without an OAuth flow (GitHub Copilot cloud agent, JetBrains AI Assistant, and your own API code) need an access token.
  • Already connected with https://mcp.leadmagic.io? The bare origin keeps working, so you don't need to change an existing install. Use the URL shown for your client for new setups.
  • Client setup guide: app.leadmagic.io/mcp.

After we deploy MCP improvements, reload your connection (toggle server off/on or start a new chat). No package install required.

Prerequisites

1

LeadMagic account

Sign up or log in at app.leadmagic.io.

2

Choose your client

Follow the instructions below. Most configs are URL only: OAuth runs in the client.

3

Sign in

When you first use LeadMagic tools, complete the browser OAuth flow.

Claude setup and privacy

The Claude connector and the LeadMagic plugin use the same four tools. Sign in with your LeadMagic workspace to look up a company, find a verified work email, check your credit balance, or preview the cost of a lookup. Balance checks and previews are free. See the Claude setup guide, Claude Code setup guide, and pricing.

A company lookup sends LeadMagic the domain you supply. A work email lookup sends the person's first name, last name, and employer domain. LeadMagic returns a verified work address only when it matches the requested domain and employer. LeadMagic retains enrichment query logs for 12 months, then anonymizes or deletes them. Privacy Policy

LeadMagic obtains business contact data from public professional profiles, business directories, registries and filings, and third-party data providers. In the EEA and UK, LeadMagic relies on legitimate interests to aggregate and enrich public business contact data, balanced against the individual's rights. A listed person can request removal or suppression through the privacy request form or by emailing privacy@leadmagic.io. Customers can review the Data Use Policy and Terms of Service, or contact support.

Client Setup

Claude: claude.ai and Claude Desktop

Add LeadMagic as a custom connector. Remote MCP servers are added in the Connectors UI, not in claude_desktop_config.json.

1

Open Connectors

On claude.ai or in Claude Desktop, go to Customize → Connectors, click + Add, then Add custom connector.

2

Add the server

Name: LeadMagic. URL: https://mcp.leadmagic.io/mcp/anthropic. Leave the OAuth client setting on the default (Use Claude's published identity) and click Add.

3

Connect and sign in

Click Connect, sign in at app.leadmagic.io, and press Allow. Then start a new chat and turn LeadMagic on from the + menu → Connectors.

Team and Enterprise: an Owner adds the connector first under Organization settings → Connectors → Add → Custom → Web, with the same URL. Each member then connects it from Customize → Connectors. The Free plan allows one custom connector.

The connector syncs across claude.ai, Claude Desktop, and the Claude mobile apps. Anthropic: custom connectors

More Clients

These clients sign in with OAuth from a URL-only config unless noted. The few that don't support OAuth need an access token (see Use from your own code).

Windsurf is now Devin Desktop.

File: ~/.config/devin/mcp_config.json (Windows: %APPDATA%\devin\mcp_config.json)

Save, then sign in when Cascade prompts you. Older Windsurf installs read ~/.codeium/windsurf/mcp_config.json.

Devin CLI: devin mcp add -s user leadmagic https://mcp.leadmagic.io/mcp, then devin mcp login leadmagic. Devin MCP docs

Then run /mcp auth leadmagic inside Gemini CLI to sign in. Without -s user, the server is added to the current project only.

Or edit ~/.gemini/settings.json:

Gemini CLI uses httpUrl for Streamable HTTP. url means SSE, which LeadMagic does not serve. Gemini CLI MCP docs

File: ~/.config/zed/settings.json

Or use Settings → AI → MCP Servers → Add Server → Add Remote Server. Zed prompts you to sign in because no Authorization header is set. Zed MCP docs

Open the MCP Servers icon in Cline → Remote Servers, or edit cline_mcp_settings.json:

Set "type": "streamableHttp". Without it, Cline defaults to SSE and can't connect.

Cline CLI: cline mcp add leadmagic https://mcp.leadmagic.io/mcp --transport http, then choose Authorize OAuth. Cline MCP docs

File: opencode.json (project) or ~/.config/opencode/opencode.json (global)

Then run opencode mcp auth leadmagic to sign in. Don't set "oauth": false: it turns off the sign-in flow. OpenCode MCP docs

Amazon Q Developer CLI is now Kiro.

File: ~/.kiro/settings/mcp.json (user) or .kiro/settings/mcp.json (workspace)

Then run /mcp auth to sign in. kiro-cli mcp add has no URL option, so edit the JSON directly. Kiro MCP docs

AI Assistant doesn't support OAuth for remote MCP servers yet, so connect through mcp-remote, which runs the LeadMagic sign-in for it. Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP), add a server, and paste:

This needs Node.js. JetBrains AI Assistant MCP docs

Junie CLI: add the URL-only config to ~/.junie/mcp/mcp.json, then run /mcp and choose Authorize. OAuth in the Junie IDE plugin isn't documented yet.

Junie MCP docs

The Copilot cloud agent (formerly coding agent) does not support OAuth, so it needs an access token stored as a repository secret.

  1. Add a repository (or organization) Agents secret named COPILOT_MCP_LEADMAGIC_TOKEN with a LeadMagic access token. Only Agents secrets prefixed COPILOT_MCP_ are passed to MCP config.
  2. Go to Settings → Copilot → MCP servers and add:

tools is required. LeadMagic access tokens expire after about a day, so a stored secret needs refreshing: this is not a set-and-forget setup. GitHub: extend the cloud agent with MCP

The Copilot CLI is separate from the cloud agent:

Or run /mcp add inside the CLI. The config is stored in ~/.copilot/mcp-config.json. GitHub: add MCP servers to Copilot CLI

Or add "amp.mcpServers": { "leadmagic": { "url": "https://mcp.leadmagic.io/mcp" } } to ~/.config/amp/settings.json. Amp opens the browser to sign in. Amp MCP docs

File: ~/.hermes/config.yaml

Run /reload-mcp after saving, then sign in when prompted. Hermes Agent MCP docs

Any MCP client that supports Streamable HTTP works with LeadMagic. If yours isn't listed, use https://mcp.leadmagic.io/mcp and let the client run OAuth. Open the client setup guide for available clients.

Use from your own code

The Anthropic Messages API and the OpenAI Responses API connect to remote MCP servers for you, but they don't run a browser sign-in. Your app passes a LeadMagic OAuth access token on every request.

Get the token by running a standard OAuth 2.1 + PKCE flow against the server (an MCP client library or SDK auth provider handles discovery from the server URL in the relevant example below). Access tokens expire after about a day, so store the refresh token and refresh before calls. Never commit tokens: read them from an environment variable. A REST API key does not work here.

Uses the MCP connector beta (mcp-client-2025-11-20). The older mcp-client-2025-04-04 header is deprecated.

The newer mcp-client-2026-09-15 header includes everything above and adds tool-list pinning. Anthropic: MCP connector

Verify the Connection

After setup, test the connection by asking your AI assistant:

"Check my LeadMagic credit balance"

If the server is connected, the AI will call the check_credit_balance tool and return your balance. This tool is free and confirms that authentication is working.

The Agent Release Kit includes runnable offline tests for enrichment workflows.

Install the Agent Skills

Skills teach your agent to use LeadMagic properly, including credit-free search within fair use, cursor pagination, credit safety, and enrichment workflows.

Claude Code users can install the LeadMagic plugin for company research and work email lookup, and Cursor users the Cursor plugin.

Or hand your AI the Guide for your AI: a single page it can read and act on.

Next Steps