Backtest Kit MCP logo

Backtest Kit MCP

Lets LLM agents inspect a live trading portfolio and open or close positions through guarded tools.

Install Backtest Kit MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "backtest-kit-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@backtest-kit/cli"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio backtest-kit-mcp -- npx -y @backtest-kit/cli

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @backtest-kit/cli

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

@backtest-kit/mcp connects an LLM agent to a live trading portfolio managed with backtest-kit. It exposes tools for observing portfolio state and for opening or closing positions through guarded operations. Reach for it when an agent needs controlled interaction with an active trading workflow rather than unrestricted exchange access. Backtest-kit also supports backtesting, paper trading, and live trading across assets that provide price data and cash flows.

Use cases

  • Monitor a live trading portfolio through an LLM agent
  • Open positions through guarded agent tools
  • Close positions through guarded agent tools
  • Add portfolio visibility to a backtest-kit trading workflow

Key features

  • Live portfolio observation
  • Guarded position opening
  • Guarded position closing
  • Integration with backtest-kit trading workflows

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

21/21 checks healthy over the last 50d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · @backtest-kit/cli (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars80Stargazers on the source repository.
npm downloads2.1kPackage downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.

How Backtest Kit MCP works

What @backtest-kit/mcp does

@backtest-kit/mcp gives an LLM agent a controlled interface to a live trading portfolio built with backtest-kit. Its role is focused: the agent can inspect the portfolio, open positions, or close positions through guarded tools.

The server fits workflows where an agent needs awareness of active trading state and a limited set of actions for position management. It is relevant to finance and fintech applications that combine an LLM with an automated or supervised trading system.

The underlying backtest-kit engine is designed to use the same strategy code for backtesting, paper trading, and live execution. It supports crypto, forex, decentralized exchanges, spot and futures markets, as well as other assets represented by price series and cash flows, including dividend-paying securities, real estate, bonds, and yield-bearing crypto assets.

How it works

An MCP-compatible LLM agent communicates with the server and uses its tools to observe the live portfolio or request a position change. Opening and closing positions are exposed as guarded operations, keeping the agent’s trading actions within the interface supplied by the server rather than requiring direct access to the underlying trading implementation.

The server complements backtest-kit’s broader execution model. That engine uses registered exchanges, market-data frames, and strategies, and can run strategies in backtest, paper, or live modes. Its design includes time-aware data access intended to prevent strategies from reading candles beyond the execution point, while the MCP layer gives an agent visibility into the live portfolio and selected position controls.

Limitations and notes

The MCP server is oriented around a live trading portfolio and position management. It should not be treated as a general-purpose market-data server or as a complete replacement for backtest-kit’s strategy and execution APIs.

Position changes are guarded, but using an agent to open or close live positions still requires appropriate operational controls outside the model interaction itself. The surrounding engine is built to address issues such as look-ahead bias, duplicate fills after process failures, and rejected orders, but those properties belong to the backtest-kit trading system and should be evaluated separately from the MCP interface.

Choose this server when the agent needs portfolio observation plus controlled position actions. Choose the underlying backtest-kit APIs when the main requirement is defining strategies, loading historical data, or running backtests.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Backtest Kit MCP

@backtest-kit/mcp is an MCP server that connects an LLM agent to a live trading portfolio managed through backtest-kit. Its main tools let the agent observe portfolio state and open or close positions through guarded operations. It is intended for finance and fintech workflows where an agent needs portfolio visibility and controlled position management.

Use @backtest-kit/mcp when an LLM agent needs to inspect a live backtest-kit portfolio and manage positions through controlled tools. Use backtest-kit’s broader APIs instead when you need to define strategies, retrieve historical data, or run backtests.

Yes, @backtest-kit/mcp provides guarded tools for opening and closing positions. These actions are intended for a live trading portfolio managed through backtest-kit.

The underlying backtest-kit engine supports backtesting, paper trading, and live trading, while @backtest-kit/mcp is focused on observing a live portfolio and managing positions through guarded tools.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBacktest Kit MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/backtest-kit-mcp?style=directory)](https://allmcps.com/mcp/backtest-kit-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/backtest-kit-mcp"><img src="https://allmcps.com/api/badge/backtest-kit-mcp?style=directory" alt="Backtest Kit MCP on AllMCPs" /></a>