Available for installation directly from Git repository and includes version control workflow for contributions.
Hosted on GitHub with issue tracking and contribution workflow for the E*TRADE MCP server development.
Licensed under GNU General Public License v3.0 for open source distribution and modification.
Designed for integration with LangChain's agent tooling and orchestration capabilities, enabling AI agents to perform automated trading operations.
Includes comprehensive test coverage with 105 passing tests covering OAuth flows, account operations, risk calculations, and market data functionality.
Built with Python 3.11+ and provides comprehensive trading functionality through E*TRADE's API including OAuth authentication, account management, risk calculations, watch lists, and market data access.
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)
Install via pip
Development Install
Configuration
Set your E*TRADE API credentials:
Usage
Standalone Server
With Colosseum Framework
Add to ~/.config/colosseum/mcp.json
:
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:
Testing
Run the comprehensive test suite:
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
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.