WorldQuant MCP
Automates WorldQuant BRAIN alpha research workflows, including simulation, reference search, and alpha submission through MCP tools.
README
WorldQuant MCP
A Python MCP server for automating WorldQuant BRAIN alpha-research workflows, plus a local reference pipeline that converts documentation into LLM-friendly artifacts. Built as a personal research-engineering project.
Note: This is an independent, unofficial project and is not affiliated with or endorsed by WorldQuant. WorldQuant's platform documentation is not included in this repository — you supply your own PDF (see Reference ingestion). Use of the BRAIN API is subject to WorldQuant's own terms.
Status
Initial working scaffold in place.
Current capabilities:
- Load credentials from
.envorWQ_BRAIN_*environment variables. - Convert scanned or text-based PDFs into markdown and chunked JSON.
- Authenticate against
api.worldquantbrain.com. - Search local operator/reference material.
- Fetch platform operators, account details, and data fields.
- Turn text hypotheses into field proxies and expression templates.
- Ingest external research links or notes into mechanism summaries.
- Mutate seed expressions into nearby variants.
- Submit simulations and poll simulation progress.
- Simulate batches of expressions and rank the results.
- Fetch alpha details and submission status.
- Validate whether an alpha is ready to submit and summarize blockers.
- Compare candidate expressions against recent alphas and logged experiments.
- Persist local experiment memory for future agents.
- Submit alphas behind an explicit confirmation flag.
Reference ingestion
The first implemented component is the PDF ingestion pipeline.
.venv/Scripts/python.exe -m pip install -e .
wq-ingest-reference --input wq-ops.pdf
Generated artifacts (produced locally, git-ignored — not committed):
src/worldquant_mcp/reference/data/wq-ops.mdsrc/worldquant_mcp/reference/data/wq-ops.chunks.json
If the PDF has no text layer, the ingester falls back to OCR using in-process Python libraries so it still works on a clean Windows machine.
Running the MCP server
Install the package in editable mode:
.venv/Scripts/python.exe -m pip install -e .
Do not start the stdio MCP server manually if you want to use it from VS Code. VS Code should launch it for you from mcp.json.
Add this to your user-level mcp.json or workspace .vscode/mcp.json:
{
"servers": {
"worldquant-mcp": {
"type": "stdio",
"command": ".venv/Scripts/worldquant-mcp.exe",
"env": {
"WQ_BRAIN_EMAIL": "<your-email>",
"WQ_BRAIN_PASSWORD": "<your-password>"
}
}
}
}
After saving mcp.json, use the VS Code MCP server management UI to reload or start the server. Once it shows as running, the tools from this server become available to Copilot agents.
If you want to run the server yourself for debugging only, use one of these commands:
.venv/Scripts/worldquant-mcp.exe
Or run it via Python:
.venv/Scripts/python.exe -m worldquant_mcp
Timeout behavior
- Polling tools now default to bounded waits instead of open-ended multi-minute blocking.
wait_simulation,batch_simulate, andparallel_mechanism_searchdefault to180seconds.- Override with
timeout_secondswhen you intentionally want a longer or shorter wait. - Set
WQ_BRAIN_MAX_POLL_SECONDSif you want to change the client-wide default used by direct code paths. - 429 handling is now more robust in the shared client: temporary rate limits are retried with bounded backoff, and
CONCURRENT_SIMULATION_LIMIT_EXCEEDEDbacks off more aggressively before failing. - Tune
WQ_BRAIN_RATE_LIMIT_MAX_RETRIESandWQ_BRAIN_RATE_LIMIT_MAX_WAIT_SECONDSif you want stricter or looser retry behavior.
Example session
Once the server is running, an MCP-aware agent calls the tools directly. Illustrative output below (metric values are synthetic and field/alpha names are placeholders — no real platform data is shown):
> healthcheck
{ "status": "ok", "authenticated": true }
> get_platform_operators
[ "rank", "zscore", "ts_delta", "ts_backfill", "ts_decay_linear", "group_zscore", ... ]
> create_simulation expression="rank(<your_signal>)" settings=USA/TOP3000/delay=1
{ "status": "COMPLETE", "alpha_id": "<id>",
"is": { "sharpe": 1.21, "fitness": 0.74, "returns": 0.052, "turnover": 0.11 } }
> validate_alpha_submission_by_id alpha_id="<id>"
{ "ready": false, "blocking": ["LOW_FITNESS"], "pending": ["SELF_CORRELATION"] }
The operator names above are part of BRAIN's public expression language; the pipeline never hard-codes proprietary data fields or alpha identifiers.
Implemented tools
healthcheckget_accountget_platform_operatorssearch_local_referenceget_reference_operatorsget_data_fieldsget_recent_alphasget_alphaget_alpha_submissioncreate_simulationbatch_simulatesummarize_alpha_batch_by_idmutate_alpha_expressionmap_research_hypothesisingest_research_materialget_simulationwait_simulationanalyze_alpha_noveltylog_alpha_experimentlist_alpha_experimentsvalidate_alpha_submission_by_idsubmit_alpha_by_id
Research Notes
docs/mcp-roadmap.mdtracks pragmatic MCP upgrades for alpha research.docs/quant-journey.mdis a running experiment log for future agents.src/worldquant_mcp/data/experiment_memory.jsonstores the same experiments in machine-readable form.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.