Alpaca MCP Server
Interact with Alpaca's market data and brokerage services via its API.
Alpaca MCP Server
Expose Alpaca Market Data & Broker API as MCP tools.
Installation
Installing via Smithery
To install Alpaca Market Data Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @cesarvarela/alpaca-mcp --client claude
Manual Installation
npm install alpaca-mcp
Local Development
git clone <repo-url>
cd alpaca-mcp
npm install
Environment Variables
Create a .env at project root with:
ALPACA_ENDPOINT=https://data.alpaca.markets
ALPACA_BROKER_ENDPOINT=https://broker-api.alpaca.markets
ALPACA_API_KEY=YOUR_ALPACA_API_KEY
ALPACA_SECRET_KEY=YOUR_ALPACA_SECRET_KEY
Commands
- start (dev):
npm start(runsnpx tsx index.ts) - build:
npm run build(compiles todist/) - run compiled:
node dist/index.js
Usage
Once running, the MCP server listens on stdin/stdout. Use any MCP client or the CLI:
npm link # optional
alpaca-mcp # starts server globally
Available Tools
- get-assets
{ assetClass?: "us_equity" | "crypto" } - get-stock-bars
{ symbols: string[]; start: string; end: string; timeframe: string } - get-market-days
{ start: string; end: string } - get-news
{ start: string; end: string; symbols: string[] }
Each returns JSON in content[0].text or an error.
MCP Client Configuration
To integrate via mcp.config.json, add the following under the mcpServers key:
{
"mcpServers": {
"alpaca-mcp": {
"command": "npx",
"args": [
"-y",
"alpaca-mcp"
],
"env": {
"ALPACA_ENDPOINT": "https://data.alpaca.markets",
"ALPACA_BROKER_ENDPOINT": "https://broker-api.alpaca.markets",
"ALPACA_API_KEY": "<YOUR_API_KEY>",
"ALPACA_SECRET_KEY": "<YOUR_SECRET_KEY>"
}
}
}
}
## Publishing
```bash
npm publish
License
ISC
Похожие серверы
CMP MCP Server
An MCP server for CMP API integration, built to run on Cloudflare Workers.
ESA MCP Server
An MCP server for Alibaba Cloud's Edge Security Acceleration (ESA) service.
Ultrahuman
Fetch health and fitness metrics like heart rate, sleep, and steps from the Ultrahuman API.
OpZero
Multi-cloud deployment MCP server — deploy to Cloudflare Pages, Vercel, or Netlify from a single tool with 26 MCP tools.
Multi-Cloud VM MCP Server
Manage virtual machines across multiple cloud providers, including AWS EC2, Azure Virtual Machines, and GCP Compute Engine.
Whissle AI
Provides speech-to-text, diarization, translation, and text summarization via the Whissle AI API.
APOGEOAPI
Geographic data, live exchange rates, and IP geolocation for Claude Desktop, Cursor, and any MCP-compatible AI assistant.
Kubectl MCP Server
Enables AI assistants to interact with Kubernetes clusters using natural language.
StreamNative MCP Server
Integrate AI agents with StreamNative Cloud resources and Apache Kafka/Pulsar messaging systems.
AWS EC2 Pricing
Get up-to-date EC2 pricing information with one call. Fast. Powered by a pre-parsed AWS pricing catalogue.