Skip to main content

What is MCP Hub

HTTP server implementing Model Context Protocol (MCP) that provides AI agents with access to trading services through standardized tool calls. Protocol: JSON-RPC 2.0 over HTTP Endpoints:
  • Production: https://mcp.alpha.dev/api/mcp-hub/mcp
  • Development: https://dev.alpha.dev/api/mcp-hub/mcp
Authentication required. Contact support for API access.

Quick Start

List Available Tools

curl -X POST https://mcp.alpha.dev/api/mcp-hub/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

Call a Tool

curl -X POST https://mcp.alpha.dev/api/mcp-hub/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "genalpha_solchef_get_tokens_market_cap",
      "arguments": {
        "limit": 10
      }
    }
  }'

Tool Naming Convention

All tools follow the pattern: genalpha_{service}_{action} Examples:
  • genalpha_tim_execute_intent - Execute trading intent
  • genalpha_aiusd_get_portfolio - Get portfolio balance
  • genalpha_solchef_get_tokens_market_cap - Get token market caps

Available Services

TIM

Trading Intent ModelPrefix: genalpha_tim_*

AIUSD

Trading & PortfolioPrefix: genalpha_aiusd_*

Solchef

Market DataPrefix: genalpha_solchef_*

Integration Examples

With Claude Desktop

Add to claude_desktop_config.json:
{
  "mcpServers": {
    "aiusd": {
      "url": "https://mcp.alpha.dev/api/mcp-hub/mcp",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

With Anthropic SDK

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY,
});

const response = await client.messages.create({
  model: "claude-3-5-sonnet-20241022",
  max_tokens: 4096,
  tools: [{
    type: "custom",
    name: "mcp",
    mcp_server: {
      url: "https://mcp.alpha.dev/api/mcp-hub/mcp",
      transport: "http",
      headers: {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }],
  messages: [{
    role: "user",
    content: "What are the top 10 tokens by market cap?"
  }]
});

With MCP Inspector

Test your integration interactively:
npm install -g @modelcontextprotocol/inspector
npx @modelcontextprotocol/inspector
Configuration:
  • Transport: HTTP
  • URL: https://mcp.alpha.dev/api/mcp-hub/mcp
  • Auth: Bearer token required

Response Format

All tool calls return JSON-RPC 2.0 responses:
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{...tool response data...}"
      }
    ],
    "isError": false
  }
}

Error Handling

Errors follow JSON-RPC 2.0 error format:
{
  "jsonrpc": "2.0",
  "id": 2,
  "error": {
    "code": -32600,
    "message": "Invalid request",
    "data": {
      "details": "Missing required parameter"
    }
  }
}

Authentication

MCP Hub supports Bearer token authentication:
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://mcp.alpha.dev/api/mcp-hub/mcp
Contact support for API access credentials.

Running Locally

For local development and testing:

Prerequisites

  • Rust toolchain
  • just command runner (optional)

Start the Server

git clone https://github.com/galpha-ai/mcp-hub
cd mcp-hub

# Run with local config
just run-local

# Or with cargo
cargo run -- --config config/mcp-hub.local.yaml
Local server runs on http://127.0.0.1:3000/mcp
Local development uses passthrough authentication. Production requires valid Bearer tokens.

Tool Reference

TIM Tools

genalpha_tim_execute_intent - Execute trading intent Supports:
  • Immediate swaps
  • Prediction markets (Polymarket)
  • Perpetual futures (HyperLiquid)
  • Spot orders (HyperLiquid)
  • Conditional orders

AIUSD Tools

genalpha_aiusd_get_portfolio - Get account balance genalpha_aiusd_get_transactions - Get transaction history

Solchef Tools

genalpha_solchef_get_tokens_market_cap - Get top tokens by market cap Parameters:
  • limit (number): Number of tokens to return

Full API Reference

Complete tool catalog with parameters

Best Practices

Enable debug logging to see tool calls:
RUST_LOG=debug cargo run
Always check isError field in responses and handle error cases.
Use MCP Inspector to test tool calls before integrating into your application.
Never commit Bearer tokens to version control. Use environment variables.