# Backtest Kit MCP [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/tripolskypetr/backtest-kit  
**GitHub Stars:** 80  
**npm Downloads (last month):** 2122  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/backtest-kit-mcp

## Description
Model Context Protocol server for backtest-kit: lets an LLM agent observe the live trading portfolio and open or close positions through guarded tools

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "backtest-kit-mcp": {
    "command": "npx",
    "args": ["-y","@backtest-kit/cli"]
  }
}
```

## Documentation

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

_Full upstream README: https://allmcps.com/mcp/backtest-kit-mcp/readme_

