MCP Server

Run your support desk from Claude

Quick Start

SparkAI comes with a built-in MCP server. Connect it once and you can ask Claude about your tickets, chats and traffic in plain English, no dashboard needed.

1

Create an MCP key

Open the MCP page in your dashboard and create a key. Pick read if you only want Claude to look, or all if you want it to be able to act too. The key is shown once, so copy it right away.

2

Add the connector in Claude Desktop

Drop the config below into your Claude Desktop settings, paste your key in, and restart Claude.

3

Ask it something

Try "What tickets are open right now?" and you should get a real answer from your own desk.

Nothing is turned on for writing at this point. A brand new key can read, and that is all. See Writes are locked by default.

Connect It

The server speaks streamable HTTP at:

POST https://sparkbrain.app/api/mcp/mcp

If your client only supports Server-Sent Events, use the fallback:

GET https://sparkbrain.app/api/mcp/sse

A key is required

Unlike some of the other Spark apps, there is no anonymous mode here. Every request must carry Authorization: Bearer <your key>, and a token the server does not recognise gets a flat 401. There is no guest session to fall back to.

MCP keys look like spark_mcp-a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6. You create them in the dashboard, they are shown once, and they come in two scopes:

ScopeWhat it can do
readLook at everything, change nothing. Can never write, no matter what your dashboard switches say.
allCan also use the write tools, but only the ones you have switched on for your app.

Your app's REST API key (spark_ai-...) is not accepted by the MCP server. The two key types are separate on purpose, so a key that can chat cannot also work your desk. Use a spark_mcp- key here.

Claude Desktop config

Claude Desktop reaches remote servers through mcp-remote. Add this to your config file and swap in your own key:

claude_desktop_config.json
{
  "mcpServers": {
    "spark-ai": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://sparkbrain.app/api/mcp/mcp",
        "--header",
        "Authorization: Bearer spark_mcp-YOUR_KEY_HERE"
      ]
    }
  }
}

Restart Claude Desktop afterwards. If the connector does not appear, the usual causes are a typo in the key, a key that has expired, or an IP allowlist on your app that does not include the machine you are on.

Just Ask

You do not need to know any tool names. Ask the way you would ask a colleague:

  • "What tickets are open right now?"
  • "Summarise this week's conversations."
  • "Reply to ticket 412 telling them it's fixed."
  • "Who's waiting in live chat?"
  • "Add an FAQ about refunds."

Claude picks the right tool for you. The last two are writes, so they will ask you to approve before anything actually changes.

What It Can Reach

Twenty three tools in total: eighteen that only read, and five that can change something. Everything is scoped to your own app, so a key can never see another customer's data.

Reading

What it doesTool
Open and resolved tickets, newest firstlist_tickets
One ticket with its whole conversationget_ticket
Recent chats, metadata onlylist_recent_conversations
One chat with every messageget_conversation
Requests, tokens and open ticket countsusage_summary
Keyword search across tickets and chatssearch_support
The apps on your accountlist_apps
Your app's settings, never its secretsget_app_config
The prompt, FAQs and business info the bot answers fromget_knowledge_base
Your install package kit for repairing the widgetget_package_kit
Cached AI analysis: top topics, FAQ gaps, sentimentget_insights
Day by day usage for spotting trends and spikesusage_timeseries
Chat volume, depth, handoffs and top countriesconversation_stats
Who is waiting for a human, longest wait firstlivechat_queue
Leads captured through chatlist_contacts
One contact's full history with your appget_contact_history
Users with warnings or blockslist_moderated_users
Your own MCP keys, prefixes onlylist_mcp_keys

Writing

What it doesTool
Close a ticket, or reopen oneresolve_ticket
Post a reply the customer seesreply_to_ticket
Update the prompt, welcome message, FAQ list or widget toggleupdate_app_config
Add one FAQ without touching the rest of the listadd_faq
Mint a replacement key and retire the old onerotate_mcp_key

There are two more tools, plan_app_kit and create_app_kit, that register brand new apps. Those are reserved for the account operator key and are not reachable with a per-app spark_mcp- key.

Writes Are Locked By Default

A fresh key cannot change anything. Two separate gates stand in front of every write, and both have to open.

Gate one: your dashboard switches

Each write tool has its own switch on your app, and every one of them starts off. Turn on only what you want:

SwitchUnlocks
mcp_allow_resolve_ticketresolve_ticket
mcp_allow_reply_ticketreply_to_ticket
mcp_allow_update_configupdate_app_config and add_faq
mcp_allow_rotate_keysrotate_mcp_key

Without the switch, the tool returns write_access_disabled and nothing happens. Note that add_faq shares the config switch, since both are config writes.

Gate two: your click

Even with the switch on, every single write asks you first. Claude pops a confirm dialog naming exactly what is about to happen, including the ticket number or the text being sent, and the write only runs if you approve it. The model cannot tick that box for you.

It fails closed too. Decline it, ignore it, or let it time out and nothing is written. If the dialog itself errors, the write is refused rather than quietly allowed.

Two extra safeguards. A read scope key can never write, whatever your switches say. And rotate_mcp_key is deliberately two step: the first call only hands back an impact report, and you have to call it again with a confirmation phrase before a key actually moves.

Keeping Keys Safe

Your keys are stored as a hash, never in plain text, so nobody can read one back out of the database, us included. That is also why the full key is shown only once at creation. Lose it and you make a new one.

ControlWhat it gives you
Optional expiryHave a key die on its own after 30, 90 or 365 days.
IP allowlistOnly accept calls from addresses or ranges you name. Anything else is turned away before it reaches a tool.
Rate limitCap how many calls one key can make per minute.
RotationReplace a key from the dashboard, or ask Claude to via rotate_mcp_key. The old one goes on a countdown so nothing breaks mid-swap.
RevokeDelete a key outright and it stops working immediately.

Every key also tracks when it was last used and how many calls it has made, so you can spot one you have forgotten about. If a key ever leaks, rotate or revoke it and you are done.