- Home
- MCP servers
- Schwab
Schwab
- python
32
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jkoelker-schwab-mcp": {
"command": "schwab-mcp",
"args": [
"server",
"--client-id",
"YOUR_KEY",
"--client-secret",
"YOUR_SECRET"
],
"env": {
"SCHWAB_CLIENT_ID": "YOUR_KEY",
"SCHWAB_CALLBACK_URL": "https://127.0.0.1:8182",
"SCHWAB_CLIENT_SECRET": "YOUR_SECRET"
}
}
}
}The Schwab MCP Server connects your Schwab account to language model applications, letting them retrieve market data, view your account status, and optionally place trades under your supervision. It is designed to be safe and workflow-friendly, with trading actions gated by an approval mechanism when enabled.
How to use
You interact with the Schwab MCP Server by running it on your machine or in a container, then connecting an MCP client to the local server. Start by authenticating with Schwab to generate a token, then run the server with your Schwab App credentials. In your MCP client, request market data, view balances and positions, or place trades through the available tools. If you enable trading, the server requires a Discord approval workflow to authorize trades.
How to install
Prerequisites you need before installation:
- Python 3.10 or higher
- A Schwab Developer App Key and Secret from the Schwab Developer Portal
- A preferred runtime tool: uv (recommended for isolation) or pip
Additional setup and usage notes
Authentication must be completed before starting the server. You will log in via a browser window and a token file is saved at the default location. For trading capabilities, configure a Discord bot to handle approvals if you intend to enable live trading. You can run the server in basic read-only mode or with trading enabled, depending on your needs.
The server supports a set of tools grouped by data type and action. You can access market data, account information, and trading actions through these tools. The read-only mode provides access to data without placing orders by default.
Configuration and running the server
Configure your client and server using command-line flags as shown in the examples. The following configuration options are commonly used to connect to Schwab and control behavior. For trading, provide Discord integration details to enable the approval workflow.
Container usage and portable runs
A container image is available for easy deployment. You can run the container with your Schwab credentials mounted and the token stored in the container’s filesystem. This makes it straightforward to run in isolated environments or on servers.
Available tools
get_quotes
Fetch real-time quotes for requested symbols.
get_market_hours
Retrieve market open and close times.
get_movers
Get top market movers for a given index.
get_option_chain
Retrieve standard option chain data for symbols.
get_price_history
Obtain historical price data for specified intervals.
get_accounts
List linked Schwab accounts.
get_account_positions
Show positions and balances for accounts.
get_transactions
Provide a history of trades and transfers.
get_orders
Show status of open and filled orders.
place_equity_order
Place buy or sell orders for stocks or ETFs.
place_option_order
Place buy or sell orders for option contracts.
place_bracket_order
Enter a position with take-profit and stop-loss parameters.
cancel_order
Cancel an active order.