---
title: "Connect Claude Code"
description: "Add the Openlead MCP server to Claude Code with one command, sign in once, and search for companies from your terminal."
canonical_url: "https://openlead.ai/docs/mcp/claude-code"
last_updated: "2026-11-25"
type: "how-to"
section: "Agents and API"
---

# Connect Claude Code

Add the Openlead MCP server to Claude Code with one command, sign in once, and search for companies from your terminal.

> [!NOTE]
> **There is no key to paste.** Claude Code signs in with your Openlead account the first time it connects, and works in one workspace you pick.

## Before you start

- An Openlead account. The Free plan includes 50 companies and 25 person unlocks a month, and your agent spends from the same balance as the app.
- Claude Code installed and signed in.

## 1. Add the server

Run this in a terminal:

```sh title="Terminal"
claude mcp add --transport http openlead https://mcp.openlead.ai
```

This adds a server named `openlead` to Claude Code. Nothing runs and nothing is spent yet.

## 2. Sign in and pick a workspace

Start Claude Code, type `/mcp` and choose openlead. A page opens in your browser:

1. Sign in with the six-digit code or the sign-in link we email you, as in the app. There is no password.
2. Pick the one workspace this agent may use. If you have only one, it is already picked.
3. Choose **Allow access**. Claude Code finishes connecting by itself.

_The agent works only in the workspace you pick: its companies, people, lists and searches._

## 3. Run your first search

Ask in plain words, the way you would in the app. For example:

```text title="Prompt"
Find 25 Shopify agencies in Germany with 10 to 50 people and save them to a list called Shopify DACH.
```

Nothing is spent until your agent calls the search with `confirm=true`. Here Claude Code asks for the estimate first, which is free, runs the search after your yes and saves the companies:

```transcript title="Claude Code"
● openlead · estimate_company_search
  Estimate: up to 25 companies from this month's 50. Nothing spent yet.

> Run the search? yes

● openlead · search_companies confirm=true
  Found 25 companies with 50 people. Credits charged: 0.
● openlead · save_to_list
  ✓ Saved 25 companies to the new list "Shopify DACH".
```

> [!WARNING]
> **Every spend needs a confirm.** The tools that can spend, `search_companies` and `unlock_people`, spend only when called with `confirm=true`. Without it they answer with what the call would use and spend nothing. Claude Code should ask you before it confirms.

## What your agent can do

| Tool | What it does | Cost |
|---|---|---|
| [`estimate_company_search`](https://openlead.ai/docs/mcp/tools#estimate_company_search) | Says what a search would find and use, without running it. | Free |
| [`search_companies`](https://openlead.ai/docs/mcp/tools#search_companies) | Finds companies from a description or a website. | Monthly companies, then credits |
| [`get_company_search`](https://openlead.ai/docs/mcp/tools#get_company_search) | Reads a search that is still running, or its result. | Free |
| [`list_people`](https://openlead.ai/docs/mcp/tools#list_people) | Lists the people your workspace already has at companies it found. | Free |
| [`find_people`](https://openlead.ai/docs/mcp/tools#find_people) | Finds up to 3 people per company by title, seniority, department or location. | Free, up to 100 companies a month on the Free plan |
| [`unlock_people`](https://openlead.ai/docs/mcp/tools#unlock_people) | Shows a Locked person's profile link, location and snippet. | The plan's monthly unlocks, then credits on paid plans |
| [`check_contact_status`](https://openlead.ai/docs/mcp/tools#check_contact_status) | Whether your workspace already contacted or exported someone. | Free |
| [`save_to_list`](https://openlead.ai/docs/mcp/tools#save_to_list) | Saves companies or people to a list, new or existing. | Free |
| [`export_list`](https://openlead.ai/docs/mcp/tools#export_list) | Hands back a download link for a list as a CSV file. | Free |
| [`credit_balance`](https://openlead.ai/docs/mcp/tools#credit_balance) | Your plan, the companies and person unlocks left this month, and your credits. | Free |

Tools that only read are marked read-only, so your client can run them without asking: `estimate_company_search`, `get_company_search`, `list_people`, `check_contact_status` and `credit_balance`. The others are marked as changing your workspace, so your client can ask you first.

Every parameter, with an example call for each tool, is in the [tools reference](https://openlead.ai/docs/mcp/tools).

## Limits

- A search finds 25 companies unless your agent asks for more, up to 500 or what your balance covers, whichever is less.
- A long search hands back after about 50 seconds with a `search_id`. `get_company_search` reads it with that id, for free.
- Each connected agent can make 30 calls a minute, with one search or people lookup running at a time. A call over the limit is refused with a note saying when to try again.
- An agent left unused for 30 days asks you to sign in again.

## Troubleshooting

### Claude Code can't reach the server

`claude mcp list` shows openlead as "Failed to connect", often with ENOTFOUND. Your computer can't find or reach `mcp.openlead.ai`, which usually means a VPN, a company network or a DNS filter is in the way. Turn the VPN off or switch to another VPN server, then try again. On a company network or behind a DNS filter, ask whoever runs it to allow `mcp.openlead.ai`.

### Claude Code says openlead needs sign-in

Type `/mcp`, choose openlead and finish the sign-in in your browser. When the browser says you can close the tab, go back to Claude Code.

### The sign-in page says the request has expired

A connection request lasts 30 minutes and works once. Start connecting again from your client, and it opens a new one.

### I picked the wrong workspace

Connect again and pick the other one. To remove the old connection, revoke it under Connected agents in the workspace's sidebar.

### A call was refused

Each connected agent can make 30 calls a minute, with one search or people lookup running at a time. A call over the limit is refused with a note saying when to try again.
