Skip to main content
Glama
schwab-mcp

schwab-mcp

by tomasgesino

schwab-mcp

MCP server that connects Claude to your Charles Schwab brokerage account via the Schwab Trader API. Built for wheel strategy management, options analysis, and portfolio monitoring.

Tools Available

Read (always safe)

Tool

Description

get_accounts

Balances, buying power, positions summary

get_positions

Current holdings with P&L breakdown

get_quote

Real-time quotes for any symbols

get_option_chain

Options chain with greeks, OI, premiums

get_orders

Open/recent orders

get_price_history

Historical OHLCV candles

Write (dry_run=true by default)

Tool

Description

sell_covered_call

Sell CC against shares you own

sell_cash_secured_put

Sell CSP (wheel entry)

place_order

Submit any custom order payload

cancel_order

Cancel an open order

Safety: All write tools default to dry_run=true, which shows the order preview without submitting. You must explicitly set dry_run=false to execute.

Related MCP server: firstrade-mcp-server

Setup

1. Register a Schwab Developer App

  1. Go to developer.schwab.com

  2. Create a separate developer account (not your brokerage login)

  3. Click "Create App" in the Dashboard

  4. Select "Accounts and Trading Production" as the API product

  5. Set callback URL to https://127.0.0.1:8182

  6. Wait for approval (status changes from "Approved — Pending" to "Ready For Use", typically 1-3 days)

  7. Copy your App Key and App Secret

2. Configure

cp .env.example .env
# Edit .env with your App Key and App Secret

3. Install Dependencies

npm install

4. Authenticate

npm run auth

This opens your browser for Schwab OAuth login. You'll:

  1. Log in with your brokerage credentials

  2. Select which account(s) to authorize

  3. Get redirected to a localhost URL

  4. Paste that URL back into the terminal

Tokens are saved to tokens.json. The refresh token is valid for 7 days — you'll need to re-auth after that.

5. Add to Claude Desktop

Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "schwab": {
      "command": "node",
      "args": ["/absolute/path/to/schwab-mcp/src/index.js"],
      "env": {}
    }
  }
}

Restart Claude Desktop. You should see the Schwab tools appear.

Example Prompts

Once connected, you can ask Claude things like:

  • "What are my current positions and P&L?"

  • "Show me the AAPL options chain for calls expiring in the next 2 weeks"

  • "What covered calls could I sell on my AAPL shares for ~30 delta?"

  • "Preview a cash-secured put on SPY at the $540 strike"

  • "What are my open orders?"

  • "Cancel order 123456789"

  • "Show me a 3-month price chart for TSLA"

Architecture

Claude Desktop
    │ (stdio)
    ▼
schwab-mcp (this server)
    │ (HTTPS + OAuth2)
    ▼
Schwab Trader API
    │
    ▼
Your Brokerage Account

Token Lifecycle

  • Access token: Expires every 30 minutes, auto-refreshed by the client

  • Refresh token: Valid for 7 days, then you must re-run npm run auth

  • Consider a cron job to refresh tokens periodically to avoid expiration

Notes

  • The Schwab API may take 1-3 days to approve your app after registration

  • Option symbols use OCC format: AAPL 260417C00200000 (padded, strike × 1000)

  • Rate limits apply — the client doesn't currently implement backoff (TODO)

  • This is for personal use only per Schwab's Individual Trader API terms

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
      D
      maintenance
      Enables AI assistants to securely interact with Charles Schwab accounts through OAuth authentication, providing access to account balances, real-time market quotes, options chains, transaction history, order management, and comprehensive market data.
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      15
      4
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude to log into Fidelity through Playwright browser automation and view accounts, positions, and quotes, as well as stage, preview, or place orders, initiate transfers, and capture screenshots. Orders default to dry-run previews, and the user always completes login and 2FA themselves.
      12
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects Claude to a Tastytrade brokerage account to read balances, positions, option chains, screeners and realized P&L, and to preview and place multi-leg orders only after a broker dry-run, an operator live-trading switch and an explicit per-order confirmation in chat.
      MIT