Skip to content

Commit 44c36e1

Browse files
Chris Garberclaude
authored andcommitted
docs: lead the MCP server page with the hosted connection
Make connecting to the hosted Streamable HTTP server the primary path and running the server locally the secondary one. Fold the duplicate "Integration Options" and custom-client sections into "Run the server locally" and "Use the server from your own code", mention the deprecated SSE endpoint only in the migration note, and list docs search among the core tools. Reword the CLI overview bullet to "Turn your agent into a Vapi expert". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent abda944 commit 44c36e1

2 files changed

Lines changed: 99 additions & 156 deletions

File tree

‎fern/cli/overview.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Vapi CLI is the official command-line interface that brings world-class deve
1313
- Initialize Vapi in existing projects
1414
- Manage assistants, phone numbers, and calls from your terminal
1515
- Forward webhooks to your local development server
16-
- Turn your IDE into a Vapi expert with MCP integration
16+
- Turn your agent into a Vapi expert with the [Vapi MCP server](/sdk/mcp-server)
1717

1818
## Installation
1919

‎fern/sdk/mcp-server.mdx‎

Lines changed: 98 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
---
22
title: Vapi MCP Server
3-
subtitle: Connect Vapi to AI assistants with Model Context Protocol (MCP)
3+
subtitle: Connect your coding agent to Vapi with Model Context Protocol (MCP)
44
slug: sdk/mcp-server
5-
description: Use the Vapi MCP Server to expose Vapi APIs as tools over the Model Context Protocol, managing assistants, phone numbers, and calls from any MCP client.
5+
description: Connect Codex, Claude Code, Cursor, VS Code, or Claude Desktop to the hosted Vapi MCP server to search Vapi documentation and manage assistants, phone numbers, and calls.
66
---
77

88
## Overview
99

10-
The **Vapi MCP Server** exposes Vapi APIs as tools via the Model Context Protocol (MCP), so you can manage assistants, phone numbers, and calls from any MCP-compatible AI assistant (like Claude Desktop) or agent framework.
10+
The **Vapi MCP Server** gives AI agents Vapi tools over the Model Context Protocol (MCP). Once connected, your agent can search Vapi's documentation and manage your assistants, phone numbers, and calls.
1111

