- Home
- MCP servers
- E*TRADE
E*TRADE
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ohenak-etrade-mcp": {
"command": "python",
"args": [
"-m",
"server.main"
],
"env": {
"ETRADE_ENVIRONMENT": "sandbox",
"ETRADE_CONSUMER_KEY": "YOUR_CONSUMER_KEY",
"ETRADE_CONSUMER_SECRET": "YOUR_CONSUMER_SECRET"
}
}
}
}You can run the E*TRADE MCP Server locally to securely access real-time stock data, batch quotes, and full options information through MCP clients. It handles OAuth 1.0 authentication, automatic token management, and reliable retries, so you can focus on building conversational queries for trading data.
How to use
You will connect an MCP client (such as Claude Desktop) to the E*TRADE MCP Server to retrieve stock quotes, batch quotes, and options data. After you start the server, the MCP client can request data using natural language queries like asking for the current price of a stock, retrieving multiple quotes at once, or exploring options chains and specific option quotes. The server handles OAuth authentication, token storage, and automatic renewal, so you don’t need to manage tokens manually.
How to install
Prerequisites: ensure you have Python 3.10 or higher and the uv package manager installed on your system.
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Clone the project, set up a Python virtual environment, and install dependencies.
cd etrade-mcp
# Create virtual environment
uv venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# Install dependencies
uv pip install -e .
Configure environment variables for your E*TRADE credentials. Create a .env file in the project root and populate it with your keys and environment.
ETRADE_CONSUMER_KEY=your_consumer_key_here
ETRADE_CONSUMER_SECRET=your_consumer_secret_here
ETRADE_ENVIRONMENT=sandbox # Use 'production' for live trading
Additional configuration and startup notes
The server is designed to run as a local MCP stdio server. You start it through a Python module path defined in the MCP configuration. The recommended runtime command is shown below.
{
"mcpServers": {
"etrade": {
"command": "python",
"args": ["-m", "server.main"],
"cwd": "/absolute/path/to/etrade-mcp",
"env": {
"ETRADE_CONSUMER_KEY": "your_consumer_key",
"ETRADE_CONSUMER_SECRET": "your_consumer_secret",
"ETRADE_ENVIRONMENT": "sandbox"
}
}
}
}
OAuth setup and token management
OAuth 1.0 authentication is managed automatically. You can use the two-step flow via the MCP tool or run a standalone setup if needed. The two-step flow prompts you to authorize via a browser and enter a 5-character verification code to complete setup; tokens are saved locally in encrypted form and renewed as needed.
Standalone setup command you can run anytime to initiate OAuth outside of the MCP flow.
python -m server.auth.setup
Security and best practices
Never commit the .env file or any credentials. Tokens are encrypted and stored locally. Start with the sandbox environment to test flows safely, and switch to production only after thorough testing and with a live, properly authorized E*TRADE account.
Troubleshooting
If the OAuth flow fails or you see token-related errors, verify your credentials, ensure you’re using the correct environment, and confirm your E*TRADE account has API access. If you see a missing tokens error, run the standalone setup command to authenticate again and check that the token store file exists.
python -m server.auth.setup
Notes on usage with Claude Desktop
Claude Desktop can query stock quotes, batch quotes, and options data through the configured MCP server. After setup, you can ask questions like: What's the current price of AAPL? Get quotes for AAPL, MSFT, and GOOGL with earnings dates. Show me the option chain for a specific symbol.
Available tools
setup_oauth
OAuth 1.0 authentication flow to obtain and renew access tokens, stored encrypted locally.
get_stock_quote
Retrieve a single stock quote with price, volume, bid/ask, and optional earnings date.
get_batch_quotes
Retrieve quotes for multiple stocks in a single call (up to 25 symbols).
get_option_chains
Get detailed options chain data with filters for expiry, type, strikes, and more.
get_option_quote
Get quotes for specific option contracts identified by OSI symbols, including Greeks and pricing data.