Skip to main content

Model Context Protocol (MCP) server for the QuantDinger Agent Gateway — exposes market data, strategies, backtests and paper trading to AI agents (Cursor, Claude Code, Codex, OpenClaw, NanoBot, ...).

Project description

QuantDinger MCP server

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, 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.

What it exposes

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

Install (editable)

cd mcp_server
pip install -e .

Run

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)

stdio (desktop IDEs)

QUANTDINGER_BASE_URL=http://localhost:8888 \
QUANTDINGER_AGENT_TOKEN=qd_agent_xxxxx \
quantdinger-mcp

SSE / Streamable HTTP (cloud agents, remote IDEs)

QUANTDINGER_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-mcp

The server is then reachable at http://<host>:7800/. Use sse instead of streamable-http for clients that only support the older SSE transport.

Wire into a client

Local stdio client config

{
  "mcpServers": {
    "quantdinger": {
      "command": "quantdinger-mcp",
      "env": {
        "QUANTDINGER_BASE_URL": "http://localhost:8888",
        "QUANTDINGER_AGENT_TOKEN": "qd_agent_xxxxxxxx"
      }
    }
  }
}

Remote HTTP client config

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantdinger_mcp-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantdinger_mcp-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file quantdinger_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: quantdinger_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for quantdinger_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5499e7d032eb41d7b081e5f6be278e4fde66ddd1ddc269dba3ec3db0470cf286
MD5 2d8b4f6292ac217ca2b37831c5ea8b40
BLAKE2b-256 0beec1ac390b227cd296b84fce21d08def8b9b1bb56b52d51ac81f5550ed4cfc

See more details on using hashes here.

File details

Details for the file quantdinger_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quantdinger_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eaecacb41a2479f9253a4261aef176033fb867c1e16de36bfc31e4809ed1d302
MD5 0a50a767af7fccf5c778cb6ab8f22396
BLAKE2b-256 b2d2d77feb0b7f16c2ad64b1f378522dfed6e06b95e0e09703a23ef631477a11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page