12-
Use this server to connect your AI workflows to real-world telephony, automate voice tasks, and build richer conversational agents.
12+
Vapi hosts the server at `https://mcp.vapi.ai/mcp`, using the **Streamable HTTP** transport. Add it in your agent's MCP settings; you don't need the Vapi CLI. You can also [run the server locally](#run-the-server-locally).
1313

1414
<Note>
15-
Looking to use MCP tools *inside* a Vapi assistant? See the [MCP Tool documentation](/tools/mcp) for integrating *external* MCP servers with your Vapi agents.
15+
Looking to use MCP tools *inside* a Vapi assistant? See [MCP tools](/tools/mcp).
1616
</Note>
1717

18-
<Tip>
19-
Connect your coding agent directly to the hosted MCP server using its native MCP settings. The Vapi CLI is not required. For public agent skills and installation instructions, see [VapiAI/skills](https://github.com/VapiAI/skills).
20-
</Tip>
21-
22-
<Note>
23-
If an earlier CLI release configured `@vapi-ai/mcp-docs-server` in your agent, replace that legacy entry with the hosted connection below. Existing agent configurations are not removed automatically.
24-
</Note>
25-
26-
Use **Streamable HTTP** at `https://mcp.vapi.ai/mcp` for remote connections. The legacy HTTP+SSE transport is deprecated; migrate existing remote configurations to this endpoint.
27-
2818
## Connect your agent
2919

30-
Get a [Vapi API key](/security-and-privacy/api-keys), then choose your client. These connections use the hosted server; you do not need to install the Vapi CLI or run a Vapi MCP server locally.
20+
Get a [Vapi API key](/security-and-privacy/api-keys), then choose your agent.
3121

3222
<Tabs>
3323
<Tab title="Codex">
@@ -121,12 +111,12 @@ Get a [Vapi API key](/security-and-privacy/api-keys), then choose your client. T
121111
}
122112
```
123113

124-
Start `vapi` from **MCP: List Servers** and enter your API key when prompted. Use a **Local** chat session and enable its tools. VS Code does not forward servers that use input prompts to Copilot harness sessions.
114+
Start `vapi` from **MCP: List Servers** and enter your API key when prompted. Then use a **Local** chat session and enable the server's tools. Other session types can't prompt for the key, so this server isn't available in them.
125115

126116
See [VS Code MCP setup](https://code.visualstudio.com/docs/agents/reference/mcp-configuration).
127117
</Tab>
128118
<Tab title="Claude Desktop">
129-
To connect through Claude Desktop's local stdio configuration, use `mcp-remote` as a bridge to the hosted server. This option requires Node.js and `npx` to be available to Claude Desktop.
119+
Claude Desktop's configuration file runs local commands, so use `mcp-remote` as a bridge to the hosted server. This requires Node.js and `npx` to be available to Claude Desktop.
130120

131121
Open **Settings → Developer → Edit Config**. Add this entry to `claude_desktop_config.json`, preserving any other servers:
132122

@@ -152,20 +142,49 @@ Get a [Vapi API key](/security-and-privacy/api-keys), then choose your client. T
152142
}
153143
```
154144

155-
Replace `YOUR_VAPI_API_KEY` with your Vapi API key and restart Claude Desktop. Keep this configuration private and update the key after rotating it. This starts a local adapter; Vapi's MCP server stays hosted.
145+
Replace `YOUR_VAPI_API_KEY` with your Vapi API key and restart Claude Desktop. Keep this configuration private and update the key after rotating it. The bridge runs locally; Vapi's MCP server stays hosted.
156146
</Tab>
157147
</Tabs>
158148

159149
Once connected, try asking your agent: "List my Vapi assistants."
160150

161-
---
151+
<Note>
152+
**Replacing an older setup?** If your agent uses `@vapi-ai/mcp-docs-server` from an earlier CLI release, or the deprecated `https://mcp.vapi.ai/sse` endpoint, replace that entry with the hosted connection above. The hosted server includes documentation search. Existing agent configurations are not changed automatically.
153+
</Note>
162154

163-
## Core Tools
155+
## Run the server locally
164156

165-
The Vapi MCP Server exposes these actions as MCP tools:
157+
You can run the open-source [Vapi MCP server](https://github.com/VapiAI/mcp-server) on your own machine instead of connecting to the hosted one, for example to develop against it. This requires Node.js. Your client starts the server as a subprocess and talks to it over stdio, so no HTTP endpoint is started.
158+
159+
Add this entry to your client's MCP configuration in place of the hosted connection. The local server reads your API key from `VAPI_TOKEN`:
160+
161+
```json
162+
{
163+
"mcpServers": {
164+
"vapi": {
165+
"command": "npx",
166+
"args": ["-y", "@vapi-ai/mcp-server"],
167+
"env": {
168+
"VAPI_TOKEN": "YOUR_VAPI_API_KEY"
169+
}
170+
}
171+
}
172+
}
173+
```
166174

167-
| Tool | Description | Example Usage |
175+
In Claude Code, run:
176+
177+
```bash
178+
claude mcp add -e VAPI_TOKEN=YOUR_VAPI_API_KEY vapi -- npx -y @vapi-ai/mcp-server
179+
```
180+
181+
## Core tools
182+
183+
The Vapi MCP Server exposes these tools:
184+
185+
| Tool | Description | Example usage |
168186
|------------------------|--------------------------------------------------|-----------------------------------------------|
187+
| `ask_vapi_docs` | Search Vapi documentation | Ask how a Vapi feature works |
169188
| `list_assistants` | List all Vapi assistants | Show all configured assistants |
170189
| `create_assistant` | Create a new Vapi assistant | Add a new assistant for a use case |
171190
| `get_assistant` | Get a Vapi assistant by ID | View assistant config |
@@ -177,136 +196,61 @@ The Vapi MCP Server exposes these actions as MCP tools:
177196
| `list_tools` | List all available Vapi tools | Tool discovery |
178197
| `get_tool` | Get details of a specific tool | Tool integration info |
179198

180-
<Note>
181-
<b>Scheduling calls:</b> The <code>create_call</code> action supports scheduling with the optional <code>scheduledAt</code> parameter.
182-
</Note>
199+
To schedule a call, pass the optional `scheduledAt` parameter to `create_call`. `create_call` places a real phone call.
183200

184-
---
201+
## Use the server from your own code
185202

186-
## Integration Options
203+
Connect any MCP client to `https://mcp.vapi.ai/mcp` over Streamable HTTP, and send your Vapi API key in the `Authorization: Bearer YOUR_VAPI_API_KEY` header.
187204

188-
<Tabs>
189-
<Tab title="Remote (Streamable HTTP)">
190-
Connect to the Vapi-hosted MCP server using the Streamable HTTP protocol.
191-
<Note>
192-
Recommended for most production use cases.
193-
</Note>
194-
<Warning>
195-
Use this for clients or SDKs that support Streamable HTTP transport.
196-
</Warning>
197-
198-
- **Endpoint:** `https://mcp.vapi.ai/mcp`
199-
- **Authentication:** Pass your Vapi API key as a bearer token:
200-
<br/><code>Authorization: Bearer YOUR_VAPI_API_KEY</code>
201-
202-
Configure the URL and authentication header directly in clients with remote MCP support. For a client that needs a local stdio adapter, use the [Claude Desktop tab](#connect-your-agent) above.
203-
</Tab>
204-
<Tab title="OpenAI responses API">
205-
<Note>
206-
The OpenAI <code>responses</code> API now supports MCP. <a href="https://platform.openai.com/docs/guides/tools-remote-mcp#page-top" target="_blank" rel="noopener">Read more here</a>.
207-
</Note>
208-
<CodeBlocks>
209-
```typescript title="typescript"
210-
import OpenAI from 'openai';
211-
// Replace with your actual OpenAI API key
212-
const openai = new OpenAI({ apiKey: 'YOUR_OPENAI_API_KEY' });
213-
async function main() {
214-
const response = await openai.responses.create({
215-
model: 'gpt-4.1',
216-
tools: [
217-
{
218-
type: 'mcp',
219-
server_label: 'vapi-mcp',
220-
server_url: 'https://mcp.vapi.ai/mcp',
221-
headers: { "Authorization": "Bearer YOUR_VAPI_API_KEY" }
222-
},
223-
],
224-
input: 'What vapi tools do you have available?',
225-
});
226-
console.dir(response, { depth: null });
227-
}
228-
main();
229-
```
230-
```python title="python"
231-
import openai
232-
# Replace with your actual OpenAI API key
233-
openai.api_key = 'YOUR_OPENAI_API_KEY'
234-
response = openai.responses.create(
235-
model="gpt-4.1",
236-
tools=[
237-
{
238-
"type": "mcp",
239-
"server_label": "vapi-mcp",
240-
"server_url": "https://mcp.vapi.ai/mcp",
241-
"headers": {"Authorization": "Bearer YOUR_VAPI_API_KEY"}
242-
},
243-
],
244-
input="What vapi tools do you have available?",
245-
)
246-
print(response)
247-
```
248-
</CodeBlocks>
249-
</Tab>
250-
<Tab title="Local">
251-
Run the MCP server on your own machine for development or testing.
252-
253-
- **Start locally:**
254-
```bash
255-
npx -y @vapi-ai/mcp-server
256-
```
257-
- **Authentication:** Set the `VAPI_TOKEN` environment variable to your API key.
258-
259-
Example config for Claude:
260-
```json
261-
{
262-
"mcpServers": {
263-
"vapi-mcp-server": {
264-
"command": "npx",
265-
"args": [
266-
"-y",
267-
"@vapi-ai/mcp-server"
268-
],
269-
"env": {
270-
"VAPI_TOKEN": "YOUR_VAPI_API_KEY"
271-
}
272-
}
273-
}
274-
}
275-
```
276-
<Warning>
277-
Use this for clients or SDKs that support local command-based MCP servers.
278-
</Warning>
279-
280-
The client launches this server as a subprocess and communicates over **stdio**. This configuration does not start an HTTP endpoint.
281-
</Tab>
282-
</Tabs>
205+
### OpenAI Responses API
283206

284-
---
207+
The OpenAI Responses API can call remote MCP servers. See [OpenAI's remote MCP guide](https://platform.openai.com/docs/guides/tools-remote-mcp).
285208

286-
## Custom MCP Client Integration
287-
288-
You can use any MCP-compatible client (SDKs available for multiple languages).
289-
290-
<Steps>
291-
<Step title="Install an MCP client SDK">
292-
Choose a language:
293-
- [TypeScript](https://github.com/modelcontextprotocol/typescript-sdk)
294-
- [Python](https://github.com/modelcontextprotocol/python-sdk)
295-
- [Java](https://github.com/modelcontextprotocol/java-sdk)
296-
- [Kotlin](https://github.com/modelcontextprotocol/kotlin-sdk)
297-
- [C#](https://github.com/modelcontextprotocol/csharp-sdk)
298-
</Step>
299-
<Step title="Configure your connection">
300-
Set up your SDK to connect to <code>https://mcp.vapi.ai/mcp</code> using **Streamable HTTP** and authenticate with your Vapi API key in the <code>Authorization: Bearer YOUR_VAPI_API_KEY</code> header.
301-
</Step>
302-
<Step title="Use MCP tools">
303-
Query available tools, list assistants, create calls, etc, via your SDK.
304-
</Step>
305-
</Steps>
209+
<CodeBlocks>
210+
```typescript title="typescript"
211+
import OpenAI from 'openai';
212+
// Replace with your actual OpenAI API key
213+
const openai = new OpenAI({ apiKey: 'YOUR_OPENAI_API_KEY' });
214+
async function main() {
215+
const response = await openai.responses.create({
216+
model: 'gpt-4.1',
217+
tools: [
218+
{
219+
type: 'mcp',
220+
server_label: 'vapi-mcp',
221+
server_url: 'https://mcp.vapi.ai/mcp',
222+
headers: { "Authorization": "Bearer YOUR_VAPI_API_KEY" }
223+
},
224+
],
225+
input: 'What vapi tools do you have available?',
226+
});
227+
console.dir(response, { depth: null });
228+
}
229+
main();
230+
```
231+
```python title="python"
232+
import openai
233+
# Replace with your actual OpenAI API key
234+
openai.api_key = 'YOUR_OPENAI_API_KEY'
235+
response = openai.responses.create(
236+
model="gpt-4.1",
237+
tools=[
238+
{
239+
"type": "mcp",
240+
"server_label": "vapi-mcp",
241+
"server_url": "https://mcp.vapi.ai/mcp",
242+
"headers": {"Authorization": "Bearer YOUR_VAPI_API_KEY"}
243+
},
244+
],
245+
input="What vapi tools do you have available?",
246+
)
247+
print(response)
248+
```
249+
</CodeBlocks>
306250

307-
---
251+
### MCP client SDKs
308252

309-
### Example: Build a client with Node.js
253+
Official MCP SDKs are available for [TypeScript](https://github.com/modelcontextprotocol/typescript-sdk), [Python](https://github.com/modelcontextprotocol/python-sdk), [Java](https://github.com/modelcontextprotocol/java-sdk), [Kotlin](https://github.com/modelcontextprotocol/kotlin-sdk), and [C#](https://github.com/modelcontextprotocol/csharp-sdk). This minimal Node.js client lists your assistants:
310254

311255
```javascript
312256
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
@@ -318,7 +262,7 @@ dotenv.config();
318262
const mcpClient = new Client({ name: 'vapi-client', version: '1.0.0' });
319263
const transport = new StreamableHTTPClientTransport(
320264
new URL('https://mcp.vapi.ai/mcp'),
321-
{ requestInit: { headers: { Authorization: `Bearer ${process.env.VAPI_TOKEN}` } } }
265+
{ requestInit: { headers: { Authorization: `Bearer ${process.env.VAPI_API_KEY}` } } }
322266
);
323267

324268
async function main() {
@@ -331,7 +275,7 @@ async function main() {
331275
main();
332276
```
333277

334-
### Detailed example: Build a client with Node.js
278+
This fuller example lists tools, assistants, and phone numbers, then creates a call:
335279

336280
```javascript
337281
#!/usr/bin/env node
@@ -343,8 +287,8 @@ import dotenv from 'dotenv';
343287
dotenv.config();
344288

345289
// Ensure API key is available
346-
if (!process.env.VAPI_TOKEN) {
347-
console.error('Error: VAPI_TOKEN environment variable is required');
290+
if (!process.env.VAPI_API_KEY) {
291+
console.error('Error: VAPI_API_KEY environment variable is required');
348292
process.exit(1);
349293
}
350294

@@ -358,7 +302,7 @@ async function main() {
358302
// Create Streamable HTTP transport for connection to remote Vapi MCP server
359303
const serverUrl = 'https://mcp.vapi.ai/mcp';
360304
const headers = {
361-
Authorization: `Bearer ${process.env.VAPI_TOKEN}`,
305+
Authorization: `Bearer ${process.env.VAPI_API_KEY}`,
362306
};
363307
const options = {
364308
requestInit: { headers: headers },
@@ -461,14 +405,13 @@ async function main() {
461405
main();
462406
```
463407
464-
<Note> For more detailed examples and complete client implementations, see the [MCP Client Quickstart](https://modelcontextprotocol.io/quickstart/client). </Note>
465-
466408
## References
467409
468-
- [Github repo](https://github.com/VapiAI/mcp-server)
410+
- [Vapi MCP server on GitHub](https://github.com/VapiAI/mcp-server)
411+
- [Vapi agent skills](https://github.com/VapiAI/skills)
469412
- [Model Context Protocol docs](https://modelcontextprotocol.io)
470-
- [Vapi dashboard](https://dashboard.vapi.ai)
471413
- [MCP client quickstart](https://modelcontextprotocol.io/quickstart/client)
414+
- [Vapi dashboard](https://dashboard.vapi.ai)
472415
473416
<CardGroup cols={2}>
474417
<Card title="Need help?" icon="question-circle" href="https://discord.gg/v5Ee6FhAZt">

0 commit comments

Comments
 (0)