Vapi Voice AI for Cursor
STDIOImplements MCP server for integrating Vapi's voice AI capabilities with Cursor.
Implements MCP server for integrating Vapi's voice AI capabilities with Cursor.
This project implements a Model Context Protocol (MCP) server for integrating Vapi's voice AI capabilities with Cursor.
The Vapi MCP server is structured as follows:
vapi-mcp-server/
- Main server code
src/
- TypeScript source filesdist/
- Compiled JavaScript output.env
- Environment variables for API keysCreate a .env
file in the vapi-mcp-server
directory with the following variables:
# Vapi API Keys
VAPI_ORG_ID=your-org-id
VAPI_PRIVATE_KEY=your-private-key
VAPI_KNOWLEDGE_ID=your-knowledge-id
VAPI_JWT_PRIVATE=your-jwt-private
# Environment
NODE_ENV=development
To build the server:
cd vapi-mcp/vapi-mcp-server npm install npm run build
When configuring the Vapi MCP server in Cursor's MCP settings, pay attention to the following crucial details:
Working Directory: The cwd
parameter is required to ensure the server runs in the correct directory and can access the .env
file properly.
Environment Variables: Must be explicitly provided in the configuration, even if they exist in the .env
file.
Module Type: The server uses ES modules, so the package.json
must include "type": "module"
.
Here's the correct configuration for .cursor/mcp.json
:
"Vapi Voice AI Tools": { "command": "node", "type": "stdio", "args": [ "/Users/matthewcage/Documents/AA-GitHub/MCP/vapi-mcp/vapi-mcp-server/dist/index.js" ], "cwd": "/Users/matthewcage/Documents/AA-GitHub/MCP/vapi-mcp/vapi-mcp-server", "env": { "VAPI_ORG_ID": "your-org-id", "VAPI_PRIVATE_KEY": "your-private-key", "VAPI_KNOWLEDGE_ID": "your-knowledge-id", "VAPI_JWT_PRIVATE": "your-jwt-private", "NODE_ENV": "development" } }
If you see "Client Closed" in the Cursor MCP Tools panel:
cwd
parameter is set correctly in your mcp.jsonpackage.json
has "type": "module"
chmod +x dist/index.js
)cd vapi-mcp/vapi-mcp-server node --trace-warnings dist/index.js
If you get "Error: Cannot find module" when running:
npm run build
npm install
The Vapi MCP server provides the following tools:
When integrating with Cursor's MCP:
cwd
parameter to ensure the server runs in the correct directory"type": "module"
and tsconfig.json uses appropriate module settingsThe server command path must be absolute and correctly formed in the Cursor MCP config
Using stdio transport type is required for proper integration with Cursor