
E*TRADE MCP Server
Enables comprehensive E\*TRADE integration with OAuth authentication, account management, risk calculations, watch lists, and trading operations. Includes built-in risk management guardrails, portfolio tracking, market data access, and trading validation for safe automated trading operations.
README
E*TRADE MCP Server
A comprehensive Model Context Protocol (MCP) server for E*TRADE integration with OAuth authentication, account management, risk calculations, watch lists, and trading guardrails.
Features
🔐 OAuth Authentication
- Complete E*TRADE OAuth 1.0a flow
- Token management and renewal
- Secure credential handling
💰 Account Management
- Account balance retrieval
- Transaction history
- Portfolio viewing
- Real-time account data
📊 Risk Management
- R-multiple risk calculations
- Daily loss tracking
- Position sizing guardrails
- Risk validation before orders
📋 Watch Lists
- Create, read, update, delete watch lists
- Symbol management
- Independent from portfolio positions
📈 Market Data
- Option chains with expiration dates
- Real-time quotes
- Security lookup by company name
🚨 Alerts
- Price alerts management
- Alert notifications
- Custom alert conditions
Installation
Prerequisites
- Python 3.11+
- E*TRADE developer account with API keys
Install via UVX (Recommended)
uvx --from git+https://github.com/davdunc/mcp_etrade.git mcp_etrade
Install via pip
pip install git+https://github.com/davdunc/mcp_etrade.git
Development Install
git clone https://github.com/davdunc/mcp_etrade.git
cd mcp_etrade
pip install -e .
Configuration
Set your E*TRADE API credentials:
export ETRADE_OAUTH_CONSUMER_KEY="your_consumer_key"
export ETRADE_OAUTH_CONSUMER_SECRET="your_consumer_secret"
Usage
Standalone Server
python -m mcp_etrade.server
With Colosseum Framework
Add to ~/.config/colosseum/mcp.json
:
{
"etrade": {
"type": "etrade",
"command": "uvx",
"args": ["--from", "git+https://github.com/davdunc/mcp_etrade.git", "mcp_etrade"],
"env": {
"ETRADE_OAUTH_CONSUMER_KEY": "${ETRADE_OAUTH_CONSUMER_KEY}",
"ETRADE_OAUTH_CONSUMER_SECRET": "${ETRADE_OAUTH_CONSUMER_SECRET}"
}
}
}
Available Tools
Authentication
get_request_token
- Start OAuth flowget_authorization_url
- Get user authorization URLget_access_token
- Complete OAuth flowrenew_access_token
- Refresh tokensrevoke_access_token
- Revoke access
Account Management
get_account_balance
- Get account balance and detailslist_transactions
- List account transactionsget_transaction_details
- Get specific transaction detailsview_portfolio
- View portfolio positions
Risk Management
calculate_risk_parameters
- Calculate R-multiple risk parametersvalidate_order_risk
- Validate order against risk limitsget_daily_risk_status
- Get current daily risk utilizationrecord_actual_loss
- Record actual trading losses
Watch Lists
create_watch_list
- Create new watch listget_watch_lists
- Get all watch listsupdate_watch_list
- Update existing watch listdelete_watch_list
- Delete watch list
Market Data
get_option_chains
- Get option chains for symbolsget_option_expire_dates
- Get option expiration datesget_quotes
- Get real-time quoteslookup_product
- Search securities by company name
Alerts
list_alerts
- List price alertsdelete_alerts
- Delete alertsget_alert_details
- Get alert details
Risk Management
The server includes comprehensive risk management features:
- Daily Risk Limits: Configurable percentage of account balance
- Position Size Limits: Maximum 50% of account per order
- Loss Tracking: Both potential and actual loss tracking
- Validation: Pre-order risk validation with detailed messages
Example risk validation:
# Validate order before placement
result = await call_tool("validate_order_risk", {
"account_id": "your_account",
"order_value": 1000.00,
"risk_amount": 50.00,
"risk_percentage": 1.0
})
Testing
Run the comprehensive test suite:
pytest
Test Coverage:
- 105 passing tests
- OAuth authentication flows
- Account management operations
- Risk calculation accuracy
- Watch list CRUD operations
- Market data retrieval
- Alert management
Architecture
- Clean JSON Output: Structured responses for agent consumption
- Comprehensive Error Handling: Graceful failure modes
- Mock Data Support: Full functionality without live API calls
- Modular Design: Separate concerns for OAuth, risk, data, etc.
Integration
Designed for integration with:
- Colosseum: Multi-agent trading framework
- LangChain: Agent tooling and orchestration
- MCP Clients: Any MCP-compatible system
License
GNU General Public License v3.0
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Support
For issues and questions:
- GitHub Issues: https://github.com/davdunc/mcp_etrade/issues
- Documentation: See inline code documentation
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.