Skip to main content
Glama
cesarvarela

Alpaca MCP Server

by cesarvarela

Servidor MCP de Alpaca

Exponer Alpaca Market Data & Broker API como herramientas MCP.

Instalación

npm install alpaca-mcp

Related MCP server: Financial Datasets MCP Server

Desarrollo local

git clone <repo-url>
cd alpaca-mcp
npm install

Variables 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_KEY

Comandos

  • inicio (dev): npm start (ejecuta npx tsx index.ts )

  • compilación : npm run build (compila en dist/ )

  • 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 globally

Herramientas 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 publish

Licencia

ISC

Install Server
F
license - not found
D
quality
C
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/cesarvarela/alpaca-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server