backtrader / README.md
ghh1125's picture
Upload 14 files
905fbb6 verified
|
Raw
History Blame Contribute Delete
1.13 kB
---
title: backtrader MCP Service
emoji: 🔧
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
license: mit
---
# backtrader MCP Service
This deployment package exposes selected local `backtrader` capabilities through MCP using FastMCP.
## Available Tools
- `health_check`
- `list_modules`
- `list_symbols`
- `preview_csv_data`
- `create_cerebro_session`
- `run_sma_crossover_backtest`
- `list_builtin_components`
- `adapter_call_function`
Detailed tool documentation is available in `backtrader/mcp_output/README_MCP.md`.
## Local stdio usage
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Start stdio MCP service:
```bash
python backtrader/mcp_output/start_mcp.py
```
For direct local plugin entry:
```bash
python backtrader/mcp_output/mcp_plugin/main.py
```
## HTTP usage (Docker / HF Spaces style)
Start with HTTP transport:
```bash
MCP_TRANSPORT=http MCP_PORT=7860 python backtrader/mcp_output/start_mcp.py
```
MCP endpoint:
- `http://localhost:7860/mcp`
## Docker usage
```bash
./run_docker.sh
```
or in PowerShell:
```powershell
./run_docker.ps1
```