Skip to main content
Glama
etrade-mcp

etrade-mcp

by kevinrider

A toolkit that fits your harness

  • Read the account. Balances, positions, transactions, orders, and alerts.

  • Explore the market. Quotes, product lookup, option expirations, and chains.

  • Preview precisely. Equity, single options, buy-writes, spreads, butterflies, condors, and general multi-leg requests—with monetary values kept as decimal strings.

  • Choose your tools. Expose a focused allowlist or the complete catalog.

  • Connect your way. Local stdio or authenticated loopback Streamable HTTP.

There are 34 tools by default: 13 brokerage reads, 20 new/change previews, and server_status. Explicitly enabling order execution and alert deletion brings the complete catalog to 38 tools. Strategy, scheduling, and portfolio decisions stay in your application.

Related MCP server: E*TRADE MCP Server

Built with local models in mind

Because the MCP server exposes personal financial data, local models are a design and testing focus. Manually tested with the following setup:

  • Qwen3.5:9b

  • Ollama

  • Open WebUI

  • NVIDIA GPU with 12 GB VRAM

  • Context windows of approximately 64k–114k tokens

Testing has demonstrated multistep tool use, order previews, and recovery from validation errors.

Focused order tools, configurable tool allowlists, concise descriptions, field guidance, and examples help smaller models work with the tools they need. Inlined input schemas improve compatibility, and structured validation errors give the model specific feedback when an argument needs correcting. Expose just the tools you use to keep the tool catalog small.

Codex, Claude Code, and other compatible MCP clients are equally welcome—see the client configurations. Results depend on the model, harness, and context settings.

You can run separate MCP server processes with different tool allowlists: market tools for a hosted model, and account or portfolio tools for a local model. Both MCP server processes can share the same broker environment, credential profile, and OS keyring through etrade-python.

Quick start

1. Request E*TRADE API keys

You need an E*TRADE account and a consumer key/secret for your selected broker environment. Follow E*TRADE's getting-started guide to request sandbox keys or apply for production keys. Sandbox is for testing; production keys provide access to your actual account and market data.

2. Install

Requires Python 3.11–3.14 and uv.

uv tool install --with-executables-from etrade-python etrade-mcp
etrade-mcp --version
etrade --version

This exposes both the server and the client's OAuth CLI. Already have a compatible etrade executable? See the installation guide for that setup.

3. Authenticate

Provide ETRADE_CONSUMER_KEY and ETRADE_CONSUMER_SECRET through your protected process environment, using keys issued for the selected broker environment. Then log in interactively:

export ETRADE_ENVIRONMENT=sandbox
etrade auth login --profile default

Complete the browser authorization and verifier-code exchange prompted by the CLI. Use the same environment and profile when starting the server.

4. Connect your agent

Start local HTTP with a generated bearer credential in your private shell:

export ETRADE_MCP_HTTP_BEARER_TOKEN="$(python3 -c 'import secrets; print(secrets.token_urlsafe(32))')"
etrade-mcp serve --environment sandbox --profile default \
  --no-enable-order-execution --no-enable-alert-deletion

Connect your host to http://127.0.0.1:8000/mcp, using that same bearer token. For Codex, Claude Code, generic Python, or stdio, follow the connection examples. Broker OAuth and the MCP bearer credential serve different purposes; keep both out of prompts and committed configuration.

Ask your agent

Once connected and authenticated, try:

Get the AAPL quote. Report the last trade price, bid, ask, quote status, and broker timestamp exactly as returned.

Then explore workflow recipes and order previews. Each tool advertises its input schema, field descriptions, and synthetic examples. You can also inspect these directly in MCP Inspector.

Preview first. Execute deliberately.

Execution is disabled by default. Previews do not place orders. The consuming host must obtain human approval bound to the exact account, request, and preview before invoking an execution tool. A model's approval flag or a server capability switch does not establish that approval.

The host also owns submission history and reconciliation after uncertain outcomes. See the execution guide for permissions, client-order-ID lifecycle, cancellations, and recovery.

Under the hood

Thin adapters call the public async client APIs. Both transports expose the same validated tools and structured responses, with native MCP error signaling. Brokerage behavior, OAuth, and coordinated credential storage stay in etrade-python>=1.1.1,<2.

Offline tests cover actual MCP messages and real client serialization with mocked broker HTTP. Built wheel/sdist checks run outside the checkout. These checks do not establish broker acceptance of every order or reliability of every model.

Join in

Contributing · Issues · Security

Apache-2.0. This project is not affiliated with or endorsed by E*TRADE or Morgan Stanley.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables interaction with EOD Historical Data APIs, providing access to 75 read-only tools for financial data including fundamentals, news, screeners, and options via MCP transports.
      25
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for E*TRADE that reads account balances, positions, transactions, and orders, with optional opt-in order placement via a two-step preview-confirm handshake.
      28 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables MCP clients to retrieve TradingView market data, including historical OHLCV candles, quotes, technical indicators, and screener results over stdio or SSE.
      4
      MIT