Public.com MCP Server
OfficialClick 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., "@Public.com MCP Servershow me my portfolio holdings"
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.
Public.com MCP Server
An MCP (Model Context Protocol) server that connects AI assistants to your Public.com brokerage account. Trade stocks, options, and crypto — get quotes, manage orders, and view your portfolio — all through natural language.
Disclaimer: For illustrative and informational purposes only. Not investment advice or recommendations. Use at your own risk.
Tools
Read-Only
Tool | Description |
| Verify API credentials and connectivity |
| List all brokerage accounts |
| View positions, equity, buying power, open orders |
| List active/open orders |
| Get status of a specific order |
| Transaction history (trades, deposits, dividends, etc.) |
| Real-time quotes for stocks, crypto, options |
| OHLCV historic bars for equities, crypto, options, or indices |
| Details about a specific tradeable instrument |
| List all available instruments with filters |
| Available expiration dates for options |
| Full option chain (calls + puts) for a symbol |
| Greeks (delta, gamma, theta, vega, rho, IV) for multiple options |
| Greeks for a single option symbol |
| Estimate costs/impact before placing a single-leg order |
| Estimate costs for multi-leg options strategies |
| Estimate costs before placing a short-sale order |
| Estimate costs for a Bear Call Spread |
| Estimate costs for a Bull Call Spread |
| Estimate costs for a Bull Put Spread |
| Estimate costs for a Bear Put Spread |
Write (Destructive)
Tool | Description |
| Place a single-leg order (stocks, crypto, options) |
| Place multi-leg orders (spreads, straddles, etc.) |
| Place a Bear Call Spread |
| Place a Bull Call Spread |
| Place a Bull Put Spread |
| Place a Bear Put Spread |
| Place an equity short-sale order |
| Sell an existing long position then go short (experimental) |
| Cancel an existing order |
| Atomically cancel and replace an order |
Related MCP server: ibkr-mcp-server
Prerequisites
Python 3.10+
Public.com account — Sign up
Public.com API key — Get one here
Installation
pip install publicdotcom-mcp-serverOr install from source:
git clone https://github.com/publicdotcom/publicdotcom-mcp-server.git
cd publicdotcom-mcp-server
pip install .Configuration
Set your API credentials as environment variables:
# Required
export PUBLIC_COM_SECRET=your_api_secret_key
# Optional — sets a default account so you don't need to specify it each time
export PUBLIC_COM_ACCOUNT_ID=your_account_idUsage
Claude Desktop
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"public-com": {
"command": "publicdotcom-mcp-server",
"env": {
"PUBLIC_COM_SECRET": "your_api_secret_key",
"PUBLIC_COM_ACCOUNT_ID": "your_account_id"
}
}
}
}Claude Desktop (using uvx)
If you prefer using uvx (no pre-install needed):
{
"mcpServers": {
"public-com": {
"command": "uvx",
"args": ["publicdotcom-mcp-server"],
"env": {
"PUBLIC_COM_SECRET": "your_api_secret_key",
"PUBLIC_COM_ACCOUNT_ID": "your_account_id"
}
}
}
}Running Directly
# stdio transport (default — for Claude Desktop, Claude Code, etc.)
publicdotcom-mcp-server
# Or run as a Python module
python -m publicdotcom_mcp_serverHosted / Remote Deployment
For remote deployments (behind a reverse proxy or load balancer), switch to the streamable-HTTP transport:
export MCP_TRANSPORT=streamable-http
export PUBLIC_COM_SECRET=your_api_secret_key
export PORT=8000 # optional, defaults to 8000
export HOST=0.0.0.0 # optional, defaults to 0.0.0.0
publicdotcom-mcp-serverIn this mode the server listens for MCP requests at POST /mcp. Clients authenticate per-request via an Authorization: Bearer <key> header, which takes priority over the PUBLIC_COM_SECRET environment variable — useful for multi-tenant deployments.
Testing with MCP Inspector
npx @modelcontextprotocol/inspector publicdotcom-mcp-serverDevelopment
# Clone and install in development mode
git clone https://github.com/publicdotcom/publicdotcom-mcp-server.git
cd publicdotcom-mcp-server
pip install -e ".[dev]"
# Run tests
pytest
# Run the server locally
python -m publicdotcom_mcp_serverHow It Works
This server wraps the publicdotcom-py Python SDK, exposing each API operation as an MCP tool. The MCP protocol allows AI clients to discover and call these tools through a standardized interface.
AI Client (Claude, etc.)
↕ MCP Protocol (stdio)
Public.com MCP Server
↕ HTTPS
Public.com Trading APIAll tools include proper MCP tool annotations:
Read-only tools are marked with
readOnlyHint: trueWrite tools are marked with
destructiveHint: true
License
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
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/PublicDotCom/publicdotcom-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server