Connect MyFinanceMCP to Your AI Assistant
Follow the steps below to connect this MCP server to Claude Desktop, ChatGPT, Cursor, or any MCP-compatible client. Once connected, you can track your Angel One portfolio and even place trades through your AI assistant.
Before You Start
- Your Angel One API Key, Client ID, PIN, and TOTP Secret — learn how to generate them
- Node.js installed (required for Claude Desktop — download here). Not needed for ChatGPT or Cursor.
Claude Desktop
Find your config file
Open the Claude Desktop config file at:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add the MCP server
Add the following to the mcpServers object in the config file:
{
"mcpServers": {
"angelone-portfolio": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://myfinancesmcp.onrender.com/mcp/sse"]
}
}
}
mcp-remote as a bridge. It is installed automatically via npx.
Restart Claude Desktop
Quit Claude Desktop completely and reopen it. You should see a hammer icon indicating MCP tools are available.
Login
In your first message, ask Claude to log in with your credentials:
Log in to my Angel One account with these credentials:
- API Key: YOUR_API_KEY
- Client ID: YOUR_CLIENT_ID
- Password: YOUR_PIN
- TOTP Secret: YOUR_TOTP_SECRET
Claude will call the login tool, and then you can ask things like "Show my portfolio summary" or "What are my holdings?"
ChatGPT
Open Settings
On chatgpt.com, click your profile icon and go to Settings → Connected apps.
Add an MCP server
Click "Add" and fill in the following:
https://myfinancesmcp.onrender.com/mcp/sse
Login & use
Start a new chat and ask ChatGPT to log in with your Angel One credentials, then ask about your portfolio, holdings, or place trades.
Cursor IDE
Add the MCP config
Create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"angelone-portfolio": {
"url": "https://myfinancesmcp.onrender.com/mcp/sse"
}
}
}
url field directly — no bridge needed.
Login & use
Open Cursor's AI chat and ask it to log in with your Angel One credentials, then use any portfolio or trading tool.
Other MCP Clients
Any MCP-compatible client that supports SSE transport can connect using:
https://myfinancesmcp.onrender.com/mcp/sse
If your client only supports stdio, use mcp-remote as a bridge:
npx -y mcp-remote https://myfinancesmcp.onrender.com/mcp/sse
Run Locally (Self-Hosted)
Don't want to use our hosted server? Clone the repo and run everything on your machine — no data leaves localhost.
Clone & install
git clone https://github.com/raghav18482/MyFinancesMCP.git
cd MyFinancesMCP
pip install -r requirements.txt
python main.py
The server starts on http://localhost:8000. Open it in your browser for the web dashboard, or connect your AI assistant using the local MCP endpoint.
Claude Desktop — direct Python config (no Node.js needed)
When running locally, you can skip mcp-remote entirely and point Claude Desktop straight at the Python server:
{
"mcpServers": {
"angelone-portfolio": {
"command": "python3",
"args": ["/full/path/to/MyFinancesMCP/mcp_server.py"],
"env": {
"ANGELONE_API_KEY": "YOUR_API_KEY",
"ANGELONE_CLIENT_ID": "YOUR_CLIENT_ID",
"ANGELONE_PASSWORD": "YOUR_PIN",
"ANGELONE_TOTP_SECRET": "YOUR_TOTP_SECRET"
}
}
}
}
which python3 in your terminal. This config runs the MCP server as a subprocess of Claude Desktop using stdio transport — no extra dependencies needed.
Cursor & ChatGPT — local SSE
With python main.py running, use the local URL in the configs shown in Steps 1–3 above:
http://localhost:8000/mcp/sse
Available Tools
Once connected and logged in, your AI assistant can use these tools:
| Tool | Description |
|---|---|
login | Authenticate with Angel One (must call first) |
logout | Discard session credentials from memory |
portfolio_summary | Overall portfolio: invested, current value, P&L |
get_holdings | All stock holdings with P&L per stock |
get_positions | Open intraday / delivery positions |
get_funds | Available cash, margin, and net value |
get_order_book | Today's orders and their status |
get_trade_book | Executed trades for today |
search_scrip | Search stocks by name or symbol |
get_ltp | Last traded price for a stock |
get_candle_data | Historical OHLC candle data |
place_order | Place a buy/sell order (real money!) |
modify_order | Modify an existing open order |
cancel_order | Cancel an open order |
Security
- Credentials are never stored on disk — they live only in server memory
- Sessions auto-expire after 8 hours
- All traffic goes over HTTPS when deployed (Railway/Render provide TLS)
- Your OpenRouter API key (for dashboard AI insights) is encrypted client-side and never stored on the server
- You can call
logoutat any time to immediately discard your session