# schwab-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/lonniev/schwab-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/schwab-mcp

## Description
Multi-tenant FastMCP server for Charles Schwab brokerage data, monetized via DPYC Tollbooth

## Tools
Capabilities this server exposes over MCP:

- **get_brokerage_positions** — Portfolio positions with automatic options spread detection (bull put / bear call)
- **get_brokerage_balances** — Cash, buying power, net liquidation value, day P&L
- **get_stock_quote** — Real-time quotes for one or more symbols
- **get_market_movers** — Top movers for a market index ($SPX, $DJI, $COMPX)
- **get_market_hours** — Trading hours for equity, option, bond, future, forex markets
- **search_instruments** — Search for instruments by symbol, name, or CUSIP
- **get_option_chain** — Filtered option chain with Greeks, IV, OTM%, and OI threshold
- **get_price_history** — Historical OHLCV candle data
- **get_brokerage_orders** — Order history with multi-leg spread support (default 30 days)
- **get_brokerage_order** — Single order detail by ID
- **get_brokerage_transactions** — Transaction history -- trades, dividends, cash movements (default 30 days)
- **get_brokerage_transaction** — Single transaction detail by ID
- **session_status** — Check operator lifecycle state and readiness
- **service_status** — Check health and configuration of this service
- **begin_oauth** — Start OAuth2 flow -- returns Schwab authorization URL
- **check_oauth_status** — Poll whether OAuth flow completed and session is active
- **get_account_numbers** — List linked Schwab account numbers and hashes
- **request_credential_channel** — Open a Secure Courier channel for credential delivery via Nostr DM
- **receive_credentials** — Pick up credentials from the encrypted vault
- **forget_credentials** — Delete vaulted credentials for re-delivery
- **update_patron_credential** — Add or update a single patron credential field
- **delete_patron_credential** — Remove a single patron credential field
- **get_patron_credential_fields** — List stored patron credential field names
- **check_balance** — View credit balance and usage
- **check_price** — Preview tool cost before calling
- **purchase_credits** — Create a Lightning invoice to buy credits
- **check_payment** — Verify Lightning payment and credit the balance
- **restore_credits** — Restore credits from a previously paid invoice
- **account_statement** — View account statement summary
- **account_statement_infographic** — Visual SVG infographic of account (1 sat)
- **check_authority_balance** — Check operator's cert-sat balance at Authority
- **get_pricing_model** — View the active pricing model
- **list_constraint_types** — List available constraint types and schemas
- **request_npub_proof** — Request an npub ownership proof via Nostr DM; returns its nonce
- **receive_npub_proof** — Collect the reply into this connection, which then holds the npub
- **get_operator_onboarding_status** — Report operator configuration readiness
- **get_patron_onboarding_status** — Report patron credential readiness
- **list_notarizations** — List recent Bitcoin notarization records
- **get_notarization_proof** — Generate a Merkle inclusion proof for a patron balance

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "schwab-mcp": {
    "url": "https://schwab-mcp.fastmcp.app/mcp"
  }
}
```

## Documentation

## What schwab-mcp does

schwab-mcp exposes read-only Charles Schwab brokerage data to MCP-compatible AI clients. Its brokerage tools cover portfolio positions, account balances, real-time stock quotes, market movers, trading hours, instrument lookup, option chains, historical price candles, order history, individual orders, transaction history, and individual transactions.

The server also includes account and service lifecycle tools. Agents can start and monitor the Schwab OAuth flow, list linked account numbers and hashes, inspect session and service readiness, and view an account statement or an SVG account infographic. Brokerage operations do not place, modify, or cancel orders.

## How it works

The service runs as a multi-tenant FastMCP application over Streamable HTTP. It calls the Schwab API directly with asynchronous HTTP requests rather than using a third-party Schwab SDK. Schwab access uses an OAuth2 browser flow, with sessions associated with a patron identity.

Usage is handled through DPYC Tollbooth. Patrons pre-fund an `api_sats` balance with Bitcoin Lightning, and paid tool calls debit that balance according to the operator's pricing model. A failed downstream call triggers a credit rollback. Free tools include status, OAuth, credential, and payment-management operations, while brokerage queries are credit-gated. Actual prices can be set dynamically by the operator.

Patron identity can be established through a Nostr public key. A client may sign requests using NIP-98, or complete a human-approved Secure Courier exchange that associates the connection with an `npub`. The selected identity duration can persist across MCP restarts.

## Setup and configuration

Python 3.12 or newer is required. The server is designed for Streamable HTTP rather than a local-only stdio deployment. Schwab credentials are handled through the service's OAuth and Secure Courier flows instead of being placed in environment variables.

Operator credentials are delivered through Secure Courier and validated before they are stored. The operator configuration includes a BTCPay host, BTCPay API key, BTCPay store ID, Schwab app key, and Schwab secret. Patrons authenticate their own Schwab access through the browser-based OAuth process. The OAuth collector URL is resolved at runtime through the DPYC registry.

Before calling paid brokerage tools, a patron needs an identity and sufficient Lightning credit balance. `check_balance` shows usage and available credit, while `check_price` previews a tool's cost. `purchase_credits`, `check_payment`, and `restore_credits` manage Lightning-funded credit balances.

## Tools and capabilities

- Inspect positions with automatic bull put and bear call spread detection.
- Read cash, buying power, net liquidation value, and day profit or loss.
- Retrieve quotes, index market movers, trading hours, historical OHLCV data, and instrument matches by symbol, name, or CUSIP.
- Filter option chains using Greeks, implied volatility, out-of-the-money percentage, and open-interest thresholds.
- Review multi-leg orders and transaction records, including trades, dividends, and cash movements. Order and transaction history defaults to 30 days.
- Manage OAuth sessions, account links, patron credentials, Nostr identity proof, and Lightning payments.
- Produce an account statement summary or a visual SVG account infographic.

## Limitations and notes

All brokerage tools are read-only. The server cannot submit or manage Schwab orders. Access depends on a completed Schwab OAuth session and valid operator configuration. Paid calls require a patron identity and credits, and the operator controls the pricing model and credit lifetime. Account and market data are retrieved from the Schwab API through the service's authenticated sessions.

_Full upstream README: https://allmcps.com/mcp/schwab-mcp/readme_

