Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Jesse MCP ServerRun a backtest for my TrendFollower strategy on BTC/USDT for the last 6 months"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Jesse MCP Server
An MCP (Model Context Protocol) server that exposes Jesse's algorithmic trading framework capabilities to LLM agents.
Status: Feature Complete ✅
All planned features implemented and tested. 32 tools available (17 core + 15 agent).
Quick Start
Features
Backtesting - Single and batch backtest execution via Jesse REST API
Optimization - Hyperparameter tuning with walk-forward validation
Monte Carlo Analysis - Statistical robustness testing
Pairs Trading - Cointegration testing and strategy generation
Strategy Management - CRUD operations for trading strategies
Risk Analysis - VaR, stress testing, comprehensive risk reports
Agent Tools - 15 specialized tools for autonomous trading workflows
Architecture
Available Tools (32 Total)
Core Tools (17)
Phase 1: Backtesting
Tool | Description |
| Run single backtest with specified parameters |
| List available strategies |
| Read strategy source code |
| Validate strategy code |
Phase 2: Data & Analysis
Tool | Description |
| Download candle data from exchanges |
| Run concurrent multi-asset backtests |
| Extract insights from backtest results |
| Walk-forward analysis for overfitting detection |
Phase 3: Optimization
Tool | Description |
| Optimize hyperparameters using Optuna |
Phase 4: Risk Analysis
Tool | Description |
| Monte Carlo simulations for risk analysis |
| Value at Risk (historical, parametric, Monte Carlo) |
| Test under extreme market scenarios |
| Comprehensive risk assessment |
Phase 5: Pairs Trading
Tool | Description |
| Cross-asset correlation analysis |
| Backtest pairs trading strategies |
| Decompose returns into systematic factors |
| Identify market regimes and transitions |
Agent Tools (15)
Specialized tools for autonomous trading workflows:
Tool | Description |
| AI-powered strategy enhancement suggestions |
| Compare multiple strategies side-by-side |
| Optimize pairs trading selection |
| Analyze impact of optimization changes |
| Portfolio-level risk analysis |
| Advanced stress testing |
| Leverage risk assessment |
| Hedging recommendations |
| Drawdown recovery analysis |
| Full backtest with all metrics |
| Compare performance across timeframes |
| Quick parameter optimization |
| Backtest with Monte Carlo analysis |
| Regime-aware backtest analysis |
| Statistical significance validation |
Testing
Status: 12/12 tests passing
Local Development
Prerequisites
Python 3.10+
Jesse 1.13.x running on localhost:9000
PostgreSQL on localhost:5432
Redis on localhost:6379
Start Jesse Stack (Podman)
Start Dev MCP Server
Add to OpenCode
Add to ~/.config/opencode/opencode.json:
Documentation
Using with LLMs - How to use with MCP-compatible LLMs
Production Deployment - Production deployment guide
Jesse Setup - Jesse integration setup
Agent System - Agent architecture
AGENTS.md - Development guidelines for AI agents
API Reference
Jesse REST Client
The jesse_rest_client.py module provides direct access to Jesse's REST API:
Mock Implementations
When Jesse is unavailable, all tools gracefully fall back to mock implementations that return realistic synthetic data. This enables development and testing without a full Jesse installation.
Key Dependencies
Package | Version | Purpose |
fastmcp | >=0.3.0 | MCP server framework |
numpy | >=1.24.0 | Numerical computations |
pandas | >=2.0.0 | Data manipulation |
scipy | >=1.10.0 | Statistical functions |
scikit-learn | >=1.3.0 | ML utilities |
optuna | >=3.0.0 | Hyperparameter optimization |
Project Structure
License
MIT