Stochastly Desktop — Claude Code MCP server: setup and tools
Local bridge connecting MCP clients to the running Stochastly desktop software for graph modeling, backtesting, and quantitative research.
claude mcp add --env STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> --transport stdio stochastly-desktop -- uvx stochastly-mcpWhat Stochastly Desktop does
This launcher bridges an MCP client to the local Stochastly desktop engine. The package itself holds no computational core: it routes calls directly to the installed application, checking license status on each tool invocation.
The server provides 29 tools. These include node_catalog, graph assembly with compose_graph, backtesting via backtest_graph, diagnostic audits with red_flag_check, stress testing using adversarial_check, and research summaries through export_paper. Combining strategies with portfolio_combine requires the Portfolio edition, while the remaining tools accept Atelier or Portfolio tiers.
Execution fails with ok: false whenever the desktop app is not actively running with a valid license. When using a custom install path, point STOCHASTLY_MCP_SCRIPT to the local stochastly_mcp.py file.
What it helps with
- Run strategy backtests via backtest_graph
- Inspect strategy graphs for model risks using red_flag_check
- Merge multiple strategies through portfolio_combine
- Generate formal research output with export_paper
Example prompts for the agent
- List available nodes with
node_catalogand build a pipeline - Execute stress tests on the active graph using
adversarial_check - Combine current strategies with
portfolio_combineand export results
How to install Stochastly Desktop
Platform CLI
claude mcp add --env STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> --transport stdio stochastly-desktop -- uvx stochastly-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from stochastly-mcp <command>
Platform CLI
codex mcp add stochastly-desktop --env STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> -- uvx stochastly-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from stochastly-mcp <command>
Config file
{
"mcpServers": {
"stochastly-desktop": {
"command": "uvx",
"args": [
"stochastly-mcp"
],
"env": {
"STOCHASTLY_MCP_SCRIPT": "<STOCHASTLY_MCP_SCRIPT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from stochastly-mcp <command>
Config file
{
"servers": {
"stochastly-desktop": {
"type": "stdio",
"command": "uvx",
"args": [
"stochastly-mcp"
],
"env": {
"STOCHASTLY_MCP_SCRIPT": "<STOCHASTLY_MCP_SCRIPT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from stochastly-mcp <command>
Platform CLI
gemini mcp add -e STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> stochastly-desktop uvx stochastly-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from stochastly-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Stochastly Desktop
How to install Stochastly Desktop in Claude Code?
Run claude mcp add desktop -- uvx stochastly-mcp. For non-standard desktop installations, pass the environment variable: claude mcp add --env STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> --transport stdio stochastly-desktop -- uvx stochastly-mcp.
What does Stochastly Desktop do?
It connects AI clients to local Stochastly engine tools, exposing 29 functions for computational graph construction, backtesting, and quantitative risk checks.
Can Stochastly Desktop run without the desktop app?
No. The launcher returns metadata manifests without the app, but calling any computational tool returns ok: false until the licensed software is running locally.