VAPI MCP Server
March 10, 2025 ยท View on GitHub
This MCP server allows Claude to interact with the VAPI API, enabling capabilities like managing calls and assistants.
Prerequisites
- Node.js (v16 or higher)
- Claude Desktop App
- A VAPI account with API access
Setup Instructions
1. Create a VAPI Account
- Go to the VAPI website and create an account.
- Obtain your API key from the VAPI dashboard.
2. Configure Claude Desktop
- Open your Claude Desktop configuration file:
For MacOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
For Windows:
code %AppData%\Claude\claude_desktop_config.json
- Add or update the configuration:
{
"mcpServers": {
"vapi-server": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/YOUR/build/index.js"
],
"env": {
"VAPI_API_KEY": "your_api_key_here"
}
}
}
}
- Save the file and restart Claude Desktop.
Initial Project Setup
- Create a new directory for your project:
mkdir vapi-mcp
cd vapi-mcp
- Initialize a new npm project:
npm init -y
- Install dependencies:
npm install @modelcontextprotocol/sdk axios zod
npm install -D @types/node typescript
- Create a tsconfig.json file:
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"outDir": "./build",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
- Update package.json:
{
"type": "module",
"scripts": {
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\""
}
}
- Create your source directory:
mkdir src
Building and Running
- Build the server:
npm run build
- The server will automatically start when you open Claude Desktop.
Available Tools
The server provides the following tools:
-
Call Management:
get_call: Get details of a specific call.create_call: Create a new call.update_call: Update an existing call.delete_call: Delete a call.list_calls: List calls with optional filters.
-
Assistant Management:
get_assistant: Get details of a specific assistant.create_assistant: Create a new assistant.update_assistant: Update an existing assistant.delete_assistant: Delete an assistant.
Example Usage in Claude
After setup, you can use commands like:
- "Show me the details of call with ID [call_id]"
- "Create a new call named 'Team Meeting'"
- "Update the call with ID [call_id] to 'Updated Meeting Name'"
- "Delete the call with ID [call_id]"
- "List all calls"
- "Get details of assistant with ID [assistant_id]"
- "Create a new assistant named 'Assistant Name'"
- "Update assistant with ID [assistant_id] to 'Updated Assistant Name'"
- "Delete assistant with ID [assistant_id]"
Troubleshooting
Common Issues
-
Tools not appearing in Claude:
- Check Claude Desktop logs:
tail -f ~/Library/Logs/Claude/mcp*.log - Verify all environment variables are set correctly.
- Ensure the path to index.js is absolute and correct.
- Check Claude Desktop logs:
-
Authentication Errors:
- Verify your API key is correct.
- Ensure required scopes are enabled.
-
Server Connection Issues:
- Check if the server built successfully.
- Verify file permissions on build/index.js (should be 755).
- Try running the server directly:
node /path/to/build/index.js.
Viewing Logs
To view server logs:
# For MacOS/Linux:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
# For Windows:
Get-Content -Path "$env:AppData\Claude\Logs\mcp*.log" -Wait -Tail 20
Environment Variables
If you're getting environment variable errors, verify each one:
- VAPI_API_KEY: Your API key from the VAPI dashboard.
Security Considerations
- Keep your API key secure.
- Don't commit credentials to version control.
- Use environment variables for sensitive data.
License
MIT License - See LICENSE file for details.
Support
If you encounter any issues:
- Check the troubleshooting section above.
- Review Claude Desktop logs.
- Open an issue on GitHub.
- Contact the maintainer.