MCP decision tool
Give Cursor, Claude Code and Claude Desktop six strike-1 tools over stdio MCP with python -m strike_ai.mcp.
strike-ai ships a stdio MCP server. Install it with pip install strike-ai. No extra dependencies.
Run the server
export STRIKE_API_KEY="your_key_here"
python -m strike_ai.mcpEquivalent console script after install: strike-mcp.
Configure in Cursor or Claude Desktop MCP settings with command python -m strike_ai.mcp and the same environment variables. Base URL defaults to https://strike-ai.eu.
For Cursor, add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"strike": {
"command": "strike-mcp",
"env": { "STRIKE_API_KEY": "your_key_here" }
}
}
}Where it runs
This process runs on your machine. The editor starts it and speaks MCP over stdin and stdout. Strike does not host this server.
Each tool sends POST /v1/systemone to STRIKE_API_URL, which defaults to https://strike-ai.eu. Inference stays in France. See EU hosting and data.
Traces
Traces are on unless you set STRIKE_TRACE=0. The API writes them for the account that owns STRIKE_API_KEY. Open them on Traces.
The request text is included. Set STRIKE_CAPTURE_CONTENT=0 to keep the decision and drop that text.
Calls from one process share a run. If the client sends a chat id, that id is the run, so one chat is one row.
Tools
Each tool makes one POST /v1/systemone call and returns the answer with its probabilities.
| Tool | Arguments | Returns |
|---|---|---|
strike_decision | question, kind (yes_no, choice, score), options, context | answer, probabilities, confidence |
strike_classify | state, instructions, options (key to description, 2-255 entries) | choice, probabilities, confidence |
strike_score | state, instructions, levels (2-10, lowest first) | score, probabilities, confidence |
strike_check | state, instructions (a yes/no question) | probability, likely |
strike_gate | action, optional context | recommendation (allow, confirm, block), risk_score, touches_prod |
strike_decide | state, questions (up to 32, same format as the API) | answers, usage |
strike_gate asks three questions about the action in one call: how risky it is to run automatically, whether it touches production or deletes data, and what the agent should do. strike-1 is in beta, so treat block as a reason to stop and ask, not as a guarantee.
STRIKE_MODEL picks the model. The default is strike-1.
Protocol
- JSON-RPC 2.0, one message per line
initialize,tools/list,tools/call,pingstrike_decisionuses the same schema as the other providers. The five typed tools are MCP only.
Call from Python (testing)
import json
from strike_ai.mcp import handle
request = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "strike_check",
"arguments": {
"state": "Customer threatens legal action over a double charge.",
"instructions": "Should this be escalated to a human?",
},
},
}
response = handle(request)
print(response["result"]["structuredContent"]["probability"])Errors
A failed call returns a tool result with isError: true and an error message, so the agent loop keeps going. A rate-limited call (HTTP 429) is retried once after the retry_after the API sends, capped at 5 seconds. Unknown tools return JSON-RPC error code -32602. Unknown methods return -32601.