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

  1. Go to the VAPI website and create an account.
  2. Obtain your API key from the VAPI dashboard.

2. Configure Claude Desktop

  1. 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
  1. 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"
            }
        }
    }
}
  1. Save the file and restart Claude Desktop.

Initial Project Setup

  1. Create a new directory for your project:
mkdir vapi-mcp
cd vapi-mcp
  1. Initialize a new npm project:
npm init -y
  1. Install dependencies:
npm install @modelcontextprotocol/sdk axios zod
npm install -D @types/node typescript
  1. 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"]
}
  1. Update package.json:
{
  "type": "module",
  "scripts": {
    "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\""
  }
}
  1. Create your source directory:
mkdir src

Building and Running

  1. Build the server:
npm run build
  1. The server will automatically start when you open Claude Desktop.

Available Tools

The server provides the following tools:

  1. 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.
  2. 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

  1. 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.
  2. Authentication Errors:

    • Verify your API key is correct.
    • Ensure required scopes are enabled.
  3. 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:

  1. 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:

  1. Check the troubleshooting section above.
  2. Review Claude Desktop logs.
  3. Open an issue on GitHub.
  4. Contact the maintainer.