Strategy Research DB

Provides an MCP server to analyze trading strategy backtests with a SQLite database and query risk, robustness, and alpha metrics.
  • python

0

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "locupleto-mcp-strategy-research-db": {
      "command": "/Volumes/Work/development/projects/git/mcp-strategy-research-db/venv/bin/python3",
      "args": [
        "/Volumes/Work/development/projects/git/mcp-strategy-research-db/strategy_research_mcp_server.py"
      ],
      "env": {
        "STRATEGY_DB_PATH": "/path/to/strategy_research.db"
      }
    }
  }
}

You run a Model Context Protocol (MCP) server that gives Claude Code access to a strategy research SQLite database. This enables you to analyze backtest results, compare strategies across market regimes, and run read‑only SQL queries to explore robust strategies and alpha generation across symbols and periods.

How to use

Start by registering the MCP server with your Claude Code client. This makes the server available for your current project or for all projects, depending on your choice.

Once registered, you can issue tool commands through Claude Code to inspect the strategy research database. Use the available tools to get status, list runs, review strategy details, compare performance across periods, and find alpha generators. You can also run custom read‑only SQL queries to ask advanced questions of the data.

How to install

Prerequisites: you need Python 3.10 or later and an active Python virtual environment tool (venv is included with Python). Ensure you have CLAUDE access for MCP integration.

Clone the project repository and switch into its directory.

# Clone the repository
git clone https://github.com/locupleto/mcp-strategy-research-db.git
cd mcp-strategy-research-db

# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Register the MCP server with Claude Code

Choose whether to register for a specific project or globally. The following commands register the server using the local runtime Python inside your virtual environment.

Project level (recommended):

cd /Volumes/Work/development/projects/git/mcp-strategy-research-db

claude mcp add strategy-research-db \
    "$(pwd)/venv/bin/python3" \
    "$(pwd)/strategy_research_mcp_server.py"

Verify registration

Check that MCP servers are registered and ready. Use the list command and enable debug mode if you need troubleshooting output.

# List all registered MCP servers
claude mcp list

# Debug mode for troubleshooting
claude --mcp-debug

Available tools

get_database_status

Database statistics: number of runs, strategies, symbols, and date ranges.

list_search_runs

List all backtest search runs with filtering options.

get_run_details

Get detailed information about a specific search run.

get_top_strategies

Retrieve top-ranked strategies with customizable sorting and filtering.

get_strategy_details

Fetch full details for a specific strategy ID.

compare_strategy_across_periods

Analyze how a strategy performs across different market periods.

find_robust_strategies

Identify strategies that work consistently across ALL market periods.

get_period_summary

Provide summary statistics for each market period tested.

find_alpha_generators

Find strategies that beat the Buy & Hold benchmark.

get_risk_adjusted_rankings

Rank strategies by Calmar ratio or other risk-adjusted metrics.

get_symbol_performance

Breakdown of performance by individual symbol.

find_best_symbols_for_strategy

Identify symbols that work best with a given strategy.

get_capital_deployment_analysis

Analyze portfolio capital utilization across periods using time-in-market data.

get_daily_position_counts

Provide exact daily position counts from trade-level data (requires Dec 2025+ runs).

compare_timing_modes

Compare Conservative (T+1) vs Aggressive (same-day) trade timing.

run_custom_query

Execute read-only custom SQL queries against the database.

get_schema

Retrieve database schema documentation.

list_strategy_ids

List strategy IDs with optional pattern filtering.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational