Docs · Developers

MCP server & Claude

Spamurai has a built-in Model Context Protocol server. Connect Claude (or any MCP client) and ask it to look at lists, leads and revenue, or to set up lead fields, outcomes and integrations for you. It works on one space.

https://app.spamuraidialer.com/mcp

claude.ai and Claude Desktop

  1. In Claude: Settings → Connectors → Add custom connector → paste the MCP address.
  2. Claude sends you to Spamurai to sign in. An admin picks the space and what Claude may do (configure or read).
  3. Done; no key needed. The connection shows under Settings → API & MCP → Connected apps, where you can disconnect it.

Claude Code

Make an API key in Settings → API & MCP, then:

claude mcp add --transport http spamurai https://app.spamuraidialer.com/mcp \
  --header "Authorization: Bearer spk_…"

Settings shows this command with your key filled in, right after you create it.

Tools

ToolScopeWhat it does
list_listsreadAll lead lists with counts, fields and outcomes
get_listreadOne list in full
search_leadsreadFind leads by text, digits, list, status or waiting
get_leadreadOne lead with notes, fields, calls and results
list_outcomesreadThe outcome library
list_integrationsreadIntegrations and their last calls
revenue_reportreadCalls, sales and revenue by caller, list or day
integration_guidereadHow to build an integration
update_lead_fieldsconfigureSet field values on a lead
save_list_fieldsconfigureReplace a list’s lead fields
save_outcomeconfigureCreate or change a library outcome
add_outcome_to_listconfigureAdd a library outcome to a list
save_integrationconfigureCreate or change an integration
test_integrationconfigureSend a signed test event
post_resultconfigureRecord an integration result on a lead

Inputs and outputs match the REST API. A read connection only lists the read tools. The integration guide is also a resource: spamurai://guide/integrations.

Things to ask Claude

  • “How much revenue did each caller bring in this month?”
  • “Which leads in the Gyms list are still waiting for a payment?”
  • “Add a Package field to the Gyms list with the options 8 weeks and 12 weeks.”
  • “Read the Spamurai integration guide and build a payment-link integration, then add a ‘Send payment link’ outcome to my list.”

Technical details

  • Transport: Streamable HTTP, stateless. Each POST /mcp carries one JSON-RPC message or a batch and is answered as JSON. No server-sent events stream and no sessions.
  • Protocol versions: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05.
  • OAuth 2.1 as the MCP spec describes: protected resource metadata at /.well-known/oauth-protected-resource, server metadata at /.well-known/oauth-authorization-server, dynamic client registration at /oauth/register, PKCE (S256) required, scopes configure and read.
  • Tokens: access tokens (spa_…) last 1 hour; refresh tokens last 60 days and are rotated on use. Only hashes are stored. They also work on /api/v1.
  • Redirect addresses: https anywhere, or http on localhost for desktop clients.
  • Browser requests from other sites are refused (an Origin check); Claude’s own clients are allowed.
  • Without a token, /mcp answers 401 with a WWW-Authenticate header that tells the client where to sign in.