Schwab
About
The Schwab Model Context Protocol (MCP) Server connects your Schwab account to LLM-based applications (like Claude Desktop or other MCP clients), allowing them to retrieve market data, check account status, and (optionally) place orders under your supervision.
Details
- Author
- jkoelker
- Repository
- jkoelker/schwab-mcp
- GitHub stars
- 3
- License
- MIT License
- Categories
- Finance, Other, AI, Design, Developer Tools, Frontend, Knowledge Base, Infrastructure, Security
Jump to
Market Data: Real-time quotes, price history, option chains, and market movers.
Account Management: View balances, positions, and transactions.
Trading: comprehensive support for equities and options, including complex strategies (OCO, Bracket).
Safety First: Critical actions (like trading) are gated behind a Discord approval workflow by default.
- LLM Integration: Designed specifically for Agentic AI workflows.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
SchwabCommand (node, npx, python, etc.)schwab-mcpArguments-
Argument 1
server -
Argument 2
--client-id -
Argument 3
YOUR_KEY -
Argument 4
--client-secret -
Argument 5
YOUR_SECRET
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
You can configure the server using CLI flags or Environment Variables.
| Flag | Env Variable | Description |
|------|--------------|-------------|
| --client-id | SCHWAB_CLIENT_ID | Required. Schwab App Key. |
| --client-secret | SCHWAB_CLIENT_SECRET | Required. Schwab App Secret. |
| --callback-url | SCHWAB_CALLBACK_URL | Redirect URL (default: https://127.0.0.1:8182). |
| --token-path | N/A | Path to save/load token (default: ~/.local/share/...). |
| --http | N/A | Use streamable-http transport instead of stdio. |
| --host | MCP_HOST | Bind address when using --http (default: 127.0.0.1). |
| --port | MCP_PORT | Bind port when using --http (default: 8000). |
| --jesus-take-the-wheel| N/A | DANGER. Bypasses Discord approval for trades. |
| --no-technical-tools | N/A | Disables technical analysis tools (SMA, RSI, etc.). |
| --json | N/A | Returns JSON instead of formatted text (useful for some agents). Null/empty fields are stripped to reduce token usage. |
Before running the server, you must authenticate with Schwab to generate a token file.
schwab-mcp auth --client-id YOUR_KEY --client-secret YOUR_SECRET --callback-url https://127.0.0.1:8182
uv run schwab-mcp auth --client-id YOUR_KEY --client-secret YOUR_SECRET --callback-url https://127.0.0.1:8182
This will open a browser window for you to log in to Schwab. Once complete, a token will be saved to ~/.local/share/schwab-mcp/token.yaml.
Start the MCP server to expose the tools to your MCP client.
A Docker/Podman image is available at ghcr.io/jkoelker/schwab-mcp.
bashpodman run --rm -it \
--env SCHWAB_CLIENT_ID=... \
--env SCHWAB_CLIENT_SECRET=... \
-v ~/.local/share/schwab-mcp:/schwab-mcp \
ghcr.io/jkoelker/schwab-mcp:latest server --token-path /schwab-mcp/token.yaml
```
git clone https://github.com/jkoelker/schwab-mcp.git
cd schwab-mcp
uv sync
get_quotes
Real-time quotes for symbols.
get_market_hours
Market open/close times.
get_movers
Top gainers/losers for an index.
get_option_chain
Standard option chain data.
get_price_history_*
Historical candles (minute, day, week).
get_accounts
List linked accounts (pass `include_positions=True` for holdings).
get_account
Balances for one account by hash (pass `include_positions=True` for holdings).
get_transactions
History of trades and transfers.
get_orders
Status of open and filled orders.
preview_equity_order
Preview a stock/ETF buy or sell.
preview_option_order
Preview an option contract buy or sell.
preview_bracket_order
Preview an entry + take-profit + stop-loss order. Stop-loss exit type defaults to `STOP`; pass `loss_type` (`STOP`, `STOP_LIMIT`, or `LIMIT`) for a different exit, plus `loss_limit_price` when `loss_type` is `STOP_LIMIT`; the response's `resolved_leg_types` shows what was actually built.
place_previewed_order
Place the exact order returned by a `preview_*` call, by `preview_id`. Requires approval.
cancel_order
Cancel an open order.
The server provides a rich set of tools for LLMs.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"schwab": {
"env": {},
"args": [
"server",
"--client-id",
"YOUR_KEY",
"--client-secret",
"YOUR_SECRET"
],
"shell": false,
"command": "schwab-mcp"
}
}
}
Linux
{
"env": [],
"args": [
"server",
"--client-id",
"YOUR_KEY",
"--client-secret",
"YOUR_SECRET"
],
"shell": false,
"command": "schwab-mcp"
}
Macos
{
"env": [],
"args": [
"server",
"--client-id",
"YOUR_KEY",
"--client-secret",
"YOUR_SECRET"
],
"shell": false,
"command": "schwab-mcp"
}
Windows
{
"env": [],
"args": [
"/c",
"schwab-mcp",
"server",
"--client-id",
"YOUR_KEY",
"--client-secret",
"YOUR_SECRET"
],
"shell": true,
"command": "cmd"
}
Schwab Model Context Protocol Server
The Schwab Model Context Protocol (MCP) Server connects your Schwab account to LLM-based applications (like Claude Desktop or other MCP clients), allowing them to retrieve market data, check account status, and (optionally) place orders under your supervision.
Features
Market Data: Real-time quotes, price history, option chains, and market movers.
Account Management: View balances, positions, and transactions.
Trading: comprehensive support for equities and options, including complex strategies (OCO, Bracket).
Safety First: Critical actions (like trading) are gated behind a Discord approval workflow by default.
LLM Integration: Designed specifically for Agentic AI workflows.
Quick Start
Prerequisites
Python 3.10 or higher
uv (recommended) or pip
A Schwab Developer App Key and Secret (from the Schwab Developer Portal)
Installation
For most users, installing via uv tool or pip is easiest:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




