Give your agent a brokerage toolkit: accounts, quotes, positions, option chains, and order management, through a typed Python MCP server backed by etrade-python.
Documentation · Tool coverage · Client setup · Changelog
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.
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.15 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.
Metadata
Release files for etrade-mcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| etrade_mcp-0.1.2.tar.gz | 256.5 kB | With provenance | Details for etrade_mcp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| etrade_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for etrade_mcp-0.1.2-py3-none-any.whl |
Total release size: 353.4 kB
Release files / etrade_mcp-0.1.2.tar.gz
| Download URL | etrade_mcp-0.1.2.tar.gz |
|---|---|
| Size | 256.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f140fdbf9452ef80f9ceeae6ec6e4ee0503cde7dea83875afb0f5157ba1779b6
|
|
BLAKE2b-256 checksum How to use checksums |
b1bc30745439d71fffade6d2b93be20f6bcfbe0508e07f86348d82f7229c56a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / etrade_mcp-0.1.2-py3-none-any.whl
| Download URL | etrade_mcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 96.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
684c83c1cc5357268a225fc750b589c7fbd4c1d1dcf5ad2534634c732ee67540
|
|
BLAKE2b-256 checksum How to use checksums |
ee6563757abb29c7877017ae53a1fe7b725bcf207bace0b4e448b96e322b968c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for etrade-mcp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for etrade_mcp-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.