Alpaca MCP Server
Servidor MCP de Alpaca
Exponer Alpaca Market Data & Broker API como herramientas MCP.
Instalación
npm install alpaca-mcpRelated MCP server: Financial Datasets MCP Server
Desarrollo local
git clone <repo-url>
cd alpaca-mcp
npm installVariables de entorno
Cree un .env en la raíz del proyecto con:
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_KEYComandos
inicio (dev):
npm start(ejecutanpx tsx index.ts)compilación :
npm run build(compila endist/)ejecutar compilado :
node dist/index.js
Uso
Una vez en ejecución, el servidor MCP escucha en la entrada/salida estándar. Utilice cualquier cliente MCP o la CLI:
npm link # optional
alpaca-mcp # starts server globallyHerramientas disponibles
obtener-activos
{ assetClass?: "us_equity" | "crypto" }get-stock-bars
{ symbols: string[]; start: string; end: string; timeframe: string }obtener-días-de-mercado
{ start: string; end: string }obtener-noticias
{ start: string; end: string; symbols: string[] }
Cada uno devuelve JSON en content[0].text o un error.
Configuración del cliente MCP
Para integrar a través de mcp.config.json , agregue lo siguiente bajo la clave mcpServers :
{
"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 publishLicencia
ISC
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/cesarvarela/alpaca-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server