CCXT MCP Server
OFFICIAL SERVERCrypto exchange and prediction market data, balances and opt-in trading through the ccxt library
Trade and pull market data through an Alpaca brokerage account: stocks, ETFs, options and crypto
Official · Alpaca Python Local · stdio Finance and payments
85 popularity score ★ 1.1k ↓ 42k/mo
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs ALPACA_API_KEY, ALPACA_SECRET_KEY. Replace each <NAME> with your value.
claude mcp add alpaca -e ALPACA_API_KEY=<ALPACA_API_KEY> -e ALPACA_SECRET_KEY=<ALPACA_SECRET_KEY> -- uvx alpaca-mcp-server{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": [
"alpaca-mcp-server"
],
"env": {
"ALPACA_API_KEY": "<ALPACA_API_KEY>",
"ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
}
}
}
}{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": [
"alpaca-mcp-server"
],
"env": {
"ALPACA_API_KEY": "<ALPACA_API_KEY>",
"ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
}
}
}
}{
"servers": {
"alpaca": {
"type": "stdio",
"command": "uvx",
"args": [
"alpaca-mcp-server"
],
"env": {
"ALPACA_API_KEY": "<ALPACA_API_KEY>",
"ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
}
}
}
}[mcp_servers.alpaca]
command = "uvx"
args = ["alpaca-mcp-server"]
[mcp_servers.alpaca.env]
ALPACA_API_KEY = "<ALPACA_API_KEY>"
ALPACA_SECRET_KEY = "<ALPACA_SECRET_KEY>"gemini mcp add --scope user -e ALPACA_API_KEY=<ALPACA_API_KEY> -e ALPACA_SECRET_KEY=<ALPACA_SECRET_KEY> alpaca uvx -- alpaca-mcp-serverOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs ALPACA_API_KEY, ALPACA_SECRET_KEY. Replace each <NAME> with your value.
git clone https://github.com/alpacahq/alpaca-mcp-server.git
cd alpaca-mcp-server
docker build -t mcp/alpaca:latest .claude mcp add alpaca -e ALPACA_API_KEY=<ALPACA_API_KEY> -e ALPACA_SECRET_KEY=<ALPACA_SECRET_KEY> -- docker run --rm -i -e ALPACA_API_KEY -e ALPACA_SECRET_KEY mcp/alpaca:latest{
"mcpServers": {
"alpaca": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"ALPACA_API_KEY",
"-e",
"ALPACA_SECRET_KEY",
"mcp/alpaca:latest"
],
"env": {
"ALPACA_API_KEY": "<ALPACA_API_KEY>",
"ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
}
}
}
}{
"mcpServers": {
"alpaca": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"ALPACA_API_KEY",
"-e",
"ALPACA_SECRET_KEY",
"mcp/alpaca:latest"
],
"env": {
"ALPACA_API_KEY": "<ALPACA_API_KEY>",
"ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
}
}
}
}{
"servers": {
"alpaca": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"ALPACA_API_KEY",
"-e",
"ALPACA_SECRET_KEY",
"mcp/alpaca:latest"
],
"env": {
"ALPACA_API_KEY": "<ALPACA_API_KEY>",
"ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
}
}
}
}[mcp_servers.alpaca]
command = "docker"
args = ["run", "--rm", "-i", "-e", "ALPACA_API_KEY", "-e", "ALPACA_SECRET_KEY", "mcp/alpaca:latest"]
[mcp_servers.alpaca.env]
ALPACA_API_KEY = "<ALPACA_API_KEY>"
ALPACA_SECRET_KEY = "<ALPACA_SECRET_KEY>"gemini mcp add --scope user -e ALPACA_API_KEY=<ALPACA_API_KEY> -e ALPACA_SECRET_KEY=<ALPACA_SECRET_KEY> alpaca docker -- run --rm -i -e ALPACA_API_KEY -e ALPACA_SECRET_KEY mcp/alpaca:latestALPACA_API_KEY |
Required: Alpaca API key ID (paper or live). |
|---|---|
ALPACA_SECRET_KEY |
Required: Alpaca API secret key. |
ALPACA_PAPER_TRADE |
Optional: Paper trading unless set to something other than true/1/yes; false trades live. |
ALPACA_TOOLSETS |
Optional: Comma-separated toolsets to enable, e.g. stock-data,crypto-data; all by default. |
DATA_API_URL |
Optional: Market data host; defaults to https://data.alpaca.markets. |
ALPACA_MCP_USER_AGENT |
Optional: Overrides the user-agent sent to Alpaca; empty string sends none. |
In a container, a setting goes in with -e NAME=value after docker run.
Alpaca's own server for its Trading and Market Data APIs. Running on your machine with your Alpaca key pair, it can read your account, balances, positions and order history. It can also submit, replace and cancel orders for stocks, ETFs, crypto and options (including multi-leg option strategies), close positions and exercise options. On the data side it returns historical and latest bars, quotes and trades, snapshots, option chains with Greeks, crypto order books, news, corporate actions, market movers and bond quotes. Five extra tools look up Alpaca's own documentation and API reference.
Version 2 is a full rewrite: most tools are generated from Alpaca's OpenAPI specs, and the order and historical-data tools are written by hand. Its makers warn that none of the v1 tools carry over unchanged, so prompts or scripts built on v1 tool names need redoing. You can pin a 1.x release to stay on v1.
It trades on a paper (simulated) account unless ALPACA_PAPER_TRADE is set otherwise. In server.py at v2.4.0, only true, 1 or yes (any case) keep it on paper. Any other value, "on" included, sends orders to the live endpoint api.alpaca.markets. The same file reads a DATA_API_URL setting the README does not list, which overrides the market-data host, and gives each API call a 30-second timeout. ALPACA_TOOLSETS narrows the API tools to named groups, but the five documentation tools are registered whatever it says (server.py, toolsets.py).
| Runtime | Python 3.10+orDocker |
|---|
Python 3.10+ and uv (the launch command is uvx). An Alpaca account and an API key and secret; a free paper-trading account is enough to start. Live trading needs a funded live account and its own keys. Some recent market data needs a paid Alpaca data plan (Algo Trader Plus). For Docker, you build the image yourself from a clone of the repository.
Talks to Alpaca only; Broker API endpoints are left out of both the tools and the docs lookup. The short-sale locate tools do not work in paper trading. Watchlists can only be seen and changed if they were created through the Trading API. Its HTTP mode (--transport streamable-http) has no MCP sign-in. Its makers say not to expose it to the public internet, so clients that need a remote server (ChatGPT, Claude mobile) are not supported. v2 tool names and parameters differ from v1. Its makers say its output is not investment advice.
Suits developers and traders who already use Alpaca and want an assistant to check positions, pull quotes and bars, or place orders. Start on paper keys: the default is paper trading, and live trading is one setting away. With ALPACA_TOOLSETS you can expose only data groups (for example stock-data,crypto-data) and leave the order tools out. Not for other brokers, for a hosted endpoint, or for anyone who wants an assistant that cannot place trades unless the toolsets are restricted.
get_account_infoget_account_configupdate_account_configget_portfolio_historyget_account_activitiesget_ordersget_order_by_idget_order_by_client_idreplace_order_by_idcancel_order_by_idcancel_all_ordersplace_stock_orderplace_crypto_orderplace_option_orderget_all_positionsget_open_positionclose_positionclose_all_positionsexercise_options_positiondo_not_exercise_options_positioncreate_watchlistget_watchlistsget_watchlist_by_idupdate_watchlist_by_iddelete_watchlist_by_idadd_asset_to_watchlist_by_idremove_asset_from_watchlist_by_idget_all_assetsget_assetget_option_contractsget_option_contractget_calendarget_clockget_corporate_action_announcementsget_stock_barsget_stock_quotesget_stock_tradesget_stock_latest_barget_stock_latest_quoteget_stock_latest_tradeget_stock_snapshotget_most_active_stocksget_market_moversget_crypto_barsget_crypto_latest_barget_crypto_latest_quoteget_crypto_latest_tradeget_crypto_snapshotget_crypto_latest_orderbookget_option_barsget_option_latest_tradeget_option_latest_quoteget_option_snapshotget_option_chainget_corporate_actionsget_newsget_fixed_income_latest_quotescreate_locatesearch_alpaca_docsget_alpaca_endpoint_docs