MCP Hub
Back to servers

Schwab

A specialized MCP server that bridges Schwab brokerage accounts with LLMs, enabling secure access to real-time market data, account management, and supervised trading capabilities.

Stars
24
Forks
5
Tools
13
Updated
Jan 9, 2026
Validated
Jan 11, 2026

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

Installation

For most users, installing via uv tool or pip is easiest:

# Using uv (recommended for isolation)
uv tool install git+https://github.com/jkoelker/schwab-mcp.git

# Using pip
pip install git+https://github.com/jkoelker/schwab-mcp.git

Authentication

Before running the server, you must authenticate with Schwab to generate a token file.

# If installed via uv tool
schwab-mcp auth --client-id YOUR_KEY --client-secret YOUR_SECRET --callback-url https://127.0.0.1:8182

# If running from source
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.

Running the Server

Start the MCP server to expose the tools to your MCP client.

# Basic Read-Only Mode (Safest)
schwab-mcp server --client-id YOUR_KEY --client-secret YOUR_SECRET

# With Trading Enabled (Requires Discord Approval)
schwab-mcp server \
  --client-id YOUR_KEY \
  --client-secret YOUR_SECRET \
  --discord-token BOT_TOKEN \
  --discord-channel-id CHANNEL_ID \
  --discord-approver YOUR_USER_ID

Note: For trading capabilities, you must set up a Discord bot for approvals. See Discord Setup Guide.

Configuration

You can configure the server using CLI flags or Environment Variables.

FlagEnv VariableDescription
--client-idSCHWAB_CLIENT_IDRequired. Schwab App Key.
--client-secretSCHWAB_CLIENT_SECRETRequired. Schwab App Secret.
--callback-urlSCHWAB_CALLBACK_URLRedirect URL (default: https://127.0.0.1:8182).
--token-pathN/APath to save/load token (default: ~/.local/share/...).
--jesus-take-the-wheelN/ADANGER. Bypasses Discord approval for trades.
--no-technical-toolsN/ADisables technical analysis tools (SMA, RSI, etc.).
--jsonN/AReturns raw JSON instead of formatted text (useful for some agents).

Container Usage

A Docker/Podman image is available at ghcr.io/jkoelker/schwab-mcp.

podman 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

Available Tools

The server provides a rich set of tools for LLMs.

📊 Market Data

ToolDescription
get_quotesReal-time quotes for symbols.
get_market_hoursMarket open/close times.
get_moversTop gainers/losers for an index.
get_option_chainStandard option chain data.
get_price_history_*Historical candles (minute, day, week).

💼 Account Info

ToolDescription
get_accountsList linked accounts.
get_account_positionsDetailed positions and balances.
get_transactionsHistory of trades and transfers.
get_ordersStatus of open and filled orders.

💸 Trading (Requires Approval)

ToolDescription
place_equity_orderBuy/Sell stocks and ETFs.
place_option_orderBuy/Sell option contracts.
place_bracket_orderEntry + Take Profit + Stop Loss.
cancel_orderCancel an open order.

(See full tool list in src/schwab_mcp/tools/)

Development

To contribute to this project:

# Clone and install dependencies
git clone https://github.com/jkoelker/schwab-mcp.git
cd schwab-mcp
uv sync

# Run tests
uv run pytest

# Format and Lint
uv run ruff format . && uv run ruff check .

License

MIT License.

Reviews

No reviews yet

Sign in to write a review