mcp-server-worldquantbrain
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| WQB_EMAIL | No | Login email. Wins over the credentials file. | |
| WQB_LEDGER | No | Reuse results of identical simulations when true. | true |
| WQB_BASE_URL | No | Base URL for the BRAIN API. Must be set in the real environment, not in .env. | |
| WQB_PASSWORD | No | Login password. Wins over the credentials file. | |
| WQB_CACHE_DIR | No | Directory for the catalogue cache and simulation ledger. | ~/.cache/worldquantbrain-mcp |
| WQB_CACHE_TTL | No | Cache lifetime in seconds. Set to 0 to disable the cache. | per catalogue |
| WQB_LOG_LEVEL | No | Log level. Logs go to stderr. | INFO |
| WQB_ALLOW_SUBMIT | No | Expose the submit_alpha tool when true. | false |
| WQB_HTTP_TIMEOUT | No | Seconds per HTTP request. | 30 |
| WQB_SESSION_FILE | No | Path to the saved session file. Delete it to log out. | ~/.config/worldquantbrain-mcp/session.json |
| WQB_DEFAULT_DECAY | No | Default decay used when a call leaves the setting out. | 0 |
| WQB_DEFAULT_DELAY | No | Default delay used when a call leaves the setting out. | 1 |
| WQB_DEFAULT_REGION | No | Default region used when a call leaves the region out. | USA |
| WQB_SUBMIT_CONFIRM | No | Ask the user before submission where the client supports it; set to none to skip asking. | elicit |
| WQB_CREDENTIALS_FILE | No | Path to the credentials JSON file containing ["email", "password"]. | ~/.config/worldquantbrain-mcp/credentials.json |
| WQB_DEFAULT_UNIVERSE | No | Default universe used when a call leaves the universe out. A call for another region must name its universe. | TOP3000 |
| WQB_DEFAULT_MAX_TRADE | No | Default max trade used when a call leaves the setting out. | OFF |
| WQB_HTTP_BEARER_TOKEN | No | Bearer token required by the HTTP transport on a non-local address. | |
| WQB_POLL_MAX_INTERVAL | No | Longest pause between status polls, in seconds. | 30 |
| WQB_DEFAULT_TRUNCATION | No | Default truncation used when a call leaves the setting out. | 0.08 |
| WQB_SIMULATION_TIMEOUT | No | Seconds a blocking simulation waits. | 900 |
| WQB_DEFAULT_TEST_PERIOD | No | Default test period used when a call leaves the setting out. | none |
| WQB_DEFAULT_NAN_HANDLING | No | Default NaN handling used when a call leaves the setting out. | OFF |
| WQB_DEFAULT_UNIT_HANDLING | No | Default unit handling used when a call leaves the setting out. | VERIFY |
| WQB_DEFAULT_NEUTRALIZATION | No | Default neutralization used when a call leaves the setting out. | INDUSTRY |
| WQB_DEFAULT_PASTEURIZATION | No | Default pasteurization used when a call leaves the setting out. | ON |
| WQB_DEFAULT_INSTRUMENT_TYPE | No | Default instrument type used when a call leaves the setting out. | EQUITY |
| WQB_SUBMIT_CORRELATION_GATE | No | Refuse submission at or above this self-correlation value; set to 0 to disable. | 0.7 |
| WQB_MAX_CONCURRENT_SIMULATIONS | No | Maximum number of blocking simulation calls this process runs at once. | 2 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Workflow for WorldQuant BRAIN: find data with list_datasets, list_datafields and list_operators, then call simulate_alpha. Read in_sample stats and failed_checks in the result and iterate. Before proposing submission, call check_alpha_submission and get_alpha_self_correlation.
Simulations spend a finite quota and take minutes. If simulate_alpha returns PENDING, resume with get_simulation_status and never start the same simulation again. Tools log in by themselves. If a tool reports a biometric check, give the user the URL and call complete_authentication once they are done. Submission is permanent: submit only when the user explicitly asks.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_alphaB | Return an alpha's expression, settings, in-sample stats and submission checks. |
| list_alphasB | Search the user's alphas. Use next_offset to page; BRAIN stops at offset 10,000. |
| get_alpha_pnlB | Summarize an alpha's PnL by year, with optional recent daily cumulative values. |
| list_alpha_recordsetsA | List the recordset names available for an alpha, for use with get_alpha_recordset. |
| get_alpha_recordsetA | Return one recordset as named rows. Prefer get_alpha_pnl for PnL. |
| update_alphaC | Change an alpha's name, description, tags, color, category, favorite or hidden flag. |
| check_alpha_submissionB | Run BRAIN's pre-submission checks. verdict is PASS, WARNING, FAIL or PENDING. |
| get_alpha_self_correlationB | Return the alpha's highest correlation with the user's submitted alphas (limit 0.7). |
| get_alpha_prod_correlationB | Return the alpha's correlation with the production pool. Some account tiers get a 403. |
| authenticateA | Log in with the configured credentials, reusing a saved session when it is still valid. |
| complete_authenticationA | Finish a login after the user completed the biometric check at biometric_url. |
| auth_statusA | Report whether a BRAIN session is active and when it expires. Never sends the password. |
| list_datasetsC | List datasets available for a market. Cached for a day. |
| get_datasetB | Return one dataset with its full description, for example dataset_id 'pv1'. |
| list_datafieldsA | Find the data fields usable in expressions. |
| get_datafieldC | Return one data field with its full description, for example field_id 'close'. |
| list_data_categoriesA | Return the data category tree. Cached for a day. |
| list_operatorsA | List the FASTEXPR operators this account can use. Cached for a week. |
| simulate_alphaA | Backtest one FASTEXPR expression and return its alpha with stats and checks. |
| simulate_alphas_batchA | Backtest up to 30 expressions, sent to BRAIN in groups of at most 10. |
| get_simulation_statusB | Check or resume a simulation. A finished one includes its alpha; a batch lists children. |
| get_simulation_optionsA | List the regions, universes, delays and neutralizations this account may simulate. |
| get_user_profileA | Return the user's BRAIN profile. Personal fields are withheld by default. |
| get_user_activityA | Return simulation or submission counts: yesterday, month to date, year to date, total. |
| list_messagesA | Return platform messages, newest first, as plain text capped at 2,000 characters each. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| design_alpha | Research loop: pick data, write an expression, simulate, then improve it. |
| review_alpha | Assess an alpha's checks, correlation and PnL, and suggest concrete changes. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| operators | FASTEXPR operators. |
| simulation_options | Valid simulation settings for this account. |
| fastexpr-cheatsheet | BRAIN reference: fastexpr cheatsheet. |
| settings-guide | BRAIN reference: settings guide. |
| submission-criteria | BRAIN reference: submission criteria. |
TDQS
Scored across 25 tools
Most tools target a distinct resource+action pair (get_dataset vs list_datasets, get_datafield vs list_datafields, single vs batch simulation). Minor overlap: get_alpha already returns submission checks that check_alpha_submission runs separately, and the three auth-related tools (authenticate, complete_authentication, auth_status) require reading descriptions to distinguish.
Predominantly a clean verb_noun snake_case pattern (list_alphas, get_alpha_pnl, simulate_alpha, check_alpha_submission). A few deviations: auth_status is a noun phrase rather than a verb, and simulate_alpha / simulate_alphas_batch mix singular/plural forms.
At 25 tools this sits at the heavy end, though the domain legitimately spans data discovery, simulation, analysis, submission checks, user info and auth. Several tools could plausibly be folded together (e.g. authenticate + complete_authentication) to slim the surface.
Discovery, simulation, correlation and PnL analysis are well covered, and the resume/triage guidance avoids dead ends. However, the alpha lifecycle has notable gaps: there is a check_alpha_submission but no actual submit tool, and no delete_alpha or way to list simulation history beyond per-ID status.