fidelity-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fidelity-mcpcheck my Fidelity balance and positions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fidelity-mcp
DISCLAIMER: This project is not affiliated with, endorsed by, or associated with Fidelity Investments or FMR LLC. Use at your own risk. See DISCLAIMER.md for full legal notice.
A Model Context Protocol (MCP) server that gives Claude and other AI agents read/write access to your Fidelity Investments account via Playwright browser automation.
Fidelity does not offer a public API. This server works by capturing your authenticated browser session (via fidelity_login.py) and reusing it in a headless Playwright browser to read positions, balances, and transaction history — and to place orders.
Features
Tool | Description |
| Account balances and withdrawal availability |
| Open positions (ticker, quantity, price, value) |
| Recent transaction history (buys, sells, dividends) |
| Place a limit SELL order (Day or GTC) — dry-run by default |
| Verify session file is present and populated |
Related MCP server: MCP Macaco Playwright
Requirements
Python 3.11+
Windows (Playwright's Firefox must run natively — WSL users see WSL note below)
A Fidelity account
Installation
pip install -r requirements.txt
playwright install firefoxQuick Start
Step 1 — Capture your session
Run the interactive login script. A Firefox window opens — log in normally (use your password manager, 2FA, etc.). When you reach the Fidelity dashboard, press ENTER in the terminal.
python fidelity_login.pyThis saves fidelity_session/Fidelity.json. Keep this file private — it grants access to your account. It is already in .gitignore.
Step 2 — Test the server
python fidelity_server.pyStep 3 — Add to Claude Code
In your project's .mcp.json:
{
"mcpServers": {
"fidelity": {
"command": "python",
"args": ["path/to/fidelity_server.py"]
}
}
}Then use it in Claude Code:
check_fidelity_session
get_fidelity_balance
get_fidelity_positions
get_fidelity_activity(days=7)
# Dry run first (default):
place_fidelity_stock_sell_limit(symbol="AAPL", quantity=10, limit_price=200, account="YOUR_ACCOUNT_NUMBER", dry_run=True)
# Execute for real:
place_fidelity_stock_sell_limit(symbol="AAPL", quantity=10, limit_price=200, account="YOUR_ACCOUNT_NUMBER", dry_run=False)WSL + Claude Code
If you run Claude Code on Windows but use WSL for MCP servers, Playwright's Firefox must run on the Windows side. Use a shell bridge:
launch.sh (place next to fidelity_server.py):
#!/bin/bash
exec cmd.exe /c "C:\\Python314\\python.exe C:\\path\\to\\fidelity_server.py".mcp.json:
{
"mcpServers": {
"fidelity": {
"command": "wsl.exe",
"args": ["bash", "/mnt/c/path/to/launch.sh"]
}
}
}Session Expiry
Fidelity sessions typically last several hours to a day. When a tool returns:
No accounts found or session expired. Run fidelity_login.py to re-authenticate.Re-run fidelity_login.py and restart the MCP server (or /mcp restart in Claude Code).
Environment Variables
Variable | Default | Description |
|
| Directory for the session JSON file |
Security
fidelity_session/is in.gitignore— never commit itThe session file is equivalent to being logged in — protect it like a password
The server runs fully locally; no data is sent to any third party
How it works
fidelity_login.pyopens a real Firefox window using PlaywrightYou log in normally — Fidelity sees a real browser session
After login,
ctx.storage_state()captures all cookies and localStorage to a JSON filefidelity_server.pyloads that state into a headless Firefox to reuse the sessionPositions/balances use fidelity-api by kennyboy106
Activity scraping and order placement use direct Playwright page automation
Dependencies
fidelity-api by kennyboy106 — core account automation
playwright — browser automation
playwright-stealth — reduces bot detection
mcp — MCP server framework (FastMCP)
License
MIT — see LICENSE
Not affiliated with Fidelity Investments. See DISCLAIMER.md.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mobogojo/fidelity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server