JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q89977F
  • License MIT

Model Context Protocol (MCP) server for Alphabots trading platform - provides portfolio insights and trading data integration

Package Exports

  • alphabots-mcp-server
  • alphabots-mcp-server/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (alphabots-mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Alphabots MCP Server

A self-contained Model Context Protocol (MCP) server for Alphabots trading platform integration.

Features

  • Portfolio Insights: Get comprehensive portfolio holdings and financial insights
  • Real-time Data: Fetch live trading data from Alphabots platform
  • MCP Compatible: Fully compliant with Model Context Protocol stdio transport
  • Self-contained: No external file dependencies, runs as standalone package
  • Docker Ready: Easy deployment with Docker and Docker Compose

Quick Start

# Set your MCP token
export MCP_TOKEN=your_mcp_token_here

# Run the server
npx alphabots-mcp-server

Using Docker

  1. Build and run with Docker Compose:
# Set your MCP token in environment
export MCP_TOKEN=your_mcp_token_here

# Build and start the container
docker-compose up --build
  1. Or build and run manually:
# Build the image
docker build -t alphabots-mcp-server .

# Run the container
docker run -e MCP_TOKEN=your_mcp_token_here alphabots-mcp-server

Local Development

# Clone and install dependencies
npm install

# Set environment variable
export MCP_TOKEN=your_mcp_token_here

# Start the server
npm start

Environment Variables

Variable Required Description
MCP_TOKEN Yes Your Alphabots MCP authentication token

Available Tools

get_user_broker_insights

Retrieves comprehensive portfolio data including:

  • Total invested amount
  • Current portfolio value
  • Total profit/loss
  • Top gaining and losing positions
  • Detailed holdings with individual P&L

Usage:

{
  "name": "get_user_broker_insights",
  "arguments": {}
}

Docker Deployment

Production Deployment

  1. Create environment file:
echo "MCP_TOKEN=your_actual_token_here" > .env
  1. Deploy with Docker Compose:
docker-compose up -d
  1. Check logs:
docker-compose logs -f

Docker Commands

# Build image
docker build -t alphabots-mcp-server .

# Run container
docker run -d --name mcp-server -e MCP_TOKEN=your_token alphabots-mcp-server

# View logs
docker logs mcp-server

# Stop container
docker stop mcp-server

# Remove container
docker rm mcp-server

Configuration

The server validates the MCP token on startup. Ensure your token:

  • Starts with mcp_
  • Is longer than 10 characters
  • Has valid Alphabots API access

Troubleshooting

Common Issues

  1. Invalid Token Error:

    • Verify your MCP_TOKEN is correctly set
    • Ensure token starts with mcp_ and is valid
  2. API Connection Issues:

    • Check network connectivity
    • Verify token has proper API permissions
  3. Docker Issues:

    • Ensure Docker is running
    • Check environment variables are properly set

Logs

The server provides detailed logging:

  • Startup information
  • API request/response details
  • Error messages with context

Security

  • Runs as non-root user in Docker
  • Environment variables for sensitive data
  • No hardcoded credentials
  • Minimal attack surface

Requirements

  • Node.js 18+ (for local development)
  • Docker (for containerized deployment)
  • Valid Alphabots MCP token

License

MIT License