Skip to main content
SendPilot hosts a Model Context Protocol (MCP) server that connects your AI assistant — Claude, OpenAI Codex, Gemini, Cursor, VS Code Copilot, or your own application — directly to the SendPilot documentation. Your assistant can look up endpoints, schemas, and webhook payloads in real time, so the integration code it writes against our API stays accurate.
Beta. This MCP server is in beta and currently provides documentation search and reading only. A full version that exposes the SendPilot API as callable tools — create campaigns, add leads, send messages, and more, all directly from your assistant — is coming soon. For now, your assistant reads the docs here and makes API calls itself using your key (see Making API calls).

What is the MCP server?

The Model Context Protocol is an open standard that lets AI assistants connect to external tools and knowledge. SendPilot hosts its MCP server at:
https://docs.sendpilot.ai/mcp
It uses streamable HTTP transport and exposes two documentation tools:
ToolWhat it does
search_send_pilot_apiSearches the docs and returns relevant snippets with titles and direct links
query_docs_filesystem_send_pilot_apiReads documentation pages directly (head, cat, rg, tree) for exact lookups
The MCP server is read-only: it searches and reads your documentation. It does not call the SendPilot API. Connecting requires no API key — see Making API calls for how your assistant actually runs requests.

Connect the MCP server

Pick your client below. Every client points at the same URL: https://docs.sendpilot.ai/mcp. No API key or header is needed to connect.
Run the following command in your terminal:
claude mcp add --transport http sendpilot https://docs.sendpilot.ai/mcp
Verify with claude mcp list, then start a session and ask Claude to search the SendPilot docs.

Verify the connection

Ask your assistant a question that requires the docs, for example:
“Using the SendPilot MCP, what’s the request body for creating a lead extractor campaign?”
If it returns the correct endpoint (POST /v1/lead-extractor/campaigns) with the name, urls, limit, url_type, and mode fields, the server is connected.

Making API calls

This is the part people get wrong, so it’s worth being explicit:
The MCP server only searches your docs — it never calls the SendPilot API. Putting your API key in the MCP config does nothing; the server ignores it. To let your assistant actually run API requests, give your key to the assistant’s environment, not the MCP server.
The two pieces work as separate channels:
  1. The MCP server teaches the assistant your API — it reads the docs to learn the right endpoint, fields, and auth.
  2. Your assistant then writes and runs the request itself (a script, curl, etc.), authenticating with an API key from its own runtime.
So the setup is:
1

Create an API key

In the SendPilot dashboard, go to Integrations → API Keys, click Create API Key, and copy the sp_live_... value.
Keys are shown once at creation. Store yours immediately.
2

Give the key to your assistant's environment

Set it as an environment variable wherever your assistant runs code — for example, in the terminal where you run Claude Code or Cursor:
export SENDPILOT_API_KEY=sp_live_...
Then your prompts can say “read my API key from SENDPILOT_API_KEY and the generated code will authenticate with the X-API-Key header. See Authentication for details.
Only give your API key to an assistant/environment you trust — that key can take real, billable actions (sending messages, spending credits). The key, not the MCP server, is the access boundary.

Use it in code

You don’t need a chat client — you can connect to the MCP server programmatically with the official MCP SDKs to build your own agents or tools on top of the SendPilot docs. No API key is needed to connect.
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({ name: "my-app", version: "1.0.0" });
const transport = new StreamableHTTPClientTransport(
  new URL("https://docs.sendpilot.ai/mcp"),
);

await client.connect(transport);

// List available tools
const { tools } = await client.listTools();
console.log(tools.map((t) => t.name));

// Search the SendPilot docs
const result = await client.callTool({
  name: "search_send_pilot_api",
  arguments: { query: "create a lead extractor campaign" },
});
console.log(result.content);

await client.close();
Install the SDKs with npm install @modelcontextprotocol/sdk (TypeScript) or pip install mcp (Python).

Scenarios & example prompts

Once the MCP server is connected (and your assistant has your API key in its environment), talk to it in plain language. The prompts below are copy-paste ready — they tell the assistant to use the SendPilot MCP so the output matches the current API.
“Use the SendPilot MCP to find the endpoint for creating a lead extractor campaign, then write a Node.js script that creates one from a LinkedIn people-search URL, polls the status endpoint until it completes, and prints the extracted leads. Read my API key from SENDPILOT_API_KEY.”
The assistant looks up POST /v1/lead-extractor/campaigns, the /status and /results endpoints, and the exact field names before writing code.
“Using the SendPilot MCP, list the available endpoint groups and give me a one-line summary of what each one is for.”
Great first prompt to understand campaigns, leads, inbox, lead database, lead extractor, and webhooks at a glance.
“Search the SendPilot docs for the reply.received webhook payload and generate a TypeScript interface for it. Include every field shown in the example payload.”
The assistant reads the webhook event page and produces types that match the real payload shape.
“Use the SendPilot MCP to find all fields returned by the lead extractor results endpoint, then map them to my HubSpot contact properties (first name, last name, company, job title, LinkedIn URL).”
Useful for building sync jobs without guessing field names.
“I’m getting a 401 from GET /v1/campaigns. Use the SendPilot MCP to look up the authentication requirements and tell me what’s wrong with this request: curl https://api.sendpilot.ai/v1/campaigns -H 'Authorization: Bearer abc'.”
The assistant finds that SendPilot expects an X-API-Key header, not a bearer token, and corrects the request.
“Write a Python function that adds a list of leads to a SendPilot campaign. Confirm the exact request body and required fields with the SendPilot MCP before writing the code.”
The assistant verifies POST /v1/leads (including the required campaignId) so the payload is correct the first time.
The pattern that works best: ask the assistant to “confirm the endpoint and request body with the SendPilot MCP before writing code.” This keeps generated integrations aligned with the live API instead of relying on the model’s memory.

Troubleshooting

Confirm the URL is exactly https://docs.sendpilot.ai/mcp and that your client supports HTTP-transport MCP servers. Remember Gemini uses httpUrl while Claude, Cursor, and VS Code use url. Restart the client after editing its config file.
The MCP server only searches docs — it doesn’t make API calls. Your assistant runs those itself, so make sure your API key is available in its environment (e.g. SENDPILOT_API_KEY), not in the MCP config. See Making API calls.
Check that the request sends an X-API-Key header with a valid sp_live_... key (SendPilot does not use bearer tokens). See Authentication → Error Responses.

Next steps

Authentication

API key best practices, scoping, and error handling

API Reference

Browse every available endpoint