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.

Don't want to set up MCP? You can get AI-powered portfolio insights directly from the web dashboard — just log in and add your OpenRouter API key. No MCP configuration needed.

Before You Start

1

Claude Desktop

Find your config file

Open the Claude Desktop config file at:

macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json

Add the MCP server

Add the following to the mcpServers object in the config file:

claude_desktop_config.json
{
  "mcpServers": {
    "angelone-portfolio": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://myfinancesmcp.onrender.com/mcp/sse"]
    }
  }
}
Note: Claude Desktop doesn't support SSE natively, so we use 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:

Example prompt
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?"

2

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:

a
Name: AngelOne Portfolio
b
Description: Angel One portfolio tracker via MCP
c
MCP Server URL:
MCP Server URL
https://myfinancesmcp.onrender.com/mcp/sse
d
Authentication: select None
e
Check the "I understand and want to continue" checkbox
f
Click Create
Note: MCP support is available on ChatGPT web (chatgpt.com). No desktop app or Node.js required.

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.

3

Cursor IDE

Add the MCP config

Create or edit .cursor/mcp.json in your project root:

.cursor/mcp.json
{
  "mcpServers": {
    "angelone-portfolio": {
      "url": "https://myfinancesmcp.onrender.com/mcp/sse"
    }
  }
}
Note: Cursor supports the 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.

4

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
5

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

Terminal
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:

claude_desktop_config.json
{
  "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"
      }
    }
  }
}
Replace the highlighted paths and credential values with your own. On macOS/Linux you can find the full Python path by running 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
6

Available Tools

Once connected and logged in, your AI assistant can use these tools:

ToolDescription
loginAuthenticate with Angel One (must call first)
logoutDiscard session credentials from memory
portfolio_summaryOverall portfolio: invested, current value, P&L
get_holdingsAll stock holdings with P&L per stock
get_positionsOpen intraday / delivery positions
get_fundsAvailable cash, margin, and net value
get_order_bookToday's orders and their status
get_trade_bookExecuted trades for today
search_scripSearch stocks by name or symbol
get_ltpLast traded price for a stock
get_candle_dataHistorical OHLC candle data
place_orderPlace a buy/sell order (real money!)
modify_orderModify an existing open order
cancel_orderCancel 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 logout at any time to immediately discard your session