Skip to main content
Glama

Vapi MCP Server

Official
by VapiAI

Vapi MCP 服务器

铁匠徽章

Vapi模型上下文协议服务器允许您通过函数调用与 Vapi API 集成。

Claude 桌面设置

  1. 打开Claude Desktop并按CMD + ,进入Settings

  2. 单击Developer选项卡。

  3. 单击Edit Config按钮。

  4. 这将在您的文件资源管理器中打开claude_desktop_config.json文件。

  5. 从 Vapi 仪表板 ( https://dashboard.vapi.ai/org/api-keys ) 获取您的 Vapi API 密钥。

  6. 将以下内容添加到您的claude_desktop_config.json文件中。更多详情请参阅此处

  7. 编辑配置文件后重新启动 Claude Desktop。

{ "mcpServers": { "vapi-mcp-server": { "command": "npx", "args": [ "-y", "@vapi-ai/mcp-server" ], "env": { "VAPI_TOKEN": "<your_vapi_token>" } } } }

Claude Desktop 的使用示例

  1. 使用 Vapi 仪表板 ( https://dashboard.vapi.ai/phone-numbers ) 创建或导入电话号码。

  2. 使用 Vapi 仪表板 ( https://dashboard.vapi.ai/assistants ) 中现有的“预约计划程序”模板创建一个新的助手。

  3. 确保配置 Claude Desktop 以使用 Vapi MCP 服务器并重新启动 Claude Desktop 应用程序。

  4. 请求 Claude 发起或安排通话。请参阅以下示例:

**示例 1:**请求立即呼叫

I'd like to speak with my ShopHelper assistant to talk about my recent order. Can you have it call me at +1234567890?

**示例 2:**安排未来通话

I need to schedule a call with Mary assistant for next Tuesday at 3:00 PM. My phone number is +1555123456.

Related MCP server: MCP Server

远程 SSE 连接

要通过服务器发送事件 (SSE) 传输连接到 Vapi 的 MCP 服务器:

  • 使用 SSE Transport 从任何 MCP 客户端连接到https://mcp.vapi.ai/sse

  • 将您的 Vapi API 密钥作为承载令牌包含在请求标头中

  • 示例标题: Authorization: Bearer your_vapi_api_key_here

此连接允许您远程访问 Vapi 的功能,而无需运行本地服务器。

发展

# Install dependencies npm install # Build the server npm run build

更新您的claude_desktop_config.json以使用本地服务器。

{ "mcpServers": { "vapi-local": { "command": "node", "args": [ "<path_to_vapi_mcp_server>/dist/index.js" ], "env": { "VAPI_TOKEN": "<your_vapi_token>" } }, } }

测试

该项目有两种类型的测试:

单元测试

单元测试使用模拟来测试 MCP 服务器,而无需对 Vapi 进行实际的 API 调用。

# Run unit tests npm run test:unit

端到端测试

E2E 测试运行完整的 MCP 服务器并对 Vapi 进行实际 API 调用。

# Set your Vapi API token export VAPI_TOKEN=your_token_here # Run E2E tests npm run test:e2e

注意:E2E 测试需要在环境中设置有效的 Vapi API 令牌。

运行所有测试

要同时运行所有测试:

npm test

参考

支持的操作

Vapi MCP 服务器提供以下集成工具:

辅助工具

  • list_assistants :列出所有 Vapi 助手

  • create_assistant :创建一个新的 Vapi 助手

  • update_assistant :更新现有的 Vapi 助手

  • get_assistant :通过 ID 获取 Vapi 助手

呼叫工具

  • list_calls :列出所有 Vapi 调用

  • create_call :创建外拨电话

  • get_call :获取特定呼叫的详细信息

注意: create_call操作支持安排立即执行或将来执行的调用。

电话号码工具

  • list_phone_numbers :列出所有 Vapi 电话号码

  • get_phone_number :获取特定电话号码的详细信息

Vapi 工具

  • list_tools :列出所有 Vapi 工具

  • get_tool :获取特定工具的详细信息

One-click Deploy
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VapiAI/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server