Thin Model Context Protocol server that exposes a curated subset of the
QuantDinger Agent Gateway (/api/agent/v1) as MCP tools, so AI clients
that support MCP (Cursor, Claude-style desktop apps, OpenClaw, NanoBot, etc.)
can drive QuantDinger without writing custom HTTP code.
This package is an additive integration. The Agent Gateway REST API remains the source of truth.
Read-class (R) and Backtest-class (B) tools only — no live trading from
MCP. Use the REST /api/agent/v1/quick-trade/... endpoints if/when you
explicitly enable trading for an agent.
| Tool | Class | Purpose |
|---|---|---|
whoami |
R | Inspect the calling token |
list_markets |
R | Markets the token may query |
search_symbols |
R | Symbols within a market |
get_klines |
R | OHLCV bars |
get_price |
R | Latest price |
list_strategies |
R | Tenant's strategies |
get_strategy |
R | One strategy |
submit_backtest |
B | Queue a backtest |
get_job |
R | Poll a job |
regime_detect |
B | Synchronous regime detection |
submit_structured_tune |
B | Queue grid/random tuning |
From PyPI (recommended — works on any machine without cloning the repo):
pipx install quantdinger-mcp
# or, no install at all (cached on first run):
uvx quantdinger-mcp
# or, into a venv:
pip install quantdinger-mcpEditable install for hacking on the server itself:
cd mcp_server
pip install -e .Configuration is env-only so the same binary works in desktop and cloud.
| Variable | Required | Purpose |
|---|---|---|
QUANTDINGER_BASE_URL |
yes | e.g. http://localhost:8888 |
QUANTDINGER_AGENT_TOKEN |
yes | a token issued via /api/agent/v1/admin/tokens |
QUANTDINGER_MCP_TRANSPORT |
no | stdio (default), sse, or streamable-http |
QUANTDINGER_MCP_HOST |
no | bind host for HTTP transports (default 127.0.0.1) |
QUANTDINGER_MCP_PORT |
no | bind port for HTTP transports (default 8000) |
QUANTDINGER_TIMEOUT_S |
no | upstream HTTP timeout (default 60) |
QUANTDINGER_BASE_URL=http://localhost:8888 \
QUANTDINGER_AGENT_TOKEN=qd_agent_xxxxx \
quantdinger-mcpQUANTDINGER_BASE_URL=http://localhost:8888 \
QUANTDINGER_AGENT_TOKEN=qd_agent_xxxxx \
QUANTDINGER_MCP_TRANSPORT=streamable-http \
QUANTDINGER_MCP_HOST=0.0.0.0 \
QUANTDINGER_MCP_PORT=7800 \
quantdinger-mcpThe server is then reachable at http://<host>:7800/. Use sse instead of
streamable-http for clients that only support the older SSE transport.
{
"mcpServers": {
"quantdinger": {
"command": "quantdinger-mcp",
"env": {
"QUANTDINGER_BASE_URL": "http://localhost:8888",
"QUANTDINGER_AGENT_TOKEN": "qd_agent_xxxxxxxx"
}
}
}
}For clients that connect to an MCP server over HTTP/SSE rather than spawning
a subprocess, point them at the URL the server is bound to (e.g.
http://your-host:7800) and let the client handle protocol negotiation.
Never put production exchange keys or admin JWTs in the MCP config — only agent tokens, scoped to the capabilities the client actually needs.