From 4bf2dfa28521e2f16873e742c61e46e3f3447cc6 Mon Sep 17 00:00:00 2001 From: Chris Garber Date: Fri, 6 Nov 2026 16:38:10 -0500 Subject: [PATCH 1/4] docs: recommend v2 MCP setup and public agent skills --- fern/cli/mcp-integration.mdx | 421 +++++++---------------------------- fern/cli/overview.mdx | 7 +- fern/sdk/mcp-server.mdx | 248 ++------------------- fern/tools/mcp.mdx | 4 +- fern/tools/mcp/configure.mdx | 11 +- 5 files changed, 112 insertions(+), 579 deletions(-) diff --git a/fern/cli/mcp-integration.mdx b/fern/cli/mcp-integration.mdx index b19bb985f..a2fcd8d7d 100644 --- a/fern/cli/mcp-integration.mdx +++ b/fern/cli/mcp-integration.mdx @@ -1,394 +1,133 @@ --- title: MCP integration -description: Turn your IDE into a Vapi expert with Model Context Protocol +description: Set up the Vapi v2 MCP server and public agent skills slug: cli/mcp --- -## Overview +## Choose an integration -The Model Context Protocol (MCP) integration transforms your IDE's AI assistant into a Vapi expert. Once configured, your IDE gains complete, accurate knowledge of Vapi's APIs, features, and best practices - eliminating AI hallucinations and outdated information. +The CLI provides setup commands for the v2 MCP connection and public agent skills: -**In this guide, you'll learn to:** -- Set up MCP in supported IDEs -- Understand what knowledge is provided -- Use your enhanced IDE effectively -- Troubleshoot common issues +| Command | What it sets up | Authentication | +| --- | --- | --- | +| `vapi mcp setup` | The Vapi **v2 API MCP server**, for managing assistants, calls, phone numbers, and other resources | Your current Vapi API key | +| `vapi skills setup` | Public **agent skills** from `VapiAI/skills`, installed for your coding agent | No API key to install | -## Quick start + + This command layout requires the CLI release containing the MCP setup update. Earlier releases use `vapi mcp setup` to configure the local `@vapi-ai/mcp-docs-server`. See [Migrate existing setup](#migrate-existing-setup). + -Run the setup command to auto-configure all supported IDEs: +## Set up API tools + +Install the [Vapi CLI](/cli) and Node.js with npm, then sign in and configure your IDE: ```bash +vapi login vapi mcp setup ``` -Or configure a specific IDE: +The command detects supported IDEs and prompts you to select which ones to configure. To configure one directly: ```bash -vapi mcp setup cursor # For Cursor -vapi mcp setup windsurf # For Windsurf -vapi mcp setup vscode # For VSCode with Copilot +vapi mcp setup cursor +vapi mcp setup windsurf +vapi mcp setup vscode ``` -## What is MCP? - -Model Context Protocol is a standard that allows AI assistants to access structured knowledge and tools. When you set up MCP for Vapi: - -- Your IDE's AI gains access to complete Vapi documentation -- Code suggestions become accurate and up-to-date -- Examples use real, working Vapi patterns -- API hallucinations are eliminated - -## Supported IDEs - - - - AI-first code editor with deep MCP integration - - **Setup:** Creates `.cursor/mcp.json` - - - Codeium's AI-powered IDE - - **Setup:** Creates `.windsurf/mcp.json` - - - With GitHub Copilot extension - - **Setup:** Configures Copilot settings - - - -## How it works - -### What gets configured - -The MCP setup creates configuration files that connect your IDE to the Vapi MCP server: - - - - **File:** `.cursor/mcp.json` - ```json - { - "servers": { - "vapi-docs": { - "command": "npx", - "args": ["@vapi-ai/mcp-server"] - } - } - } - ``` - - - **File:** `.windsurf/mcp.json` - ```json - { - "servers": { - "vapi-docs": { - "command": "npx", - "args": ["@vapi-ai/mcp-server"] - } - } - } - ``` - - - **Settings:** Updates workspace settings - ```json - { - "github.copilot.advanced": { - "mcp.servers": { - "vapi-docs": { - "command": "npx", - "args": ["@vapi-ai/mcp-server"] - } - } - } - } - ``` - - - -### What knowledge is provided - -Your IDE gains access to: - -- **Complete API Reference** - Every endpoint, parameter, and response -- **Code Examples** - Working samples for all features -- **Integration Guides** - Step-by-step implementation patterns -- **Best Practices** - Recommended approaches and patterns -- **Latest Features** - Always up-to-date with new releases -- **Troubleshooting** - Common issues and solutions - -## Using your enhanced IDE - -### Example prompts - -Once MCP is configured, try these prompts in your IDE: - - - - **Prompt:** "How do I create a voice assistant with Vapi?" - - Your IDE will provide accurate code like: - ```typescript - import { VapiClient } from "@vapi-ai/server-sdk"; - - const client = new VapiClient({ token: process.env.VAPI_API_KEY }); - - const assistant = await client.assistants.create({ - name: "Customer Support", - model: { - provider: "openai", - model: "gpt-4", - systemPrompt: "You are a helpful customer support agent..." - }, - voice: { - provider: "11labs", - voiceId: "rachel" - } - }); - ``` - - - - **Prompt:** "Show me how to handle Vapi webhooks" - - Get complete webhook examples: - ```typescript - app.post('/webhook', async (req, res) => { - const { type, call, assistant } = req.body; - - switch (type) { - case 'call-started': - console.log(`Call ${call.id} started`); - break; - case 'speech-update': - console.log(`User said: ${req.body.transcript}`); - break; - case 'function-call': - // Handle tool calls - const { functionName, parameters } = req.body.functionCall; - const result = await handleFunction(functionName, parameters); - res.json({ result }); - return; - } - - res.status(200).send(); - }); - ``` - - - - **Prompt:** "How do I set up call recording with custom storage?" - - Get detailed implementation: - ```typescript - const assistant = await client.assistants.create({ - name: "Recorded Assistant", - recordingEnabled: true, - artifactPlan: { - recordingEnabled: true, - videoRecordingEnabled: false, - recordingPath: "s3://my-bucket/recordings/{call_id}" - }, - credentialIds: ["aws-s3-credential-id"] - }); - ``` - - - -### Best practices - - - - Ask detailed questions about Vapi features: - - ✅ "How do I transfer calls to a human agent in Vapi?" - - ❌ "How do I transfer calls?" - - - - Ask for working code samples: - - "Show me a complete example of..." - - "Generate a working implementation of..." - - - - Specify SDK versions when needed: - - "Using @vapi-ai/web v2.0, how do I..." - - "What's the latest way to..." - - - -## Configuration options - -### Check status - -View current MCP configuration: +The CLI adds a server named `vapi` that connects to `https://mcp-v2.vapi.ai/api/mcp` using **Streamable HTTP**. It reads your current API key from CLI configuration, `VAPI_API_KEY`, or an explicit `--api-key` flag, and stores it in the user MCP configuration. Keep this file private; on POSIX systems setup writes it with mode `0600`. Re-run setup after changing accounts or rotating the key. -```bash -vapi mcp status -``` +Restart your IDE, enable the `vapi` server in its MCP settings, and start a new chat. See the [Vapi MCP Server guide](/sdk/mcp-server) for available API tools. -Output: -```text -MCP Configuration Status: -✓ Cursor: Configured (.cursor/mcp.json) -✗ Windsurf: Not configured -✓ VSCode: Configured (workspace settings) +### Documentation through the same connection -Vapi MCP Server: v1.2.3 (latest) -``` +Documentation search is planned through the v2 MCP server, which will proxy requests to the documentation backend. The CLI configures the v2 connection; no separate documentation MCP connection is needed. Tool availability depends on the deployed v2 server. -### Update server +Install public agent skills separately for your agent's native discovery and activation behavior. -Keep the MCP server updated: +## Install public agent skills ```bash -# Update to latest version -npm update -g @vapi-ai/mcp-server - -# Or reinstall -npm install -g @vapi-ai/mcp-server@latest +vapi skills setup ``` -### Remove configuration +This runs `npx -y skills add VapiAI/skills`. The installer lets you choose skills and coding agents. It installs into the current project by default; use `--global` for user-wide installation. Node.js **22.20 or later** with npm is required. -Remove MCP configuration: +Installer options are forwarded: ```bash -# Remove from all IDEs -vapi mcp remove - -# Remove from specific IDE -vapi mcp remove cursor +vapi skills setup --agent cursor --skill create-assistant +vapi skills setup --global --agent claude-code --yes ``` -## How MCP tools work - -The Vapi MCP server provides these tools to your IDE: - - - - Semantic search across all Vapi docs - - **Example:** "How to handle voicemail detection" - - - Retrieve code samples for any feature - - **Example:** "WebSocket connection example" - - - Get detailed API endpoint information - - **Example:** "POST /assistant parameters" - - - Step-by-step guides for complex features - - **Example:** "Function tool implementation guide" - - - -## Troubleshooting - - - - If your IDE isn't using the MCP knowledge: - - 1. **Restart your IDE** after configuration - 2. **Check the logs** in your IDE's output panel - 3. **Verify npm is accessible** from your IDE - 4. **Ensure MCP server is installed** globally - - ```bash - # Verify installation - npm list -g @vapi-ai/mcp-server - ``` - - - - For permission issues: - - ```bash - # Install with proper permissions - sudo npm install -g @vapi-ai/mcp-server - - # Or use a Node version manager - nvm use 18 - npm install -g @vapi-ai/mcp-server - ``` - - - - If you're getting old API information: - - 1. Update the MCP server: - ```bash - npm update -g @vapi-ai/mcp-server - ``` - - 2. Clear your IDE's cache - 3. Restart the IDE - - - - For different projects needing different configs: - - - MCP configuration is per-workspace - - Run `vapi mcp setup` in each project - - Configuration won't conflict between projects - - - -## Advanced usage - -### Custom MCP configuration - -Modify the generated MCP configuration for advanced needs: +This installs skill files; it does not configure an MCP server. See the [public skills repository](https://github.com/VapiAI/skills) for workflows and agent support. + +## What MCP setup writes + +`vapi mcp setup` uses `mcp-remote` as a local stdio adapter to the hosted server. The remote connection is restricted to **Streamable HTTP** with `--transport http-only`; legacy SSE fallback is disabled. Node.js and `npx` must be available to your IDE. + +Setup creates or updates the `vapi` entry and preserves unrelated settings. + +| IDE | User configuration file | +| --- | --- | +| Cursor | `~/.cursor/mcp.json` | +| Windsurf | `~/.codeium/windsurf/mcp_config.json` | +| VS Code on macOS | `~/Library/Application Support/Code/User/mcp.json` | +| VS Code on Linux | `$XDG_CONFIG_HOME/Code/User/mcp.json`, defaulting to `~/.config/Code/User/mcp.json` | +| VS Code on Windows | `%APPDATA%/Code/User/mcp.json` | + +`~` represents your home directory. MCP setup is per user; skills installation is per project unless you pass `--global`. + +### Example: Cursor API configuration ```json { - "servers": { - "vapi-docs": { + "mcpServers": { + "vapi": { "command": "npx", - "args": ["@vapi-ai/mcp-server"], + "args": [ + "-y", + "mcp-remote", + "https://mcp-v2.vapi.ai/api/mcp", + "--transport", + "http-only", + "--header", + "Authorization: Bearer ${VAPI_API_KEY}" + ], "env": { - "VAPI_MCP_LOG_LEVEL": "debug" + "VAPI_API_KEY": "YOUR_VAPI_API_KEY" } } } } ``` -### Using with teams - -Share MCP configuration with your team: +Windsurf uses the same JSON shape. VS Code uses a top-level `servers` object and includes `"type": "stdio"` on each entry. -1. **Commit the config files** (`.cursor/mcp.json`, etc.) -2. **Document the setup** in your README -3. **Include in onboarding** for new developers +On Windows, the adapter command is `cmd` with `args` starting with `["/c", "npx", ...]`. -Example README section: -```markdown -## Development Setup +## Migrate existing setup -This project uses Vapi MCP for enhanced IDE support: +Earlier CLI releases configured the in-house local docs package under an entry named `vapi`. To switch to the new layout: -1. Install Vapi CLI: `curl -sSL https://vapi.ai/install.sh | bash` -2. Set up MCP: `vapi mcp setup` -3. Restart your IDE +```bash +# Replace the old vapi entry with the authenticated v2 API connection +vapi mcp setup ``` -## Next steps +`vapi mcp status` identifies the legacy local docs entry rather than reporting it as an API connection. Older CLI releases wrote VS Code configuration to `~/.vscode/mcp.json`; the updated CLI writes to VS Code's user configuration directory. + +## Check configuration + +```bash +vapi mcp status +``` -Now that MCP is configured: +This command inspects configuration files without connecting to a server or printing API keys. Check your IDE's MCP status and logs to confirm that the server starts successfully. -- **[Create assistants](/quickstart/phone):** Build your first voice AI -- **[Test webhooks locally](/cli/webhook):** Debug webhooks with tunneling services -- **[Manage resources](/cli#common-commands):** Use CLI commands +To remove the integration, delete its `vapi` entry from the relevant configuration file and restart the IDE. ---- +## Next steps -**Pro tip:** After setting up MCP, try asking your IDE to "Create a complete Vapi voice assistant with error handling and logging" - watch it generate production-ready code with all the right patterns! +- **[Vapi MCP Server](/sdk/mcp-server):** API tools and custom clients +- **[MCP tools](/tools/mcp):** Connect a Vapi voice assistant to external MCP tools +- **[Public agent skills](https://github.com/VapiAI/skills):** Reusable Vapi workflows diff --git a/fern/cli/overview.mdx b/fern/cli/overview.mdx index ac52a3515..2b0618bdf 100644 --- a/fern/cli/overview.mdx +++ b/fern/cli/overview.mdx @@ -84,13 +84,14 @@ Supports React, Vue, Next.js, Python, Go, Flutter, React Native, and dozens more ### 🤖 MCP integration -Turn your IDE into a Vapi expert with Model Context Protocol: +Set up the Vapi v2 MCP server or install public agent skills: ```bash -vapi mcp setup +vapi mcp setup # API tools; requires your Vapi API key +vapi skills setup # Install public agent skills ``` -Your IDE's AI assistant (Cursor, Windsurf, VSCode) gains complete, accurate knowledge of Vapi's APIs and best practices. No more hallucinated code or outdated examples. +The updated CLI configures the v2 MCP connection over Streamable HTTP and installs public skills separately. Documentation search is planned through v2. Earlier releases used `vapi mcp setup` for a local documentation server. See [CLI MCP integration](/cli/mcp) for configuration and migration details. ### 🔗 Local webhook testing diff --git a/fern/sdk/mcp-server.mdx b/fern/sdk/mcp-server.mdx index 20d9c3d29..7fe1717fb 100644 --- a/fern/sdk/mcp-server.mdx +++ b/fern/sdk/mcp-server.mdx @@ -16,15 +16,11 @@ Use this server to connect your AI workflows to real-world telephony, automate v -**Using the Vapi CLI?** Auto-configure MCP in your IDE with one command: - -```bash -vapi mcp setup -``` - -This automatically configures Cursor, Windsurf, or VSCode with the Vapi MCP server. [Learn more →](/cli/mcp) + **Using the updated Vapi CLI?** Run `vapi mcp setup` to configure this v2 API server in your IDE. Use `vapi skills setup` to install public agent skills. Documentation search is planned through the v2 connection. Earlier CLI releases configured a local docs server under `vapi mcp setup`; see [CLI MCP integration](/cli/mcp) for migration details. +Use **Streamable HTTP** at `https://mcp-v2.vapi.ai/api/mcp` for remote connections. The legacy HTTP+SSE transport is deprecated; migrate existing remote configurations to this endpoint. + ## Quickstart: Claude Desktop Config **Fastest way to get started:** connect Claude Desktop to the Vapi MCP Server. @@ -44,8 +40,11 @@ This automatically configures Cursor, Windsurf, or VSCode with the Vapi MCP serv "vapi-mcp": { "command": "npx", "args": [ + "-y", "mcp-remote", - "https://mcp.vapi.ai/mcp", + "https://mcp-v2.vapi.ai/api/mcp", + "--transport", + "http-only", "--header", "Authorization: Bearer ${VAPI_TOKEN}" ], @@ -94,16 +93,16 @@ The Vapi MCP Server exposes these actions as MCP tools: ## Integration Options - - Connect to the Vapi-hosted MCP server using the streamable-HTTP protocol. + + Connect to the Vapi-hosted MCP server using the Streamable HTTP protocol. Recommended for most production use cases. - Use this for clients or SDKs that support streamable-HTTP transport. + Use this for clients or SDKs that support Streamable HTTP transport. - - **Endpoint:** `https://mcp.vapi.ai/mcp` + - **Endpoint:** `https://mcp-v2.vapi.ai/api/mcp` - **Authentication:** Pass your Vapi API key as a bearer token:
Authorization: Bearer YOUR_VAPI_API_KEY @@ -114,39 +113,11 @@ The Vapi MCP Server exposes these actions as MCP tools: "vapi-mcp": { "command": "npx", "args": [ + "-y", "mcp-remote", - "https://mcp.vapi.ai/mcp", - "--header", - "Authorization: Bearer ${VAPI_TOKEN}" - ], - "env": { - "VAPI_TOKEN": "YOUR_VAPI_API_KEY" - } - } - } - } - ``` -
- - Connect to the Vapi-hosted MCP server using Server-Sent Events (SSE). - - - Use this for clients or SDKs that support SSE transport. - - - - **Endpoint:** `https://mcp.vapi.ai/sse` - - **Authentication:** Pass your Vapi API key as a bearer token: -
Authorization: Bearer YOUR_VAPI_API_KEY - - Example config for Claude: - ```json - { - "mcpServers": { - "vapi-sse": { - "command": "npx", - "args": [ - "mcp-remote", - "https://mcp.vapi.ai/sse", + "https://mcp-v2.vapi.ai/api/mcp", + "--transport", + "http-only", "--header", "Authorization: Bearer ${VAPI_TOKEN}" ], @@ -157,7 +128,6 @@ The Vapi MCP Server exposes these actions as MCP tools: } } ``` -
@@ -175,7 +145,7 @@ The Vapi MCP Server exposes these actions as MCP tools: { type: 'mcp', server_label: 'vapi-mcp', - server_url: 'https://mcp.vapi.ai/mcp', + server_url: 'https://mcp-v2.vapi.ai/api/mcp', headers: { "Authorization": "Bearer YOUR_VAPI_API_KEY" } }, ], @@ -195,7 +165,7 @@ The Vapi MCP Server exposes these actions as MCP tools: { "type": "mcp", "server_label": "vapi-mcp", - "server_url": "https://mcp.vapi.ai/mcp", + "server_url": "https://mcp-v2.vapi.ai/api/mcp", "headers": {"Authorization": "Bearer YOUR_VAPI_API_KEY"} }, ], @@ -235,7 +205,7 @@ The Vapi MCP Server exposes these actions as MCP tools: Use this for clients or SDKs that support local command-based MCP servers. - Connect your client or SDK to the local server endpoint (default: `http://localhost:3000`). + The client launches this server as a subprocess and communicates over **stdio**. This configuration does not start an HTTP endpoint.
@@ -255,7 +225,7 @@ You can use any MCP-compatible client (SDKs available for multiple languages). - [C#](https://github.com/modelcontextprotocol/csharp-sdk) - Set up your SDK to connect to the Vapi MCP Server (https://mcp.vapi.ai/sse) and authenticate with your API key. + Set up your SDK to connect to https://mcp-v2.vapi.ai/api/mcp using **Streamable HTTP** and authenticate with your Vapi API key in the Authorization: Bearer YOUR_VAPI_API_KEY header. Query available tools, list assistants, create calls, etc, via your SDK. @@ -266,9 +236,6 @@ You can use any MCP-compatible client (SDKs available for multiple languages). ### Example: Build a client with Node.js - - - ```javascript import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'; @@ -278,33 +245,7 @@ dotenv.config(); const mcpClient = new Client({ name: 'vapi-client', version: '1.0.0' }); const transport = new StreamableHTTPClientTransport( - new URL('https://mcp.vapi.ai/mcp'), - { requestInit: { headers: { Authorization: `Bearer ${process.env.VAPI_TOKEN}` } } } -); - -async function main() { - await mcpClient.connect(transport); - const assistants = await mcpClient.callTool({ name: 'list_assistants', arguments: {} }); - console.log(assistants); - await mcpClient.close(); -} - -main(); -``` - - - - -```javascript -import { Client } from '@modelcontextprotocol/sdk/client/index.js'; -import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js'; -import dotenv from 'dotenv'; - -dotenv.config(); - -const mcpClient = new Client({ name: 'vapi-client', version: '1.0.0' }); -const transport = new SSEClientTransport( - new URL('https://mcp.vapi.ai/sse'), + new URL('https://mcp-v2.vapi.ai/api/mcp'), { requestInit: { headers: { Authorization: `Bearer ${process.env.VAPI_TOKEN}` } } } ); @@ -318,14 +259,8 @@ async function main() { main(); ``` - - - ### Detailed example: Build a client with Node.js - - - ```javascript #!/usr/bin/env node import { Client } from '@modelcontextprotocol/sdk/client/index.js'; @@ -348,8 +283,8 @@ async function main() { name: 'vapi-client-example', version: '1.0.0', }); - // Create Streamable-HTTP transport for connection to remote Vapi MCP server - const serverUrl = 'https://mcp.vapi.ai/mcp'; + // Create Streamable HTTP transport for connection to remote Vapi MCP server + const serverUrl = 'https://mcp-v2.vapi.ai/api/mcp'; const headers = { Authorization: `Bearer ${process.env.VAPI_TOKEN}`, }; @@ -454,145 +389,6 @@ async function main() { main(); ``` - - - -```javascript -#!/usr/bin/env node -import { Client } from '@modelcontextprotocol/sdk/client/index.js'; -import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js'; -import dotenv from 'dotenv'; - -// Load environment variables from .env file -dotenv.config(); - -// Ensure API key is available -if (!process.env.VAPI_TOKEN) { - console.error('Error: VAPI_TOKEN environment variable is required'); - process.exit(1); -} - -async function main() { - try { - // Initialize MCP client - const mcpClient = new Client({ - name: 'vapi-client-example', - version: '1.0.0', - }); - // Create SSE transport for connection to remote Vapi MCP server - const serverUrl = 'https://mcp.vapi.ai/sse'; - const headers = { - Authorization: `Bearer ${process.env.VAPI_TOKEN}`, - }; - const options = { - requestInit: { headers: headers }, - eventSourceInit: { - fetch: (url, init) => { - return fetch(url, { - ...(init || {}), - headers: { - ...(init?.headers || {}), - ...headers, - }, - }); - }, - }, - }; - const transport = new SSEClientTransport(new URL(serverUrl), options); - console.log('Connecting to Vapi MCP server via SSE...'); - await mcpClient.connect(transport); - console.log('Connected successfully'); - - // Helper function to parse tool responses - function parseToolResponse(response) { - if (!response?.content) return response; - const textItem = response.content.find(item => item.type === 'text'); - if (textItem?.text) { - try { - return JSON.parse(textItem.text); - } catch { - return textItem.text; - } - } - return response; - } - - try { - // List available tools - const toolsResult = await mcpClient.listTools(); - console.log('Available tools:'); - toolsResult.tools.forEach((tool) => { - console.log(`- ${tool.name}: ${tool.description}`); - }); - - // List assistants - console.log('\nListing assistants...'); - const assistantsResponse = await mcpClient.callTool({ - name: 'list_assistants', - arguments: {}, - }); - const assistants = parseToolResponse(assistantsResponse); - if (!(Array.isArray(assistants) && assistants.length > 0)) { - console.log('No assistants found. Please create an assistant in the Vapi dashboard first.'); - return; - } - console.log('Your assistants:'); - assistants.forEach((assistant) => { - console.log(`- ${assistant.name} (${assistant.id})`); - }); - - // List phone numbers - console.log('\nListing phone numbers...'); - const phoneNumbersResponse = await mcpClient.callTool({ - name: 'list_phone_numbers', - arguments: {}, - }); - const phoneNumbers = parseToolResponse(phoneNumbersResponse); - if (!(Array.isArray(phoneNumbers) && phoneNumbers.length > 0)) { - console.log('No phone numbers found. Please add a phone number in the Vapi dashboard first.'); - return; - } - console.log('Your phone numbers:'); - phoneNumbers.forEach((phoneNumber) => { - console.log(`- ${phoneNumber.phoneNumber} (${phoneNumber.id})`); - }); - - // Create a call using the first assistant and first phone number. - // Outbound calls need an imported number. With free Vapi numbers, only inbound calls are supported. - const phoneNumberId = phoneNumbers[0].id; - const assistantId = assistants[0].id; - console.log(`\nCreating a call using assistant (${assistantId}) and phone number (${phoneNumberId})...`); - const createCallResponse = await mcpClient.callTool({ - name: 'create_call', - arguments: { - assistantId: assistantId, - phoneNumberId: phoneNumberId, - customer: { - phoneNumber: "+1234567890" // Replace with actual customer phone number - } - // Optional: schedule a call for the future - // scheduledAt: "2025-04-15T15:30:00Z" - }, - }); - const createdCall = parseToolResponse(createCallResponse); - console.log('Call created:', JSON.stringify(createdCall, null, 2)); - } finally { - console.log('\nDisconnecting from server...'); - await mcpClient.close(); - console.log('Disconnected'); - } - } catch (error) { - console.error('Error:', error); - process.exit(1); - } -} - -main(); -``` - - - - For more detailed examples and complete client implementations, see the [MCP Client Quickstart](https://modelcontextprotocol.io/quickstart/client). ## References diff --git a/fern/tools/mcp.mdx b/fern/tools/mcp.mdx index a64d400b1..72d0b2366 100644 --- a/fern/tools/mcp.mdx +++ b/fern/tools/mcp.mdx @@ -35,7 +35,7 @@ Creating or updating an MCP tool doesn't contact the server. The first request h ## Prerequisites -- An MCP server URL. The server must support Streamable HTTP, or Server-Sent Events (SSE) for older servers. For Zapier, Composio, and Make, see [MCP providers](/tools/mcp/providers). +- An MCP server URL. Use a server that supports **Streamable HTTP**. The legacy HTTP+SSE transport is deprecated. For Zapier, Composio, and Make, see [MCP providers](/tools/mcp/providers). - Any authentication the server needs. See [Authentication](/tools/mcp/configure#authentication). ## Create an MCP tool @@ -65,7 +65,7 @@ Creating or updating an MCP tool doesn't contact the server. The first request h Under **Encryption Settings**, add the argument paths to encrypt. This needs a custom credential with encryption enabled. See [Encrypt sensitive arguments](/tools/mcp/configure#encrypt-sensitive-arguments). - Under **MCP Settings**, keep **Streamable HTTP** unless your server only supports SSE. See [Transport](/tools/mcp/configure#transport). + Under **MCP Settings**, keep **Streamable HTTP** selected. See [Transport](/tools/mcp/configure#transport). Under **Messages**, click **Add Message** to set what the caller hears while a tool runs. These messages apply to every tool from the server. See [Spoken messages during tool calls](/tools/mcp/messages-and-results#spoken-messages-during-tool-calls). diff --git a/fern/tools/mcp/configure.mdx b/fern/tools/mcp/configure.mdx index 8a3ccf701..c01094145 100644 --- a/fern/tools/mcp/configure.mdx +++ b/fern/tools/mcp/configure.mdx @@ -19,7 +19,7 @@ The following fields configure an MCP tool through the API. Only `type` and `ser | `server.credentialId` | The ID of a saved credential used to authenticate. See [Authentication](#authentication). | | `server.timeoutSeconds` | How long Vapi waits for each request to the server. Default 20 seconds. | | `server.encryptedPaths` | Argument paths to encrypt before Vapi sends a tool call. See [Encrypt sensitive arguments](#encrypt-sensitive-arguments). | -| `metadata.protocol` | `"shttp"` (Streamable HTTP, the default) or `"sse"`. See [Transport](#transport). | +| `metadata.protocol` | Use `"shttp"` (Streamable HTTP, the default), or omit this field. See [Transport](#transport). | | `messages` | Spoken messages for every tool from this server. See [Spoken messages during tool calls](/tools/mcp/messages-and-results#spoken-messages-during-tool-calls). | | `toolMessages` | Spoken messages for individual tools, matched by the tool's name on the server. API only. | | `function.name`, `function.description` | The Dashboard's **Tool Name** and **Description**, which identify this MCP tool. | @@ -112,19 +112,16 @@ Vapi removes the prefix before sending the tool call, so your server receives it ## Transport -Vapi supports two MCP transports, set with `metadata.protocol`: - -- **`shttp` (Streamable HTTP):** the default. Use it for any server that supports it. -- **`sse` (Server-Sent Events):** the older transport. Use it only if your server doesn't support Streamable HTTP. +Use **Streamable HTTP**, the default transport. Set `metadata.protocol` to `"shttp"`, or omit it, and use your provider's Streamable HTTP endpoint. The legacy HTTP+SSE transport is deprecated; migrate existing SSE configurations to the provider's Streamable HTTP endpoint. ```json { "type": "mcp", "server": { - "url": "https://mcp.example.com/sse" + "url": "https://mcp.example.com/mcp" }, "metadata": { - "protocol": "sse" + "protocol": "shttp" } } ``` From 8caaf48598f54000a8fbcb98cd96f9245f992090 Mon Sep 17 00:00:00 2001 From: Chris Garber Date: Fri, 6 Nov 2026 16:41:12 -0500 Subject: [PATCH 2/4] docs: describe the CLI setup commands as released --- fern/cli/mcp-integration.mdx | 4 ++-- fern/cli/overview.mdx | 2 +- fern/sdk/mcp-server.mdx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fern/cli/mcp-integration.mdx b/fern/cli/mcp-integration.mdx index a2fcd8d7d..19799c797 100644 --- a/fern/cli/mcp-integration.mdx +++ b/fern/cli/mcp-integration.mdx @@ -14,7 +14,7 @@ The CLI provides setup commands for the v2 MCP connection and public agent skill | `vapi skills setup` | Public **agent skills** from `VapiAI/skills`, installed for your coding agent | No API key to install | - This command layout requires the CLI release containing the MCP setup update. Earlier releases use `vapi mcp setup` to configure the local `@vapi-ai/mcp-docs-server`. See [Migrate existing setup](#migrate-existing-setup). + Earlier CLI releases used `vapi mcp setup` to configure the local `@vapi-ai/mcp-docs-server`. See [Migrate existing setup](#migrate-existing-setup). ## Set up API tools @@ -114,7 +114,7 @@ Earlier CLI releases configured the in-house local docs package under an entry n vapi mcp setup ``` -`vapi mcp status` identifies the legacy local docs entry rather than reporting it as an API connection. Older CLI releases wrote VS Code configuration to `~/.vscode/mcp.json`; the updated CLI writes to VS Code's user configuration directory. +`vapi mcp status` identifies the legacy local docs entry rather than reporting it as an API connection. Older CLI releases wrote VS Code configuration to `~/.vscode/mcp.json`; the CLI now writes to VS Code's user configuration directory. ## Check configuration diff --git a/fern/cli/overview.mdx b/fern/cli/overview.mdx index 2b0618bdf..81a7f73d6 100644 --- a/fern/cli/overview.mdx +++ b/fern/cli/overview.mdx @@ -91,7 +91,7 @@ vapi mcp setup # API tools; requires your Vapi API key vapi skills setup # Install public agent skills ``` -The updated CLI configures the v2 MCP connection over Streamable HTTP and installs public skills separately. Documentation search is planned through v2. Earlier releases used `vapi mcp setup` for a local documentation server. See [CLI MCP integration](/cli/mcp) for configuration and migration details. +The CLI configures the v2 MCP connection over Streamable HTTP and installs public skills separately. Documentation search is planned through v2. Earlier releases used `vapi mcp setup` for a local documentation server. See [CLI MCP integration](/cli/mcp) for configuration and migration details. ### 🔗 Local webhook testing diff --git a/fern/sdk/mcp-server.mdx b/fern/sdk/mcp-server.mdx index 7fe1717fb..df0bf7522 100644 --- a/fern/sdk/mcp-server.mdx +++ b/fern/sdk/mcp-server.mdx @@ -16,7 +16,7 @@ Use this server to connect your AI workflows to real-world telephony, automate v - **Using the updated Vapi CLI?** Run `vapi mcp setup` to configure this v2 API server in your IDE. Use `vapi skills setup` to install public agent skills. Documentation search is planned through the v2 connection. Earlier CLI releases configured a local docs server under `vapi mcp setup`; see [CLI MCP integration](/cli/mcp) for migration details. + **Using the Vapi CLI?** Run `vapi mcp setup` to configure this v2 API server in your IDE. Use `vapi skills setup` to install public agent skills. Documentation search is planned through the v2 connection. Earlier CLI releases configured a local docs server under `vapi mcp setup`; see [CLI MCP integration](/cli/mcp) for migration details. Use **Streamable HTTP** at `https://mcp-v2.vapi.ai/api/mcp` for remote connections. The legacy HTTP+SSE transport is deprecated; migrate existing remote configurations to this endpoint. From 922cae1f6de928626f25f72510fca5a3e6630f52 Mon Sep 17 00:00:00 2001 From: Chris Garber Date: Mon, 9 Nov 2026 20:42:00 -0500 Subject: [PATCH 3/4] Replace CLI agent setup guidance with hosted MCP instructions --- fern/cli/mcp-integration.mdx | 133 ------------------------------- fern/cli/overview.mdx | 13 +-- fern/cli/project-integration.mdx | 2 +- fern/docs.yml | 5 +- fern/resources.mdx | 2 +- fern/sdk/mcp-server.mdx | 54 +++++++------ 6 files changed, 34 insertions(+), 175 deletions(-) delete mode 100644 fern/cli/mcp-integration.mdx diff --git a/fern/cli/mcp-integration.mdx b/fern/cli/mcp-integration.mdx deleted file mode 100644 index 19799c797..000000000 --- a/fern/cli/mcp-integration.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: MCP integration -description: Set up the Vapi v2 MCP server and public agent skills -slug: cli/mcp ---- - -## Choose an integration - -The CLI provides setup commands for the v2 MCP connection and public agent skills: - -| Command | What it sets up | Authentication | -| --- | --- | --- | -| `vapi mcp setup` | The Vapi **v2 API MCP server**, for managing assistants, calls, phone numbers, and other resources | Your current Vapi API key | -| `vapi skills setup` | Public **agent skills** from `VapiAI/skills`, installed for your coding agent | No API key to install | - - - Earlier CLI releases used `vapi mcp setup` to configure the local `@vapi-ai/mcp-docs-server`. See [Migrate existing setup](#migrate-existing-setup). - - -## Set up API tools - -Install the [Vapi CLI](/cli) and Node.js with npm, then sign in and configure your IDE: - -```bash -vapi login -vapi mcp setup -``` - -The command detects supported IDEs and prompts you to select which ones to configure. To configure one directly: - -```bash -vapi mcp setup cursor -vapi mcp setup windsurf -vapi mcp setup vscode -``` - -The CLI adds a server named `vapi` that connects to `https://mcp-v2.vapi.ai/api/mcp` using **Streamable HTTP**. It reads your current API key from CLI configuration, `VAPI_API_KEY`, or an explicit `--api-key` flag, and stores it in the user MCP configuration. Keep this file private; on POSIX systems setup writes it with mode `0600`. Re-run setup after changing accounts or rotating the key. - -Restart your IDE, enable the `vapi` server in its MCP settings, and start a new chat. See the [Vapi MCP Server guide](/sdk/mcp-server) for available API tools. - -### Documentation through the same connection - -Documentation search is planned through the v2 MCP server, which will proxy requests to the documentation backend. The CLI configures the v2 connection; no separate documentation MCP connection is needed. Tool availability depends on the deployed v2 server. - -Install public agent skills separately for your agent's native discovery and activation behavior. - -## Install public agent skills - -```bash -vapi skills setup -``` - -This runs `npx -y skills add VapiAI/skills`. The installer lets you choose skills and coding agents. It installs into the current project by default; use `--global` for user-wide installation. Node.js **22.20 or later** with npm is required. - -Installer options are forwarded: - -```bash -vapi skills setup --agent cursor --skill create-assistant -vapi skills setup --global --agent claude-code --yes -``` - -This installs skill files; it does not configure an MCP server. See the [public skills repository](https://github.com/VapiAI/skills) for workflows and agent support. - -## What MCP setup writes - -`vapi mcp setup` uses `mcp-remote` as a local stdio adapter to the hosted server. The remote connection is restricted to **Streamable HTTP** with `--transport http-only`; legacy SSE fallback is disabled. Node.js and `npx` must be available to your IDE. - -Setup creates or updates the `vapi` entry and preserves unrelated settings. - -| IDE | User configuration file | -| --- | --- | -| Cursor | `~/.cursor/mcp.json` | -| Windsurf | `~/.codeium/windsurf/mcp_config.json` | -| VS Code on macOS | `~/Library/Application Support/Code/User/mcp.json` | -| VS Code on Linux | `$XDG_CONFIG_HOME/Code/User/mcp.json`, defaulting to `~/.config/Code/User/mcp.json` | -| VS Code on Windows | `%APPDATA%/Code/User/mcp.json` | - -`~` represents your home directory. MCP setup is per user; skills installation is per project unless you pass `--global`. - -### Example: Cursor API configuration - -```json -{ - "mcpServers": { - "vapi": { - "command": "npx", - "args": [ - "-y", - "mcp-remote", - "https://mcp-v2.vapi.ai/api/mcp", - "--transport", - "http-only", - "--header", - "Authorization: Bearer ${VAPI_API_KEY}" - ], - "env": { - "VAPI_API_KEY": "YOUR_VAPI_API_KEY" - } - } - } -} -``` - -Windsurf uses the same JSON shape. VS Code uses a top-level `servers` object and includes `"type": "stdio"` on each entry. - -On Windows, the adapter command is `cmd` with `args` starting with `["/c", "npx", ...]`. - -## Migrate existing setup - -Earlier CLI releases configured the in-house local docs package under an entry named `vapi`. To switch to the new layout: - -```bash -# Replace the old vapi entry with the authenticated v2 API connection -vapi mcp setup -``` - -`vapi mcp status` identifies the legacy local docs entry rather than reporting it as an API connection. Older CLI releases wrote VS Code configuration to `~/.vscode/mcp.json`; the CLI now writes to VS Code's user configuration directory. - -## Check configuration - -```bash -vapi mcp status -``` - -This command inspects configuration files without connecting to a server or printing API keys. Check your IDE's MCP status and logs to confirm that the server starts successfully. - -To remove the integration, delete its `vapi` entry from the relevant configuration file and restart the IDE. - -## Next steps - -- **[Vapi MCP Server](/sdk/mcp-server):** API tools and custom clients -- **[MCP tools](/tools/mcp):** Connect a Vapi voice assistant to external MCP tools -- **[Public agent skills](https://github.com/VapiAI/skills):** Reusable Vapi workflows diff --git a/fern/cli/overview.mdx b/fern/cli/overview.mdx index 81a7f73d6..c40f06565 100644 --- a/fern/cli/overview.mdx +++ b/fern/cli/overview.mdx @@ -82,17 +82,6 @@ vapi init Supports React, Vue, Next.js, Python, Go, Flutter, React Native, and dozens more frameworks. -### 🤖 MCP integration - -Set up the Vapi v2 MCP server or install public agent skills: - -```bash -vapi mcp setup # API tools; requires your Vapi API key -vapi skills setup # Install public agent skills -``` - -The CLI configures the v2 MCP connection over Streamable HTTP and installs public skills separately. Documentation search is planned through v2. Earlier releases used `vapi mcp setup` for a local documentation server. See [CLI MCP integration](/cli/mcp) for configuration and migration details. - ### 🔗 Local webhook testing Forward webhooks to your local server for debugging: @@ -242,7 +231,7 @@ vapi update Now that you have the Vapi CLI installed: - **[Initialize a project](/cli/init):** Add Vapi to your existing codebase -- **[Set up MCP](/cli/mcp):** Enhance your IDE with Vapi intelligence +- **[Connect your coding agent](/sdk/mcp-server):** Use the hosted Vapi MCP server - **[Test webhooks locally](/cli/webhook):** Debug webhooks with tunneling services - **[Manage authentication](/cli/auth):** Work with multiple accounts diff --git a/fern/cli/project-integration.mdx b/fern/cli/project-integration.mdx index 3b1279586..1e70d81da 100644 --- a/fern/cli/project-integration.mdx +++ b/fern/cli/project-integration.mdx @@ -320,7 +320,7 @@ After initializing your project: - **[Test locally](/cli/webhook):** Use `vapi listen` to test webhooks - **[Create assistants](/quickstart/phone):** Build your first voice assistant -- **[Set up MCP](/cli/mcp):** Enhance your IDE with Vapi intelligence +- **[Connect your coding agent](/sdk/mcp-server):** Use the hosted Vapi MCP server --- diff --git a/fern/docs.yml b/fern/docs.yml index 58e8fdfb0..6b6a3f92a 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -1154,9 +1154,6 @@ navigation: - page: Project Integration path: cli/project-integration.mdx icon: fa-light fa-folder-plus - - page: MCP Integration - path: cli/mcp-integration.mdx - icon: fa-light fa-brain-circuit - page: Webhook Testing path: cli/webhook-testing.mdx icon: fa-light fa-webhook @@ -1175,6 +1172,8 @@ navigation: - tab: changelog redirects: + - source: /cli/mcp + destination: /sdk/mcp-server - source: /documentation/best-practices/enterprise-environments-dev-uat-prod destination: /config-as-code#development-staging-and-production - source: /providers/voice/microsoft diff --git a/fern/resources.mdx b/fern/resources.mdx index 93a7a19a0..57de9fbad 100644 --- a/fern/resources.mdx +++ b/fern/resources.mdx @@ -12,7 +12,7 @@ description: Explore the Vapi ecosystem in one place, with links to the CLI, cli Vapi AI Ecosystem -Vapi CLIOverview · GitHub · Project Integration · MCP Setup · Webhook Testing +Vapi CLIOverview · GitHub · Project Integration · Webhook Testing Real-time SDKsWeb · Flutter · React Native · iOS · Python · Vanilla Client ExamplesNext.js · React · Flutter · React Native Server ExamplesVercel · Cloudflare · Supabase · Node · Bun · Deno · Flask · Laravel · Go · Rust diff --git a/fern/sdk/mcp-server.mdx b/fern/sdk/mcp-server.mdx index df0bf7522..9ac3cab70 100644 --- a/fern/sdk/mcp-server.mdx +++ b/fern/sdk/mcp-server.mdx @@ -16,14 +16,39 @@ Use this server to connect your AI workflows to real-world telephony, automate v - **Using the Vapi CLI?** Run `vapi mcp setup` to configure this v2 API server in your IDE. Use `vapi skills setup` to install public agent skills. Documentation search is planned through the v2 connection. Earlier CLI releases configured a local docs server under `vapi mcp setup`; see [CLI MCP integration](/cli/mcp) for migration details. + 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). + + 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. + + Use **Streamable HTTP** at `https://mcp-v2.vapi.ai/api/mcp` for remote connections. The legacy HTTP+SSE transport is deprecated; migrate existing remote configurations to this endpoint. -## Quickstart: Claude Desktop Config +## Connect a coding agent -**Fastest way to get started:** connect Claude Desktop to the Vapi MCP Server. +For clients with native remote MCP support, configure the server URL as `https://mcp-v2.vapi.ai/api/mcp` and add an `Authorization: Bearer YOUR_VAPI_API_KEY` header. No local MCP server or Node.js process is needed for a native remote connection. + +For example, add this to Cursor's MCP configuration: + +```json +{ + "mcpServers": { + "vapi": { + "url": "https://mcp-v2.vapi.ai/api/mcp", + "headers": { + "Authorization": "Bearer YOUR_VAPI_API_KEY" + } + } + } +} +``` + +Replace `YOUR_VAPI_API_KEY` with your Vapi API key in your private user configuration. Other clients use their own configuration format; follow your client's remote MCP setup instructions. + +## Claude Desktop with a stdio bridge + +The following configuration uses `mcp-remote` to bridge a local stdio connection to the hosted server. It requires Node.js and `npx` to be available to Claude Desktop. @@ -106,28 +131,7 @@ The Vapi MCP Server exposes these actions as MCP tools: - **Authentication:** Pass your Vapi API key as a bearer token:
Authorization: Bearer YOUR_VAPI_API_KEY - Example config: - ```json - { - "mcpServers": { - "vapi-mcp": { - "command": "npx", - "args": [ - "-y", - "mcp-remote", - "https://mcp-v2.vapi.ai/api/mcp", - "--transport", - "http-only", - "--header", - "Authorization: Bearer ${VAPI_TOKEN}" - ], - "env": { - "VAPI_TOKEN": "YOUR_VAPI_API_KEY" - } - } - } - } - ``` + 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 bridge example](#claude-desktop-with-a-stdio-bridge) above. From abda944f3e468dd52169abe7053550ed1665b95f Mon Sep 17 00:00:00 2001 From: Chris Garber Date: Mon, 9 Nov 2026 20:45:17 -0500 Subject: [PATCH 4/4] Document hosted MCP setup in agent-specific tabs --- fern/sdk/mcp-server.mdx | 158 ++++++++++++++++++++++++++++------------ 1 file changed, 113 insertions(+), 45 deletions(-) diff --git a/fern/sdk/mcp-server.mdx b/fern/sdk/mcp-server.mdx index 9ac3cab70..94d2b74ee 100644 --- a/fern/sdk/mcp-server.mdx +++ b/fern/sdk/mcp-server.mdx @@ -23,72 +23,140 @@ Use this server to connect your AI workflows to real-world telephony, automate v 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. -Use **Streamable HTTP** at `https://mcp-v2.vapi.ai/api/mcp` for remote connections. The legacy HTTP+SSE transport is deprecated; migrate existing remote configurations to this endpoint. +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. -## Connect a coding agent +## Connect your agent -For clients with native remote MCP support, configure the server URL as `https://mcp-v2.vapi.ai/api/mcp` and add an `Authorization: Bearer YOUR_VAPI_API_KEY` header. No local MCP server or Node.js process is needed for a native remote connection. +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. -For example, add this to Cursor's MCP configuration: + + + For the Codex CLI, set your API key and register the remote server: + + ```bash + export VAPI_API_KEY="YOUR_VAPI_API_KEY" + codex mcp add vapi --url https://mcp.vapi.ai/mcp \ + --bearer-token-env-var VAPI_API_KEY + codex mcp list + ``` + + Codex saves the connection in `~/.codex/config.toml` and reads the key from `VAPI_API_KEY` when it connects. Keep that variable available whenever you launch Codex. If you use the desktop app or IDE extension, its launch environment must also contain the variable. + + Start a new Codex session and use `/mcp` to inspect the connection. See [Codex MCP setup](https://developers.openai.com/codex/mcp). + + + Set your API key and add the server to your private user configuration: + + ```bash + export VAPI_API_KEY="YOUR_VAPI_API_KEY" + claude mcp add --transport http --scope user vapi \ + https://mcp.vapi.ai/mcp \ + --header 'Authorization: Bearer ${VAPI_API_KEY}' + claude mcp get vapi + ``` + + The single quotes preserve the environment-variable reference in `~/.claude.json`. Keep `VAPI_API_KEY` set whenever you launch Claude Code. Start a new session and use `/mcp` to check the connection. + + See [Claude Code MCP setup](https://code.claude.com/docs/en/mcp). + + + Register the hosted server with header authentication: + + ```bash + hermes mcp add vapi --url https://mcp.vapi.ai/mcp --auth header + ``` + + Confirm that the server requires authentication, then paste your Vapi API key at the masked **API key / Bearer token** prompt. Enter the key without the `Bearer` prefix. Select the tools you want to enable and finish saving the connection. + + Hermes saves the connection in your active profile's `config.yaml` and the key in its `.env` file. Start a new session, or run `/reload-mcp` in an existing session. To test the connection: -```json -{ - "mcpServers": { - "vapi": { - "url": "https://mcp-v2.vapi.ai/api/mcp", - "headers": { - "Authorization": "Bearer YOUR_VAPI_API_KEY" + ```bash + hermes mcp test vapi + ``` + + See [Hermes MCP setup](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp). + + + Add this entry to your private user configuration at `~/.cursor/mcp.json`, preserving any other servers: + + ```json + { + "mcpServers": { + "vapi": { + "url": "https://mcp.vapi.ai/mcp", + "headers": { + "Authorization": "Bearer YOUR_VAPI_API_KEY" + } + } } } - } -} -``` + ``` -Replace `YOUR_VAPI_API_KEY` with your Vapi API key in your private user configuration. Other clients use their own configuration format; follow your client's remote MCP setup instructions. + Replace `YOUR_VAPI_API_KEY` with your Vapi API key. Open Cursor's MCP settings and enable `vapi`, then start a new chat. Keep this user configuration private and update the header after rotating your key. -## Claude Desktop with a stdio bridge + See [Cursor MCP setup](https://cursor.com/docs/mcp). + + + Run **MCP: Open User Configuration** from the Command Palette. Add this entry to `mcp.json`, preserving any other servers: -The following configuration uses `mcp-remote` to bridge a local stdio connection to the hosted server. It requires Node.js and `npx` to be available to Claude Desktop. + ```json + { + "inputs": [ + { + "type": "promptString", + "id": "vapi-api-key", + "description": "Vapi API key", + "password": true + } + ], + "servers": { + "vapi": { + "type": "http", + "url": "https://mcp.vapi.ai/mcp", + "headers": { + "Authorization": "Bearer ${input:vapi-api-key}" + } + } + } + } + ``` + + 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. + + See [VS Code MCP setup](https://code.visualstudio.com/docs/agents/reference/mcp-configuration). + + + 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. + + Open **Settings → Developer → Edit Config**. Add this entry to `claude_desktop_config.json`, preserving any other servers: - - - Follow the [Vapi API key guide](/security-and-privacy/api-keys) to create, view, or copy an API key. - - - Open Settings → Developer tab → Edit Config. - - - Insert this into your claude_desktop_config.json: ```json { "mcpServers": { - "vapi-mcp": { + "vapi": { "command": "npx", "args": [ "-y", "mcp-remote", - "https://mcp-v2.vapi.ai/api/mcp", + "https://mcp.vapi.ai/mcp", "--transport", "http-only", "--header", - "Authorization: Bearer ${VAPI_TOKEN}" + "Authorization: Bearer ${VAPI_API_KEY}" ], "env": { - "VAPI_TOKEN": "YOUR_VAPI_API_KEY" + "VAPI_API_KEY": "YOUR_VAPI_API_KEY" } } } } ``` - Replace YOUR_VAPI_API_KEY with your API key. - - - Save and restart Claude Desktop. - - -**Example prompt:** -> "Have my customer support assistant call Jeremy at +1555123456." + 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. + + + +Once connected, try asking your agent: "List my Vapi assistants." --- @@ -127,11 +195,11 @@ The Vapi MCP Server exposes these actions as MCP tools: Use this for clients or SDKs that support Streamable HTTP transport. - - **Endpoint:** `https://mcp-v2.vapi.ai/api/mcp` + - **Endpoint:** `https://mcp.vapi.ai/mcp` - **Authentication:** Pass your Vapi API key as a bearer token:
Authorization: Bearer YOUR_VAPI_API_KEY - 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 bridge example](#claude-desktop-with-a-stdio-bridge) above. + 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.
@@ -149,7 +217,7 @@ The Vapi MCP Server exposes these actions as MCP tools: { type: 'mcp', server_label: 'vapi-mcp', - server_url: 'https://mcp-v2.vapi.ai/api/mcp', + server_url: 'https://mcp.vapi.ai/mcp', headers: { "Authorization": "Bearer YOUR_VAPI_API_KEY" } }, ], @@ -169,7 +237,7 @@ The Vapi MCP Server exposes these actions as MCP tools: { "type": "mcp", "server_label": "vapi-mcp", - "server_url": "https://mcp-v2.vapi.ai/api/mcp", + "server_url": "https://mcp.vapi.ai/mcp", "headers": {"Authorization": "Bearer YOUR_VAPI_API_KEY"} }, ], @@ -229,7 +297,7 @@ You can use any MCP-compatible client (SDKs available for multiple languages). - [C#](https://github.com/modelcontextprotocol/csharp-sdk)
- Set up your SDK to connect to https://mcp-v2.vapi.ai/api/mcp using **Streamable HTTP** and authenticate with your Vapi API key in the Authorization: Bearer YOUR_VAPI_API_KEY header. + Set up your SDK to connect to https://mcp.vapi.ai/mcp using **Streamable HTTP** and authenticate with your Vapi API key in the Authorization: Bearer YOUR_VAPI_API_KEY header. Query available tools, list assistants, create calls, etc, via your SDK. @@ -249,7 +317,7 @@ dotenv.config(); const mcpClient = new Client({ name: 'vapi-client', version: '1.0.0' }); const transport = new StreamableHTTPClientTransport( - new URL('https://mcp-v2.vapi.ai/api/mcp'), + new URL('https://mcp.vapi.ai/mcp'), { requestInit: { headers: { Authorization: `Bearer ${process.env.VAPI_TOKEN}` } } } ); @@ -288,7 +356,7 @@ async function main() { version: '1.0.0', }); // Create Streamable HTTP transport for connection to remote Vapi MCP server - const serverUrl = 'https://mcp-v2.vapi.ai/api/mcp'; + const serverUrl = 'https://mcp.vapi.ai/mcp'; const headers = { Authorization: `Bearer ${process.env.VAPI_TOKEN}`, };