Local MCP setup
Run the Dhvanee MCP server on your own machine so Cursor, Claude Desktop or Claude Code can use your workspace through the public API.
MCP (Model Context Protocol) lets an AI assistant call tools. The Dhvanee MCP package, @dhvanee/mcp, gives your assistant one tool for each public API operation, read from `openapi.public.yaml`. It runs on your own computer over standard input and output, and talks to the public API with your workspace key. There is no hosted MCP address: nothing runs in the cloud on your behalf.
calls:write can place real calls that use your minutes, and contacts:write can change or delete contacts. Use a key with only the scopes you want the assistant to have, keep it in a secrets manager rather than in a shared file, and run the server only on a machine you trust.Before you start
- Node.js 20 or newer installed on the machine that runs your assistant.
- An API key. In Settings → Developer access → API Keys → Secrets, create a key with the scopes you want to hand to the assistant. See Authentication. A publishable key also works, but then only the read tools succeed.
- A quick check that the key works before you wire it up:
curl -sS -X GET "https://api.stage.dhvanee.com/v1/account" \
-H "Authorization: Bearer dhvanee_live_YOUR_KEY"Settings
| Variable | Required | Purpose |
|---|---|---|
DHVANEE_API_KEY | Yes | Your workspace key, for example dhvanee_live_YOUR_KEY. |
DHVANEE_API_BASE | No | The API address. Defaults to https://api.stage.dhvanee.com. A trailing / is ignored. |
The key is read each time a tool is used. Without it the tool answers DHVANEE_API_KEY is required before any public API request.
Cursor and Claude Desktop
Add this to the MCP settings of Cursor, or to the Claude Desktop configuration file, then restart the app:
{
"mcpServers": {
"dhvanee": {
"command": "npx",
"args": ["-y", "@dhvanee/mcp"],
"env": {
"DHVANEE_API_KEY": "dhvanee_live_YOUR_KEY",
"DHVANEE_API_BASE": "https://api.stage.dhvanee.com"
}
}
}
}Claude Code
claude mcp add dhvanee \
--env DHVANEE_API_KEY=dhvanee_live_YOUR_KEY \
--env DHVANEE_API_BASE=https://api.stage.dhvanee.com \
-- npx -y @dhvanee/mcpRun it from a local copy
If you have the Dhvanee package on disk instead of installing it with npx, point the command at its start file (Node 20 or newer):
{
"mcpServers": {
"dhvanee": {
"command": "node",
"args": ["/absolute/path/to/packages/mcp/bin/dhvanee-mcp.js"],
"env": {
"DHVANEE_API_KEY": "dhvanee_live_YOUR_KEY",
"DHVANEE_API_BASE": "https://api.stage.dhvanee.com"
}
}
}
}What the assistant can use
There is one tool for every operation of the public API: 44 in all. A tool is named after its operation, its arguments are the same as the API's (path ids and query values by name, headers such as Idempotency-Key, and a body object for requests that send one), and it needs the same scope as the matching route.
| Area | Tools | Scope |
|---|---|---|
| Contacts | listContacts, createContact, getContact, updateContact, deleteContact | contacts:read / contacts:write |
| Calls | listCalls, createCall, getCall, stopCall | calls:read / calls:write |
| Campaigns | listCampaigns, createCampaign, getCampaign, startCampaign, pauseCampaign, resumeCampaign, cancelCampaign | campaigns:read / campaigns:write |
| Agents | listAgents, createAgent, getAgent, updateAgent, deleteAgent, getAgentWorkflow, putAgentWorkflow, publishAgent, listAgentVersions, getAgentVersion | agents:read / agents:write |
| Knowledge | listKnowledgeDocuments, uploadKnowledgeDocument, deleteKnowledgeDocument, getAgentKnowledge, putAgentKnowledge | knowledge:read / knowledge:write |
| Automations | listAutomations, createAutomation, getAutomation, updateAutomation, activateAutomation, runAutomation, getAutomationRun | automations:read / automations:write |
| Account | getAccount | account:read |
| Copilot | createCopilotTurn | copilot:use |
| Phone numbers | listPhoneNumbers, importPhoneNumber, attachPhoneNumber, detachPhoneNumber | numbers:read / numbers:write |
- There is deliberately no tool to buy or search for a number, add money to a wallet, change plan, check out or transfer credit. The server refuses to start if such an operation ever appears in the API description.
- Webhooks and keys are not tools. They are managed in the dashboard.
What comes back
Each tool returns the API's answer as JSON text with four fields:
{
"status": 200,
"ok": true,
"headers": {"content-type": "application/json"},
"body": {"items": [], "limit": 5, "offset": 0}
}- A refused request, such as
401,402,403,404,422or429, comes back as a normal result withokset tofalseand the error inbody. The assistant should readstatusandbody.detail; see Errors. - Only a missing key, an unknown tool, a missing path value or a network failure is reported as a tool error.
- Requests carry the header
X-Dhvanee-Client: mcp/1.0, so they show up under MCP in Settings → Developer access → Developer logs, apart from your own API traffic. - Calls from the assistant count against the key's rate limit of 60 a minute. Ask it to go steadily when it works through a long list. See Rate limits.
Try it
After restarting your assistant, ask it something safe that only reads:
- "List my five most recent contacts."
- "What is left of my voice minutes this month?" (uses
getAccount)
If it says it cannot find a tool, check that Node 20 or newer is installed and that the server shows as connected in your assistant's MCP settings. If a tool answers 401, the key is wrong or revoked; 403 means the key lacks the scope that tool needs.