This repository contains the Model Context Protocol implementation for Angel One trading platform, allowing you to interact with Angel One's trading APIs to get history data and get portfolio data.
- Python 3.10
- Angel One trading account
- API credentials from Angel One
- Clone the repository:
git clone https://github.com/yourusername/angelone-mcp.git
cd angelone-mcp
git submodule update --init --recursive- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`- Install the required dependencies:
curl -LsSf https://astral.sh/uv/install.sh | shuv pip install -r requirements.txt- Create a test_credentials.py file in the root directory with your Angel One credentials:
# test_credentials.py
API_KEY = "your_api_key"
CLIENT_CODE = "your_client_code"
PASSWORD = "your_password"
PIN = "your_pin"
TOKEN = "your_token" # Optional- You can start
api.pyas an mcp server to your mcp client
{
"mcp": {
"servers": {
"angleone": {
"command": "/Users/rohandoshi/.local/bin/uv",
"args": [
"--directory",
"/Users/rohandoshi/Development/angelone-mcp",
"run",
"api.py"
]
},
}
}
}