Skip to main content
Glama

Alpaca MCP Server

by cesarvarela

Servidor MCP de Alpaca

Exponer Alpaca Market Data & Broker API como herramientas MCP.

Instalación

npm install alpaca-mcp

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

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Servidor MCP que expone Alpaca Market Data & Broker API como herramientas, lo que permite el acceso a datos financieros como barras de acciones, activos, días de mercado y noticias a través del Protocolo de Control de Mensajes.

  1. Instalación
    1. Desarrollo local
      1. Variables de entorno
        1. Comandos
          1. Uso
            1. Herramientas disponibles
          2. Configuración del cliente MCP
            1. Licencia

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides real-time access to financial market data through the free Alpha Vantage API. This server implements a standardized interface for retrieving stock quotes and company information.
                Last updated -
                5
                30
                Python
                MIT License
                • Apple
              • -
                security
                F
                license
                -
                quality
                An MCP server implementation that integrates with Angle One APIs to provide standardized access to financial market data, trading operations, and portfolio management.
                Last updated -
                Python
              • -
                security
                A
                license
                -
                quality
                MCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.
                Last updated -
                253
                Python
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server that integrates with the AlphaVantage financial data API, providing access to stock market data, technical indicators, and fundamental financial information.
                Last updated -
                Python
                MIT License
                • Linux
                • Apple

              View all related MCP servers

              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