API Reference

Programmatic access to the MCPHub marketplace

GET/api/discover

Discover MCP servers programmatically. AI agents can call this endpoint at runtime to find tools without human configuration.

Parameters

ParamTypeDefaultDescription
categorystringDATA | PRODUCTIVITY | CODE | FINANCE | COMMUNICATION
budgetnumber0.1Max price per call in USD
limitnumber3Number of results (max 10)

Example

GET /api/discover?category=CODE&budget=0.01&limit=5

Response

{
  "servers": [
    {
      "name": "GitHub MCP",
      "slug": "github-mcp",
      "description": "Full GitHub API access via MCP",
      "category": "CODE",
      "pricingModel": "PER_CALL",
      "pricePerCall": 0.002,
      "verifiedTier": "VERIFIED",
      "totalCalls": 125000,
      "tools": [
        { "name": "create_issue", "description": "Create a GitHub issue" },
        { "name": "list_repos", "description": "List repositories" }
      ]
    }
  ],
  "trial_note": "Subscribe at mcphub.io to get an API key"
}
GET/api/stats

Public marketplace statistics.

{ "serverCount": 47, "userCount": 1250, "callCount": 892000 }
POST/api/gateway/{apiKey}/mcp

Gateway proxy endpoint. Send MCP protocol requests through your subscription API key.

POST /api/gateway/{YOUR_API_KEY}/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "echo",
    "arguments": { "message": "Hello from MCPHub!" }
  }
}