Skip to main content
Glama
mcp-server-worldquantbrain

mcp-server-worldquantbrain

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
WQB_EMAILNoLogin email. Wins over the credentials file.
WQB_LEDGERNoReuse results of identical simulations when true.true
WQB_BASE_URLNoBase URL for the BRAIN API. Must be set in the real environment, not in .env.
WQB_PASSWORDNoLogin password. Wins over the credentials file.
WQB_CACHE_DIRNoDirectory for the catalogue cache and simulation ledger.~/.cache/worldquantbrain-mcp
WQB_CACHE_TTLNoCache lifetime in seconds. Set to 0 to disable the cache.per catalogue
WQB_LOG_LEVELNoLog level. Logs go to stderr.INFO
WQB_ALLOW_SUBMITNoExpose the submit_alpha tool when true.false
WQB_HTTP_TIMEOUTNoSeconds per HTTP request.30
WQB_SESSION_FILENoPath to the saved session file. Delete it to log out.~/.config/worldquantbrain-mcp/session.json
WQB_DEFAULT_DECAYNoDefault decay used when a call leaves the setting out.0
WQB_DEFAULT_DELAYNoDefault delay used when a call leaves the setting out.1
WQB_DEFAULT_REGIONNoDefault region used when a call leaves the region out.USA
WQB_SUBMIT_CONFIRMNoAsk the user before submission where the client supports it; set to none to skip asking.elicit
WQB_CREDENTIALS_FILENoPath to the credentials JSON file containing ["email", "password"].~/.config/worldquantbrain-mcp/credentials.json
WQB_DEFAULT_UNIVERSENoDefault universe used when a call leaves the universe out. A call for another region must name its universe.TOP3000
WQB_DEFAULT_MAX_TRADENoDefault max trade used when a call leaves the setting out.OFF
WQB_HTTP_BEARER_TOKENNoBearer token required by the HTTP transport on a non-local address.
WQB_POLL_MAX_INTERVALNoLongest pause between status polls, in seconds.30
WQB_DEFAULT_TRUNCATIONNoDefault truncation used when a call leaves the setting out.0.08
WQB_SIMULATION_TIMEOUTNoSeconds a blocking simulation waits.900
WQB_DEFAULT_TEST_PERIODNoDefault test period used when a call leaves the setting out.none
WQB_DEFAULT_NAN_HANDLINGNoDefault NaN handling used when a call leaves the setting out.OFF
WQB_DEFAULT_UNIT_HANDLINGNoDefault unit handling used when a call leaves the setting out.VERIFY
WQB_DEFAULT_NEUTRALIZATIONNoDefault neutralization used when a call leaves the setting out.INDUSTRY
WQB_DEFAULT_PASTEURIZATIONNoDefault pasteurization used when a call leaves the setting out.ON
WQB_DEFAULT_INSTRUMENT_TYPENoDefault instrument type used when a call leaves the setting out.EQUITY
WQB_SUBMIT_CORRELATION_GATENoRefuse submission at or above this self-correlation value; set to 0 to disable.0.7
WQB_MAX_CONCURRENT_SIMULATIONSNoMaximum 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

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

Tools log in on their own, so this is only needed to start or restart a biometric check. When
state is biometric_required, have the user open biometric_url, then call
complete_authentication.
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.

BRAIN stops paging at 10,000 rows, so when truncated_by_api is true narrow with dataset_id or
search.
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.

A simulation usually takes 1 to 10 minutes. If it outlasts the timeout the result has status
PENDING and a simulation_id: call get_simulation_status to resume, never simulate again.
Identical expression and settings return the earlier result (from_ledger) without spending
quota. ERROR or FAIL results carry BRAIN's message, usually a syntax or field problem.
simulate_alphas_batchA

Backtest up to 30 expressions, sent to BRAIN in groups of at most 10.

All expressions must share one delay; different regions are sent as separate groups.
Multi-simulation needs a Consultant account. Expressions already in the ledger are returned
without spending quota. not_started lists anything that could not be sent; resubmit those later.
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.

by_context maps parent settings such as 'EQUITY:USA' to the values valid for them. Cached for
a week.
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

NameDescription
design_alphaResearch loop: pick data, write an expression, simulate, then improve it.
review_alphaAssess an alpha's checks, correlation and PnL, and suggest concrete changes.

Resources

Contextual data attached and managed by the client

NameDescription
operatorsFASTEXPR operators.
simulation_optionsValid simulation settings for this account.
fastexpr-cheatsheetBRAIN reference: fastexpr cheatsheet.
settings-guideBRAIN reference: settings guide.
submission-criteriaBRAIN reference: submission criteria.

TDQS

B3.3/5.0

Scored across 25 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count3/5

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.

Completeness3/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues