What is QuantSpace?
QuantSpace is a Model Context Protocol server that exposes an end-to-end ML trading pipeline as a set of tools callable by any MCP-compatible client (Cursor, Claude Code, or custom agents). Each tool triggers a pipeline job, waits for it to complete, and returns an output blob URL — ready to pass directly to the next step.Architecture
Pipeline at a Glance
QuantSpace provides 9 tools. The core pipeline has 5 sequential stages, and 3 analytics/reporting tools are available after portfolio optimization:| Step | Tool | Input | Output prefix |
|---|---|---|---|
| 1 | run_data_extraction | config | data_extractor_ |
| 2 | run_feature_worker | input_url (data_extractor_) | feature_engine_ |
| 3a | run_ml_job | feature_url + data_extractor_url | ml_engine_ |
| 3b | run_dl_job | feature_url + data_extractor_url | nn_engine_ |
| 4 | run_po_job | input_url (ml_engine_ or nn_engine_) | portfolio_optimization_ |
| 5 | run_trading_job | input_url (portfolio_optimization_) | trading_report_ |
| 6 | run_plot_job | input_url (any prior stage output) + plot config | plot_ |
| 7 | run_st_job | input_url (portfolio_optimization_) + stress config | stress_test_ |
| 8 | run_risk_job | input_url (portfolio_optimization_) + risk config | risk_ |
Key Design Principles
Synchronous by design
Every tool blocks until the pipeline job reaches a terminal state (
Succeeded, Failed, Stopped). No separate polling needed.URL chaining
Each tool returns
output_url — pass it directly as input_url to the next tool. The LLM handles the chain automatically.Open access
Authentication is currently disabled. Any MCP-compatible client can connect without a token or login.
Tracing
Every tool call emits a custom
mcp_tool_called event with user ID, duration, and success flag.