Schwab MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Schwab MCP ServerShow me my account balance and positions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Schwab MCP Server (Read-Only)
A read-only Model Context Protocol server that connects your Schwab brokerage account to LLM-based applications (Claude Desktop, Claude Code, or other MCP clients) for portfolio monitoring and market data retrieval.
Fork Notice: This project is forked from jkoelker/schwab-mcp and is a complete rewrite in TypeScript. The original project is a Python-based MCP server with trading capabilities and Discord approval workflows. This rewrite strips all trading functionality and focuses exclusively on read-only portfolio monitoring and market analysis.
Security: Following the principle of least privilege, all trading, options placement, and order management capabilities have been intentionally removed from this fork. This server is designed exclusively as a read-only portfolio data source — no orders can be placed, modified, or cancelled. Rather than gating trades behind approval workflows, the trading code has been eliminated entirely, so even if an LLM agent is prompt-injected or behaves unexpectedly, it cannot execute trades or modify your account. If you need trading capabilities, see the original project at jkoelker/schwab-mcp.
Features
Market Data: Real-time quotes, price history (multiple timeframes), market hours, movers, and instrument search.
Account Info: Balances, positions, transactions, and order history (read-only).
Technical Analysis: Optional indicators (SMA, EMA, RSI, MACD, Bollinger Bands, VWAP, ATR, ADX, and more) powered by technicalindicators.
LLM Integration: Built for agentic AI workflows via the MCP protocol.
Related MCP server: Schwab Model Context Protocol Server
Quick Start
Prerequisites
A Schwab brokerage account
A Schwab Developer App Key (client ID) and Secret (client secret)
Obtaining Schwab API Credentials
Go to the Schwab Developer Portal and sign in (or create an account).
Navigate to Dashboard → Apps → Create App.
Fill in the app details. Set the callback URL to
https://127.0.0.1:8182(the default used by this server).Once approved, your app page will display the App Key (this is your client ID) and Secret (this is your client secret).
Note: Schwab may take 1–2 business days to approve new apps. The callback URL you register must match the
--callback-urlflag (default:https://127.0.0.1:8182).
Installation
Using npx (recommended)
No installation required — run directly via npx:
npx github:Tapojit/schwab-mcp serverFrom source
git clone https://github.com/Tapojit/schwab-mcp.git
cd schwab-mcp
npm install
npm run buildSave Credentials
Store your App Key and Secret locally so you don't need to pass them every time:
schwab-mcp save-credentials --client-id YOUR_APP_KEY --client-secret YOUR_APP_SECRETOr set environment variables:
export SCHWAB_CLIENT_ID=YOUR_APP_KEY
export SCHWAB_CLIENT_SECRET=YOUR_APP_SECRETAuthentication
Generate an OAuth token by logging in to Schwab:
schwab-mcp authThis opens a browser for Schwab OAuth. A local HTTPS callback server captures the authorization code and exchanges it for access and refresh tokens.
Note: Your browser will warn about an invalid certificate — this is expected. The callback server uses a self-signed TLS certificate for localhost.
File Storage Paths
All files are stored in a platform-specific data directory with restricted permissions (0o600 for files, 0o700 for directories):
File | macOS | Linux |
OAuth token |
|
|
Credentials |
|
|
On Linux, the XDG_DATA_HOME environment variable is respected if set. On Windows, files are stored under %APPDATA%\schwab-mcp\.
You can override the token path with --token-path <path>.
Token expiry: Schwab access tokens expire after 30 minutes and refresh tokens after 7 days. The server automatically refreshes tokens in the background every 25 minutes. If the refresh token expires (after 7 days of inactivity), the server will notify connected clients and you'll need to re-authenticate with
schwab-mcp auth.
Running the Server
schwab-mcp serverProgrammatic Usage
This package exports its core modules for use as a library:
import { SchwabMCPServer } from "schwab-mcp/server";
import { SchwabClient } from "schwab-mcp/client";
import { TokenManager } from "schwab-mcp/tokens";
import type { OAuthToken, Candle } from "schwab-mcp/types";Configuration
Flag | Env Variable | Description |
|
| Schwab App Key |
|
| Schwab App Secret |
|
| Redirect URL (default: |
|
| API base URL (default: |
| — | Path to token file (default: platform-specific, see above) |
| — | Disable technical analysis tools |
Available Tools (35 total)
Utilities (4)
Tool | Description |
| Current datetime in Eastern Time |
| Market open/close times for a given date |
| Top 10 movers for an index (DJI, SPX, NASDAQ, etc.) |
| Search instruments by symbol or description |
Account Info (6)
Tool | Description |
| Account ID to hash mapping |
| Balances for all linked accounts |
| Balances + positions for all accounts |
| Balance for a specific account |
| Balance + positions for a specific account |
| User display/notification preferences |
Market Data (9)
Tool | Description |
| Real-time quotes for symbols |
| Price history with custom period/frequency |
| 1-minute OHLCV candles |
| 5-minute OHLCV candles |
| 10-minute OHLCV candles |
| 15-minute OHLCV candles |
| 30-minute OHLCV candles |
| Daily OHLCV candles |
| Weekly OHLCV candles |
Orders & Transactions (4, read-only)
Tool | Description |
| Details for a specific order |
| Order history with status/date filters |
| Transaction history (trades, dividends, etc.) |
| Details for a specific transaction |
Technical Analysis (12, optional)
Tool | Description |
| Simple Moving Average |
| Exponential Moving Average |
| Relative Strength Index |
| Stochastic Oscillator (%K, %D) |
| Moving Average Convergence Divergence |
| Average True Range |
| Average Directional Index |
| Volume Weighted Average Price |
| Pivot point support/resistance levels |
| Bollinger Bands |
| Historical volatility statistics |
| Option-priced expected move (±1 SD) |
Disable with
--no-technical-toolsif not needed.
OpenAPI Specifications
Official Schwab API specs are included in docs/openapi/ for reference:
trader-api.json— Accounts, Orders, Transactions, User Preferencesmarket-data-api.json— Quotes, Option Chains, Price History, Movers, Market Hours, Instruments
MCP Client Configuration
Add this to your MCP client config (e.g., Claude Desktop claude_desktop_config.json or Claude Code settings.json):
Using npx (recommended)
{
"mcpServers": {
"schwab": {
"command": "npx",
"args": ["-y", "github:Tapojit/schwab-mcp", "server"]
}
}
}Using a local clone
{
"mcpServers": {
"schwab": {
"command": "node",
"args": [
"/path/to/schwab-mcp/dist/index.js",
"server"
]
}
}
}Important: Use full absolute paths for local clones. A bare
"node"may not resolve in the MCP client's environment — use the full path (e.g.,/usr/local/bin/node) if needed.
Development
git clone https://github.com/Tapojit/schwab-mcp.git
cd schwab-mcp
npm install
# Build
npm run build
# Run tests (requires Bun)
bun test
# Type check
npx tsc --noEmitMCP Inspector
Test the server interactively with the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js serverAcknowledgments
This project is a fork of jkoelker/schwab-mcp, originally a Python-based MCP server for Schwab brokerage integration. This version is a complete rewrite using:
TypeScript with strict typing (replacing Python type hints)
Node.js as the runtime (replacing Python)
Read-only design — all trading, order placement, and Discord approval workflows have been removed
@modelcontextprotocol/sdk for MCP protocol integration
technicalindicators for technical analysis (replacing custom Python implementations)
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tapojit/schwab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server