etrade
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
etrade
MCP server and command-line client for the official E*TRADE developer API.
It signs OAuth 1.0a requests and calls the documented account, balance, portfolio, quote, and order preview, place, and cancel resources. It does not decide what to trade. You supply a developer key. This repository contains no keys and no tokens.
Details of the endpoints, base URLs, and limits are in docs/API.md.
Requirements
Node.js 22.18 or newer
An E*TRADE account and a consumer key from developer.etrade.com
Sandbox keys come from the sandbox key page. Production keys are a separate pair. An individual key works only with the E*TRADE user it was issued to.
The default environment is sandbox (https://apisb.etrade.com). Sandbox responses are stored samples and do not execute a market trade.
Related MCP server: AlgoTrade-MCP
Install
git clone https://github.com/jasonfeliz/etrade.git
cd etrade
npm install
npm test
npm run buildRun the CLI from the checkout:
node dist/cli.js --helpOr link it onto your PATH:
npm link
etrade --helpCredentials
Export these in your shell. A template with empty values is in .env.example. Do not commit a filled-in copy.
Variable | Used for |
|
|
| Consumer key |
| Consumer secret |
| Access token, after login |
| Access token secret, after login |
| Request token, only until login finishes |
| Request token secret, only until login finishes |
If a command needs a variable that is missing or blank, it exits with an error that names the variable. It does not print values that are already set.
export ETRADE_ENV=sandbox
export ETRADE_CONSUMER_KEY="your key"
export ETRADE_CONSUMER_SECRET="your secret"
etrade auth login
# Open the printed authorizeUrl, approve access, and copy the verification code.
export ETRADE_REQUEST_TOKEN="printed request token"
export ETRADE_REQUEST_TOKEN_SECRET="printed request token secret"
etrade auth complete --verifier CODE
export ETRADE_ACCESS_TOKEN="printed access token"
export ETRADE_ACCESS_TOKEN_SECRET="printed access token secret"auth login can be completed in the same process by passing the request token on the command line instead of exporting it:
etrade auth complete --verifier CODE --request-token REQ --request-token-secret SECRETThe access token expires at midnight US Eastern. If it sits unused for two hours it goes inactive; etrade auth renew reactivates it and does not mint a new token. etrade auth revoke invalidates it. etrade auth status reports which variables are set and does not call E*TRADE.
CLI
etrade accounts
etrade balance --account ACCOUNT_ID_KEY
etrade balance --account ACCOUNT_ID_KEY --realtime --account-type CASH
etrade positions --account ACCOUNT_ID_KEY --view QUICK
etrade quotes AAPL MSFT --detail FUNDAMENTAL
etrade orders list --account ACCOUNT_ID_KEY --status OPEN
etrade orders preview --account ACCOUNT_ID_KEY \
--symbol AAPL --action BUY --quantity 10 --price-type LIMIT \
--limit-price 188.51 --client-order-id sdfer333
etrade orders place --account ACCOUNT_ID_KEY \
--symbol AAPL --action BUY --quantity 10 --price-type LIMIT \
--limit-price 188.51 --client-order-id sdfer333 \
--preview-id PREVIEW_ID
etrade orders cancel --account ACCOUNT_ID_KEY --order-id ORDER_IDportfolio is an alias of positions.
Equity flags build the single-stock PreviewOrderRequest / PlaceOrderRequest JSON from the official samples. For any other order, pass the documented JSON body:
etrade orders preview --account ACCOUNT_ID_KEY --file preview.json
etrade orders place --account ACCOUNT_ID_KEY --file place.json--file and equity flags cannot be combined. Place and cancel against ETRADE_ENV=production require --yes, because those calls can submit or cancel a live order. The preview id from a preview must be used within 3 minutes, and the place request has to match that preview.
Successful responses are JSON on stdout. Errors go to stderr and the process exits 1.
MCP server
The server speaks MCP over stdio. Point your client at the built CLI:
{
"mcpServers": {
"etrade": {
"command": "node",
"args": ["/absolute/path/to/etrade/dist/cli.js", "mcp"],
"env": {
"ETRADE_ENV": "sandbox",
"ETRADE_CONSUMER_KEY": "",
"ETRADE_CONSUMER_SECRET": "",
"ETRADE_ACCESS_TOKEN": "",
"ETRADE_ACCESS_TOKEN_SECRET": ""
}
}
}
}After npm link, command can be etrade and args can be ["mcp"].
Do not write real keys into a file you commit. Leave the values empty in shared config and inject them from your environment, or fill them only in a private client config.
Tools:
Tool | What it calls |
| Local check of which variables are set |
| Get Request Token, returns the authorize URL |
| Get Access Token |
| Renew Access Token |
| Revoke Access Token |
| List Accounts |
| Account balance |
| Portfolio |
| Quotes |
| List Orders |
| Preview Order |
| Place Order ( |
| Cancel Order ( |
Place and cancel refuse to run until confirm is true. With ETRADE_ENV=production they act on a live account.
The server writes the MCP protocol to stdout. Do not wrap it in a logger that also writes to stdout.
Tests
npm testTests cover OAuth signing against the signature example in the ETRADE developer guide, URL construction, and CLI parsing. They use fixtures and a mock HTTP client. They do not call ETRADE.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
OAuth LeanTrading tools for eligible Pro, Elite, Blueprint, and Admin users.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to retrieve real-time stock and options market data through the E\*TRADE API using natural language. It features secure OAuth 1.0 authentication, persistent token management, and comprehensive support for stock quotes, options chains, and Greeks.2-
- FlicenseNot gradedqualityCmaintenanceEnables language models to trade on a Zerodha account by placing and canceling orders and reading orders and portfolio positions over stdio.-
- AlicenseAqualityDmaintenanceEnables LLM hosts to read and manage a Firstrade brokerage account, including positions, balances, quotes, option chains/greeks, order history, and safe order placement with enforced preview-before-trade confirmation.154MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to interact with ETRADE by exposing direct wrappers over the typed, async ETRADE Python client, with stdio and loopback Streamable HTTP support and sandbox/read-preview defaults.49 PyPIApache 2.0