VM

vapiai/mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

58 stars 28 forks 质量 84 趋势 33MIT

vapiai/mcp-server 是从 https://github.com/vapiai/mcp-server. 导入的 MCP 服务器候选

概览

vapiai/mcp-server 是从 https://github.com/vapiai/mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

利用模型上下文协议构建 AI 语音助手和电话代理。

布置

MCP服务器需要Vapi API密钥。从Vapi仪表盘获取一个。

本地服务器(标准)

配置任何支持本地标准服务器的MCP客户端以运行:

在服务器环境中设置VAPI_TOKEN。MCP客户端配置格式各异,但服务器定义通常如下:

远程服务器(可流式 HTTP)

支持远程MCP服务器的客户端可以直接连接:

  • 网址:https://mcp.vapi.ai/mcp
  • 头部:Authorization: Bearer your_vapi_api_key_here

客户特定示例

克劳德·科德

克劳德桌面

请使用上面Claude Desktop配置文件中的本地服务器配置。要通过stdio桥接连接到托管服务器:

可选特工技能

skill 目录包含支持代理技能的 AI 编码代理的可复用说明。使用主机的技能安装流程安装。

对于Claude代码:


示例用法

创建一个语音助手

请咨询你的MCP支持的客服:

打个外拨电话

预约未来通话


本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Vapi MCP Server

Build AI voice assistants and phone agents with Vapi using the Model Context Protocol.

Setup

The MCP server requires a Vapi API key. Get one from the Vapi dashboard.

Local Server (stdio)

Configure any MCP client that supports local stdio servers to run:

npx -y @vapi-ai/mcp-server

Set VAPI_TOKEN in the server environment. MCP client configuration formats vary, but the server definition generally looks like this:

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

Remote Server (Streamable HTTP)

Clients that support remote MCP servers can connect directly:

  • URL: https://mcp.vapi.ai/mcp
  • Header: Authorization: Bearer your_vapi_api_key_here

Client-Specific Examples

Claude Code

claude mcp add -e VAPI_TOKEN=your_vapi_token vapi -- npx -y @vapi-ai/mcp-server

Claude Desktop

Use the local server configuration above in the Claude Desktop configuration file. To connect to the hosted server through an stdio bridge instead:

{
  "mcpServers": {
    "vapi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.vapi.ai/mcp",
        "--header",
        "Authorization: Bearer ${VAPI_TOKEN}"
      ],
      "env": {
        "VAPI_TOKEN": ""
      }
    }
  }
}

Optional Agent Skill

The skill directory contains reusable instructions for AI coding agents that support Agent Skills. Install it using your host’s skill installation process.

For Claude Code:

mkdir -p ~/.claude/skills/vapi
curl -o ~/.claude/skills/vapi/SKILL.md https://raw.githubusercontent.com/VapiAI/mcp-server/main/skill/SKILL.md

Example Usage

Create a Voice Assistant

Ask your MCP-enabled agent:

I want to build a voice assistant that can schedule appointments

Make an Outbound Call

Call +1234567890 using my appointment reminder assistant with these details:
- Customer name: Sarah Johnson
- Appointment date: March 25th
- Appointment time: 2:30 PM

Schedule a Future Call

Schedule a call with my support assistant for next Tuesday at 3:00 PM to +1555123456

Using Variable Values in Assistant Prompts

The create_call action supports passing dynamic variables through assistantOverrides.variableValues. Use double curly braces in your assistant’s prompts: {{variableName}}.

Example Prompt with Variables

Hello {{customerName}}, this is a reminder about your appointment on {{appointmentDate}} at {{appointmentTime}} with {{doctorName}}.

Default Variables

These are automatically available (no need to pass):

  • {{now}} - Current date and time (UTC)
  • {{date}} - Current date (UTC)
  • {{time}} - Current time (UTC)
在 GitHub 查看完整 README

安装

npx -y @vapi-ai/mcp-server
新手?先看 mcpskill.org 教程 →

配置

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