MCP Server integration for the NautilusTrader algorithmic trading platform.
This project provides a Model Context Protocol (MCP) server that allows AI agents and other MCP clients to interact with NautilusTrader for:
- Live trading operations (order management, account info, positions)
- Backtesting trading strategies
- Accessing market data
- Clone the repository:
git clone <repository-url> cd nautilus-mcp
- Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt # Or for development: # pip install -e .[dev] <- Assuming a setup.py with dev extras is added later
- Configure the server: (Details TBD - likely via MCP settings or a config file)
- Run the server:
python -m nautilus_mcp
- Register with MCP CLI (Optional but recommended):
mcp install src/nautilus_mcp/server.py --name nautilus-trader -v # Add env vars if needed
nautilus-mcp/
├── .venv/ # Virtual environment
├── docs/ # Documentation files
├── src/
│ └── nautilus_mcp/
│ ├── __init__.py
│ ├── __main__.py # Entry point for `python -m nautilus_mcp`
│ ├── server.py # Core MCP Server class
│ ├── tools/ # MCP tools implementations
│ │ ├── __init__.py
│ │ └── (e.g., trading.py, backtest.py)
│ └── resources/ # MCP resource implementations
│ ├── __init__.py
│ └── (e.g., market_data.py)
├── tests/ # Unit and integration tests
│ ├── __init__.py
│ └── (e.g., test_server.py)
├── .gitignore
├── README.md
└── requirements.txt
(Add details about running tests, linting, contributing guidelines later)
(Specify license)