Public.com MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Public.com MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with access to Public.com's stock and options trading APIs.
Features
Real-time market data - Stock and crypto quotes, bid/ask spreads, volume
Options analytics - Chains, expirations, Greeks (delta, gamma, theta, vega, rho, IV)
Portfolio management - View positions, equity, buying power, transaction history
Order placement - Single-leg and multi-leg orders with safety guards
Pre-trade analysis - Preflight calculations for cost estimates before trading
Related MCP server: Schwab MCP Server
Prerequisites
Node.js 18+ or Bun runtime
Public.com account with API access
API secret key from Public.com Settings
Installation
Via npm
npm install -g public-com-mcpVia npx (no install)
npx public-com-mcpFrom source
git clone https://github.com/Gajesh2007/public-com-mcp.git
cd public-com-mcp
bun installConfiguration
Edit .env with your credentials:
# Required - your API secret key
PUBLIC_API_SECRET_KEY=your-api-secret-key
# Optional - default account ID (use get_accounts to find yours)
PUBLIC_DEFAULT_ACCOUNT_ID=
# Safety - set to "true" to enable live trading (default: false)
ENABLE_TRADING=falseUsage
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
Using npx (easiest):
{
"mcpServers": {
"public-stocks": {
"command": "npx",
"args": ["public-com-mcp"],
"env": {
"PUBLIC_API_SECRET_KEY": "your-api-key"
}
}
}
}Using global install:
{
"mcpServers": {
"public-stocks": {
"command": "public-com-mcp",
"env": {
"PUBLIC_API_SECRET_KEY": "your-api-key"
}
}
}
}Using Bun (from source):
{
"mcpServers": {
"public-stocks": {
"command": "bun",
"args": ["run", "/path/to/public-com-mcp/src/index.ts"]
}
}
}Standalone
# Via npx
npx public-com-mcp
# Via global install
public-com-mcp
# From source with Bun
bun run src/index.tsDevelopment
# Run with hot reload
bun run dev
# Build for distribution
bun run build
# Run tests
bun testAvailable Tools
Market Data
Tool | Description |
| Get real-time quote for a single symbol |
| Batch quotes for multiple symbols (max 50) |
| Get trading capabilities for a symbol |
| Search/filter available instruments |
Options
Tool | Description |
| List available expiration dates |
| Full options chain for an expiration |
| Greeks for option contracts |
Account
Tool | Description |
| List your trading accounts |
| Portfolio snapshot with positions |
| Transaction history |
Orders
Tool | Description |
| Estimate costs before placing |
| Estimate multi-leg strategy costs |
| Place single-leg order* |
| Place options spread* |
| Cancel pending order* |
| Check order status |
*Requires ENABLE_TRADING=true
Example Prompts
Once connected to Claude, you can ask:
"What's the current price of AAPL?"
"Show me the options chain for SPY expiring next Friday"
"What are the Greeks for AAPL 250 calls expiring in February?"
"What's in my portfolio?"
"How much would it cost to buy 10 shares of NVDA?"
Safety
Trading is disabled by default. The place_order, place_multileg_order, and cancel_order tools will not execute unless ENABLE_TRADING=true is set in your environment.
When trading is disabled, you can still:
View real-time quotes and market data
Analyze options chains and Greeks
View your portfolio and account history
Run preflight calculations to estimate order costs
Project Structure
src/
├── index.ts # Entry point (stdio transport)
├── server.ts # MCP server configuration
├── client/
│ ├── types.ts # TypeScript type definitions
│ ├── auth.ts # API token management
│ └── public-api.ts # HTTP client for Public.com
├── tools/
│ ├── market-data.ts # Quote & instrument tools
│ ├── options.ts # Options chain & Greeks
│ ├── account.ts # Portfolio & history
│ └── orders.ts # Order placement (guarded)
└── schemas/
└── index.ts # Zod validation schemasLicense
MIT
Disclaimer
This software is provided as-is. Trading stocks and options involves risk. Always verify orders before enabling live trading. The authors are not responsible for any financial losses.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
OpenFinance gives any AI agent easy trading across every major market through one hosted MCP server. Trade crypto spot and perpetuals on Hyperliquid with market, limit and TWAP orders, leverage and margin control. Trade stocks, indices, commodities, forex and pre-IPO names as Hyperliquid HIP-3 perps. Trade Polymarket prediction markets with odds, order books, positions, PnL and trader leaderboards. Swap and bridge across 40+ EVM chains and Solana with Relay and Jupiter, find memecoins across 200+ chains, launch tokens on Robinhood Chain and Solana, and buy crypto with card, bank or UPI. Write actions are designed to ask for your confirmation first. Connect with OAuth (sign in to OpenFinance and approve) or an API key. Works with Claude, ChatGPT, Cursor, VS Code, Codex and any MCP client. No install. Home: https://openfinance.tech/agents · Docs: https://docs.openfinance.tech · GitHub: https://github.com/openfinance-tech/mcp
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables trading and portfolio management through the Alpaca API, allowing users to place orders, manage positions and watchlists, access market data, and retrieve account information through natural language.4ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely interact with Charles Schwab accounts through OAuth authentication, providing access to account balances, real-time market quotes, options chains, transaction history, order management, and comprehensive market data.1MIT
- AlicenseAqualityBmaintenanceThis MCP server connects AI assistants to a Public.com brokerage account, enabling natural language trading of stocks, options, and crypto, along with portfolio management, quotes, and orders.46914 PyPI67Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read a Trading 212 portfolio (balances, positions, orders, history) and place trades via the public API, supporting both demo and live environments.MIT