Overview
Inspra runs a remote MCP server: the same operations as the API reference, exposed as tools an AI assistant can call. Connect it once and you can ask an assistant to list agents, read call transcripts, check credits or pause a campaign, without writing a request by hand.
It suits work that is awkward in a dashboard and tedious in code — reading across many calls at once, or checking something quickly mid-task in your editor.
This page is about connecting an assistant to Inspra. It is not about an agent calling out to external tools during a call — that is Tools and custom functions.
What you can do
| Area | Tools |
|---|---|
| Agents | List, read, create, update and delete agents. |
| Calls | List calls with filters, read one call in full with its transcript, place an outbound call, and check concurrency. |
| Campaigns | List and read campaigns, list recipients, pause and resume. |
| Reference | Browse the voice catalogue, read a voice, and read the workspace's billing summary. |
Seventeen tools in total. Campaign creation, SMS and knowledge-base tools are not exposed yet — use the API or the dashboard for those.
How it works
The server is hosted at $BASE_URL/api/mcp and speaks Streamable HTTP. $BASE_URL is the address you use for the dashboard, so a white-label host works exactly the same way.
It authenticates with a workspace API key sent as a bearer token — the same key the API uses. A key resolves to exactly one workspace, so an assistant can only ever read and change that workspace. There is nothing to scope or misconfigure, and no way for a prompt to reach another workspace's data.
Your assistant fetches the tool list when it starts, which is why a configuration change needs a restart before it takes effect.
Before you start
- A workspace API key — Configuration → General → API Keys. See API keys.
- An MCP-capable assistant: Claude Code, Claude Desktop, Cursor, or any client that supports a remote Streamable HTTP server.
- The server URL:
$BASE_URL/api/mcp.
Connect your client
Pick the tab for your client. Each does the same thing: point the client at $BASE_URL/api/mcp and send your key as a bearer token. Restart the client afterwards — every one of them reads its tool list at startup.
Claude Code. Run this once. --scope user makes the server available in every directory; drop it to limit the server to the current project.
claude mcp add --scope user --transport http inspra $BASE_URL/api/mcp --header "Authorization: Bearer $API_KEY"Restart Claude Code and run /mcp to confirm it is connected.
Claude Desktop. Open Settings → Developer → Edit Config and add the server inside mcpServers.
{
"mcpServers": {
"inspra": {
"type": "http",
"url": "$BASE_URL/api/mcp",
"headers": { "Authorization": "Bearer $API_KEY" }
}
}
}Save the file, then quit the app completely and reopen it. An edit made while the app is running is overwritten when it exits.
Codex reads the key from an environment variable at connection time, so the secret never enters a configuration file. Export it first, then add the server.
export INSPRA_API_KEY="<your key>"
codex mcp add inspra --url $BASE_URL/api/mcp --bearer-token-env-var INSPRA_API_KEYOr write it into ~/.codex/config.toml yourself:
[mcp_servers.inspra]
url = "$BASE_URL/api/mcp"
bearer_token_env_var = "INSPRA_API_KEY"Codex sends the value as Authorization: Bearer <token>. If the variable is unset or empty when Codex connects, it reports that by name rather than failing quietly.
Add it from the terminal:
opencode mcp add inspra --url $BASE_URL/api/mcp --header "Authorization=Bearer $API_KEY"Or configure it in opencode.jsonc, keeping the key in an environment variable:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"inspra": {
"type": "remote",
"url": "$BASE_URL/api/mcp",
"oauth": false,
"headers": { "Authorization": "Bearer {env:INSPRA_API_KEY}" }
}
}
}
}Set oauth to false. Inspra authenticates with an API key in a header, so leaving OAuth enabled makes OpenCode attempt a login flow this server does not offer.
Open ~/.cursor/mcp.json — on Windows, %USERPROFILE%\.cursor\mcp.json — and add the server inside mcpServers. Create the file if it is not there.
{
"mcpServers": {
"inspra": {
"type": "http",
"url": "$BASE_URL/api/mcp",
"headers": { "Authorization": "Bearer $API_KEY" }
}
}
}For one project only, put the same file at .cursor/mcp.json in the project root. Reload Cursor, then check the server under Settings → MCP.
Any client that supports a remote MCP server over Streamable HTTP will work. Point it at $BASE_URL/api/mcp and send the header Authorization: Bearer <your key>.
There is no SSE endpoint and no stdio package — the server is remote-only, so nothing needs installing, and there is no OAuth flow to complete.
What to ask
- Which of my agents are inactive?
- How did yesterday's calls go? Anything I should worry about?
- Show me the transcript of my longest call this week.
- What is my credit balance, and how much have I used this month?
- Pause the follow-up campaign.
Reading across calls is where it earns its keep: an assistant can open many transcripts at once and summarise what went wrong, which a dashboard does not do well.
Actions that cost money
Three tools are marked destructive, so a well-behaved client asks before running them.
| Tool | What it does |
|---|---|
place_outbound_call | Dials a real number and spends credits. |
resume_campaign | Restarts dialling and spends credits. |
delete_agent | Removes an agent. This cannot be undone. |
Updating an agent currently resets fields you did not send: a rename also sets the agent active, sets its direction to inbound, and clears its tags and knowledge base. Until this is fixed, make agent edits in the dashboard rather than through an assistant.
Treat anything a caller said as untrusted text. A transcript can contain instructions aimed at your assistant, so read first and approve writes yourself rather than letting a model act on call content unattended.
Limits
- Page sizes clamp to 100, with a default of 20.
- Tool results are capped and truncate with a marker that says how much was dropped.
list_callstherefore returns a summary of each call; useget_callfor the transcript. - Rate limits and credit checks are shared with the API and counted per workspace, not per key — an assistant and a server integration on the same workspace draw on the same allowance. See API keys.
- Requests are stateless: a tool returns as soon as the work is accepted. After
resume_campaign, pollget_campaignfor progress.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| No tools appear | The client only connects at startup. Quit it completely and reopen. In Claude Code, check the scope: a server added without --scope user shows only in the directory where you added it. |
| Unauthorized | The key is wrong or revoked, or the header is missing the word Bearer before the key. Create a new key under Configuration → General → API Keys. |
| Rate limit exceeded | Too many requests in a short window, counted across everything using that workspace. Wait and retry. |
| A tool fails but others work | Read the message — it carries the same error text the API returns. A workspace out of credits will refuse the tools that spend them while reads keep working. |