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_datasetsB | 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_messagesB | 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
Tools are grouped into clear resource families (datasets/datafields, alphas, simulations, auth, user) and each action is largely distinct. The only real overlap is get_alpha_pnl vs get_alpha_recordset and get_dataset vs get_datafield, and the descriptions explicitly steer callers ('Prefer get_alpha_pnl for PnL'), which resolves the ambiguity in practice.
Almost everything follows a predictable snake_case verb_noun pattern (list_datasets, get_alpha, simulate_alpha, check_alpha_submission). Minor deviations: auth_status has no verb, and authenticate stands alone without a noun object, but the convention remains readable overall.
25 tools is at the upper edge of well-scoped; each maps to a real BRAIN operation, but several niche read tools (get_alpha_self_correlation, get_alpha_prod_correlation, list_alpha_recordsets, get_alpha_recordset, list_messages) could be folded into broader getters without losing capability.
Simulation, discovery, and alpha inspection are well covered, including batch runs, resume-via-status, and pre-submission checks. However, there is no tool to actually submit an alpha (only check_alpha_submission), no delete_alpha, and no way to enumerate past simulations independent of alphas, leaving lifecycle dead ends.