# Stochastly Desktop

Local bridge connecting MCP clients to the running Stochastly desktop software for graph modeling, backtesting, and quantitative research.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Stochastly
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Stochastly/stochastly-mcp
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/mcp/stochastly-desktop

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `STOCHASTLY_MCP_SCRIPT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> --transport stdio stochastly-desktop -- uvx stochastly-mcp
```
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>

### Codex

**Platform CLI**
```bash
codex mcp add stochastly-desktop --env STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> -- uvx stochastly-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e STOCHASTLY_MCP_SCRIPT=<STOCHASTLY_MCP_SCRIPT> stochastly-desktop uvx stochastly-mcp
```
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>

## When to use it
- 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
- List available nodes with `node_catalog` and build a pipeline
- Execute stress tests on the active graph using `adversarial_check`
- Combine current strategies with `portfolio_combine` and export results

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44591
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5469
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2817
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2197
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
