> ## Documentation Index
> Fetch the complete documentation index at: https://api.smartlead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect Claude, ChatGPT, Cursor, Codex and other AI apps to Smartlead with the Smartlead MCP server

The Smartlead MCP server lets AI apps and agents work in your Smartlead account through the [Model Context Protocol](https://modelcontextprotocol.io). Your AI app can create and launch campaigns, add leads, read analytics, work the Master Inbox, run Smart Delivery inbox placement tests and search Smart Prospect, using the same data and permissions as your API key.

## Endpoint

| | |
| - | - |
| URL | `https://mcp.smartlead.ai/mcp` |
| Transport | Streamable HTTP (`POST` only; a `GET` returns `405`) |
| Auth | OAuth 2.1, or `Authorization: Bearer <your Smartlead API key>` |
| Tools | 185 (see [MCP Tools](https://api.smartlead.ai/mcp/tools.md)) |

There is nothing to install: it is a hosted, remote server. Copy-paste setup for each app is on [Set up your AI app](https://api.smartlead.ai/mcp/setup.md).

## Authentication

Choose one of two ways to sign in. Both act as your Smartlead account.

### OAuth (AI apps such as Claude and ChatGPT)

Add the server URL to your app and sign in to Smartlead when the app asks. You do not paste an API key anywhere.

* OAuth 2.1 authorization code flow with PKCE (`S256`) and dynamic client registration. Clients are public (no client secret).
* Discovery documents: `https://mcp.smartlead.ai/.well-known/oauth-protected-resource` and `https://mcp.smartlead.ai/.well-known/oauth-authorization-server`.
* When you approve the connection, Smartlead creates an API key named `MCP: <app name> (...)` on your account. It is listed with your other API keys; delete it there to disconnect the app.

### API key in a header (Claude Code, Cursor, Codex, scripts and agents)

Send your Smartlead API key as a bearer token on every request:

```http theme={null}
Authorization: Bearer YOUR_SMARTLEAD_API_KEY
```

> [!WARNING]
>
> On `/mcp`, the API key works **only** in the `Authorization: Bearer` header. A `?user_api_key=` query parameter or an `X-API-Key` header is ignored, and the request gets `401` with a `WWW-Authenticate` header that starts the OAuth sign-in instead.

Keep the key out of files you share or commit: read it from an environment variable where your app supports that (examples on the [setup page](https://api.smartlead.ai/mcp/setup.md)).

## What agents can do

| Area | Examples |
| - | - |
| Campaigns | Create a campaign, write its email sequence, attach mailboxes, set the schedule and settings, start, pause or stop it |
| Leads | Add up to 1,000 leads per call, look up a lead, update its category, pause or resume it, unsubscribe it |
| Analytics | Campaign and account statistics, day-wise stats, mailbox health, reply and category breakdowns |
| Email accounts | List mailboxes, update their settings and warmup, tag them, check domain deliverability |
| Master Inbox | Read replies, mark read, set reminders, add notes and tasks, reply to or forward a thread |
| Smart Delivery | Inbox placement tests: list tests and runs, read placement reports, create, pause or resume tests |
| Smart Prospect | Search the contact database, save searches, reveal emails |

The server also gives your AI app [instructions](https://api.smartlead.ai/mcp/tools.md#create-and-launch-a-campaign-the-recommended-order) for the right order to create and launch a campaign.

## Safety: what sends email or spends credits

Every tool is annotated as read-only or not, destructive or not, and whether it reaches outside your account, so apps that support MCP annotations ask you before running anything that changes data. The [tools page](https://api.smartlead.ai/mcp/tools.md) marks each tool. Pay attention to these:

* **Sends email to real people:** replying to or forwarding a Master Inbox thread, pushing a lead to a subsequence, resuming a paused lead, and starting a campaign (`update_campaign_status` with `START`). Adding leads to a campaign that is already running also means those leads start getting emails.
* **Sends test email and uses Smart Delivery run credits:** `sd_create_test` and `sd_resume_test`.
* **Uses Smart Prospect credits:** `sp_fetch_contacts` and `sp_find_emails`. Searching (`sp_search_contacts`) is free.
* **`START` does not check that a campaign is ready.** It only checks that a schedule exists. A campaign with no sequence, mailboxes or leads starts and then sends nothing. Ask your agent to confirm the sequence, mailboxes and leads first.
* **Saving a sequence replaces it.** `save_campaign_sequences` deletes any existing step that is not included in the call.

Tools that take or return passwords or API keys (adding SMTP or OAuth mailboxes, creating clients, managing client API keys) are not offered on `/mcp`. Do those in the Smartlead app.

> [!NOTE]
>
> Tool calls go through the Smartlead API, so they count toward your account's API rate limit (200 requests per minute by default). See [Rate Limits](https://api.smartlead.ai/guides/rate-limits.md).

## Legacy SSE endpoint (not recommended)

An older endpoint still works for existing setups:

```text theme={null}
https://mcp.smartlead.ai/sse?user_api_key=YOUR_SMARTLEAD_API_KEY
```

Do not use it for new setups:

* The API key is part of the URL, so it ends up in config files, logs and screenshots.
* It uses the older HTTP+SSE transport, which the MCP specification has deprecated in favour of Streamable HTTP.
* It also offers the credential tools that `/mcp` leaves out.

Move to `https://mcp.smartlead.ai/mcp` with OAuth or an `Authorization: Bearer` header.

## Next steps

> [card] [Set up your AI app](https://api.smartlead.ai/mcp/setup.md)
>
> Claude, ChatGPT, Cursor, Codex and Grok

> [card] [MCP Tools](https://api.smartlead.ai/mcp/tools.md)
>
> All 185 tools and what each one changes


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.