IS

itsmostafa/schwab-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

5 stars 3 forks 品質 72 トレンド 21MIT

Charles Schwab MCP - View your schwab account balance, positions and place live trades

概要

Let your AI agent read your Schwab accounts, pull market data, and place trades. A single, ultra-fast binary MCP server for the Schwab Trader API. Works with Claude Desktop, Claude Code, and Codex. Unofficial project. Not affiliated with or endorsed by Charles Schwab & Co., Inc. asking an agent "how is my portfolio doing?" or "what does the SPY option chain look like for next Friday?" means exporting CSVs, copy-pasting quotes, or writing your own OAuth client against the Schwab API. Schwab's OAuth flow alone (HTTPS callback, 30-minute access tokens, 7-day refresh tokens) is enough to stall a weekend project. schwab handles the login flow, stores and refreshes tokens for you, and exposes accounts, orders, transactions, and market data as MCP tools. Install one binary, log in once a week, and your agent can answer questions against live data. Trading stays off unless you explicitly turn it on.

README

以下は原文 README の抜粋です。原文を見る。

Schwab MCP

Let your AI agent read your Schwab accounts, pull market data, and place trades. A single, ultra-fast binary MCP server for the Schwab Trader API. Works with Claude Desktop, Claude Code, and Codex.

┌──────────────────┐   stdio (MCP)   ┌──────────┐   HTTPS + OAuth   ┌───────────────────┐
│  Claude / Codex  │ ──────────────▶ │  schwab  │ ────────────────▶ │ Schwab Trader API │
└──────────────────┘                 └──────────┘                   └───────────────────┘
                                          │
                                   token.json (auto-refreshed)

Unofficial project. Not affiliated with or endorsed by Charles Schwab & Co., Inc.

Why this exists

The problem: asking an agent “how is my portfolio doing?” or “what does the SPY option chain look like for next Friday?” means exporting CSVs, copy-pasting quotes, or writing your own OAuth client against the Schwab API. Schwab’s OAuth flow alone (HTTPS callback, 30-minute access tokens, 7-day refresh tokens) is enough to stall a weekend project.

The solution: schwab handles the login flow, stores and refreshes tokens for you, and exposes accounts, orders, transactions, and market data as MCP tools. Install one binary, log in once a week, and your agent can answer questions against live data. Trading stays off unless you explicitly turn it on.

Quickstart

1. Install (macOS and Linux, amd64 and arm64):

curl -fsSL https://raw.githubusercontent.com/itsmostafa/schwab-mcp/main/install.sh | sh

2. Log in with your Schwab app credentials (how to get them):

schwab login

It prompts for the App Key and Secret the first time and saves them to ~/.config/schwab/config.

3. Add it to Claude Code, Claude Desktop, and Codex (other clients below):

schwab mcp setup

Then ask: “Show my account balances and today’s top movers in the S&P 500.”

What you get

  • Zero-dependency install. One static Go binary with checksum-verified downloads and schwab update to upgrade in place.
  • Login without the OAuth headache. schwab login runs the HTTPS callback server for you and saves the token. Expired access tokens refresh automatically on the next request.
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "schwab": { "command": "/Users/you/.local/bin/schwab", "args": ["mcp"], "env": { "SCHWAB_APP_KEY": "your-app-key", "SCHWAB_APP_SECRET": "your-app-secret" } } } }