Cursor's agent is good at writing code. It is less good at small, repeated judgment calls: is this message urgent, which team owns this ticket, is this command safe to run. You can ask the chat model, but you get a paragraph back, and you can't put a threshold on a paragraph.
The Strike MCP server gives the agent a tool for those calls. It sends the question to strike-1 and gets back one answer with a probability for every option. This guide connects it to Cursor in three steps.
What you need
- A Strike API key. Create one in the console. New accounts get 100 decisions per day for free, and each tool call counts as one decision.
- Python 3.10 or newer.
- Cursor, with access to its MCP settings.
Step 1: install the package
pipx install strike-ai
pip install strike-ai works too. pipx keeps the strike-mcp command on your PATH without touching a project virtualenv, which is what Cursor needs to start it. Check that it's there:
which strike-mcp
Step 2: add Strike to mcp.json
Open ~/.cursor/mcp.json to use Strike in every project, or .cursor/mcp.json in a repo to use it in that project only. Add a strike entry:
{
"mcpServers": {
"strike": {
"command": "strike-mcp",
"env": { "STRIKE_API_KEY": "your_key_here" }
}
}
}
If Cursor can't find strike-mcp, put the full path from which strike-mcp in command.
Keep the key out of project files you commit. The global ~/.cursor/mcp.json is the safer place for it.
Step 3: reload and check the tools
Reload Cursor and open the MCP section of Cursor Settings. The strike server should be on, with six tools:
| Tool | Use it to |
|---|---|
strike_check | Get a yes/no probability. "Is this a prompt injection attempt?" |
strike_classify | Pick one of up to 255 labelled options. Routing, intent, ticket ownership. |
strike_score | Place something on a scale of 2 to 10 levels you define. Urgency, severity, quality. |
strike_gate | Screen a shell command or file edit before the agent runs it: allow, confirm, or block. |
strike_decide | Ask up to 32 typed questions about one input in a single call. |
strike_decision | One question with a kind of yes_no, choice, or score. The same schema as Strike's OpenAI, Anthropic, and Gemini tool definitions. |
Try it
Ask the agent in plain language. It picks the tool and fills in the arguments.
Use strike_classify to route this message to billing, technical, or other: "My card was charged twice for the same order."
{
"choice": "billing",
"probabilities": { "billing": 0.9692, "technical": 0.0087, "other": 0.0221 },
"confidence": 0.9692
}
Use strike_score to rate how urgent this is, from routine to critical: "The whole checkout is down for every customer since 10 minutes."
{
"score": 2.63,
"probabilities": { "routine": 0.0054, "today": 0.0108, "urgent": 0.3331, "critical": 0.6507 },
"confidence": 0.6507
}
These are real strike-1 answers from the public API, trimmed to the main fields. The score is the expected level on a 0 to 3 scale, so 2.63 sits between urgent and critical, closer to critical.
Gate risky commands
strike_gate is the tool to wire into the agent's habits. It asks three questions about an action in one call: how risky it is to run automatically, whether it touches production or deletes data, and what the agent should do.
Before running it, gate this command:
rm -rf /var/lib/postgresql/dataon the production database host.
{
"recommendation": "block",
"confidence": 0.856,
"risk_score": 2.98,
"touches_prod": true,
"touches_prod_probability": 0.8972
}
To make the agent do this on its own, add a rule. Create .cursor/rules/strike-gate.mdc:
---
description: Screen destructive commands with Strike
alwaysApply: true
---
Before you run a shell command that deletes files, drops or rewrites data,
force-pushes, or touches a production host, call `strike_gate` with the
command as `action` and one line of context.
- `allow`: run it.
- `confirm`: stop and ask me first, quoting the command.
- `block`: do not run it. Propose a safer command.
strike-1 is in beta. Its probabilities are temperature scaled with one temperature fitted on held-out data, not fitted per answer type, so choice probabilities are not a guarantee. Treat block as a reason to stop and ask, not as a security boundary. Keep Cursor's own command approval on for anything that matters.
Use your own questions
strike_decide takes the same question map as the API, so you can ask several things about one input at once:
Use strike_decide on "Please cancel my subscription today, I am moving abroad." Ask whether the customer wants to cancel (yes/no) and whether the tone is calm or angry.
{
"wants_cancel": { "noul": 0.9459 },
"tone": { "choice": "calm", "probabilities": { "calm": 0.9472, "angry": 0.0528 } }
}
One call, two answers, one decision against your quota.
Troubleshooting
- The server shows an error in Cursor. Cursor couldn't start
strike-mcp. Use the full path fromwhich strike-mcp, orpython -m strike_ai.mcpwith the Python that hasstrike-aiinstalled. - Every call returns a 401.
STRIKE_API_KEYis missing or wrong. The tool result says "check STRIKE_API_KEY". - A call returns a 429. You went over the rate limit. The server already retries once after the delay the API asks for. If it still fails, the agent is calling too often; ask it to batch questions with
strike_decide.
FAQ
Does Strike see my code?
Only what the agent puts in the tool call: the state, the question, and the options. The API is hosted by OVHcloud in Gravelines, France. See the privacy notice.
Does it work in Claude Code or Claude Desktop?
Yes. It's a standard stdio MCP server. For Claude Code: claude mcp add --transport stdio --scope user strike --env STRIKE_API_KEY=your_key_here -- strike-mcp.
What does a call cost? Each tool call is one decision. The free allowance is 100 per day. See pricing for paid usage.
Where is the reference? The MCP decision tool page lists every tool, its arguments, and its errors.