API Reference

Complete reference for the MCP Gateway Pro API endpoints.

Base URL

https://api.appxen.ai

Authentication

All requests require an API key passed in the Authorization header:

Authorization: Bearer axgw_live_k1_your_key_here

Create API keys in the AppXen Console under MCP Gateway - Keys.

MCP Endpoint

POST /mcp

The main MCP protocol endpoint. Send JSON-RPC 2.0 requests to interact with your connected servers.

Request Format

{
  "jsonrpc": "2.0",
  "method": "method_name",
  "params": { /* optional parameters */ },
  "id": 1
}

Response Format

// Success
{
  "jsonrpc": "2.0",
  "result": { /* response data */ },
  "id": 1
}

// Error
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32600,
    "message": "Error description"
  },
  "id": 1
}

Streamable HTTP Transport

The gateway implements MCP Streamable HTTP (spec 2025-03-26). Clients that support this transport (like OpenAI Codex) can connect directly. Clients that use stdio (like Claude Desktop) connect via the mcp-remote bridge.

Session Management

The initialize response includes an Mcp-Session-Id header. Clients should include this header in subsequent requests for session correlation. Sessions expire after 30 minutes of inactivity.

# Response header from initialize
Mcp-Session-Id: aBcDeFgHiJkLmNoPqRsTuVwXyZ012345678

# Include in subsequent requests
Mcp-Session-Id: aBcDeFgHiJkLmNoPqRsTuVwXyZ012345678

Backward compatible: Requests without the Mcp-Session-Id header still work. Clients that don't send session headers (like mcp-remote) are unaffected.

Notifications

JSON-RPC notifications (messages without an id field) return 202 Accepted with an empty body.

Batch Requests

Send a JSON array of messages to process multiple requests in a single HTTP call. The response is an array of results (notifications are excluded from the response).

Methods

tools/list

List all available tools from connected servers

Request

{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "id": 1
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "tools": [
      {
        "name": "github__get_me",
        "description": "Get the authenticated user",
        "inputSchema": {
          "type": "object",
          "properties": {}
        }
      },
      {
        "name": "github__list_repos",
        "description": "List repositories",
        "inputSchema": {
          "type": "object",
          "properties": {
            "visibility": {
              "type": "string",
              "enum": ["all", "public", "private"]
            }
          }
        }
      }
    ]
  },
  "id": 1
}

tools/call

Call a tool on a connected server

Request

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "github__get_me",
    "arguments": {}
  },
  "id": 2
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"login\":\"octocat\",\"id\":1,\"name\":\"The Octocat\"}"
      }
    ]
  },
  "id": 2
}

resources/list

List available resources from connected servers

Request

{
  "jsonrpc": "2.0",
  "method": "resources/list",
  "id": 3
}

prompts/list

List available prompts from connected servers

Request

{
  "jsonrpc": "2.0",
  "method": "prompts/list",
  "id": 4
}

Error Codes

Code Description
-32700 Parse error - Invalid JSON
-32600 Invalid request - Missing required fields
-32601 Method not found
-32602 Invalid params
-32603 Internal error
-32000 Server error - Upstream MCP server error

Rate Limits

API requests are rate-limited per API key. Current limits:

  • 1,000 requests per minute per API key
  • 100 concurrent connections per API key

Rate limit headers are included in responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1704067260