Back to Home
acidsolution icon

schwab-mcp-server

Verified Safe

by acidsolution

Overview

A read-only Model Context Protocol (MCP) server for Charles Schwab API, enabling AI assistants to access financial data for portfolio analysis, real-time quotes, options data, and price history.

Installation

Run Command
npx @modelcontextprotocol/inspector python -m schwab_mcp.server

Environment Variables

  • SCHWAB_CALLBACK_URL
  • SCHWAB_TOKEN_PATH
  • SCHWAB_CLIENT_ID
  • SCHWAB_CLIENT_SECRET

Security Notes

The server is explicitly designed as 'READ-ONLY', preventing any trading or account modification. API credentials (client ID/secret) and refresh tokens are loaded from environment variables or a secure local file, not hardcoded. The `auth.py` module uses `os.chmod` to set secure file permissions (owner read/write only) on the token file. The `storage.py` module uses `sqlglot` to strictly validate SQL queries, ensuring only `SELECT` statements are executed against the in-memory DuckDB, which prevents SQL injection and unauthorized data manipulation. No 'eval' or similar dangerous functions were found.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens400
Stars0
Forks0
Last Update2025-12-07

Tags

Schwab APIMCP ServerFinancial DataPortfolio AnalysisTrading Analytics