API Reference

mcpgate exposes an MCP-compliant endpoint plus REST APIs for health, admin, and OAuth.

MCP Endpoint

POST /mcp

The primary integration point for AI clients. Implements the Model Context Protocol with HTTP transport and OAuth 2.0 authentication (RFC 6750).

Supports: tools/list, tools/call, resources/list, resources/read.

Authentication

All MCP requests require a Bearer token obtained via the OAuth 2.0 flow:

# 1. Discover OAuth endpoints
GET /.well-known/oauth-authorization-server

# 2. Authorize (browser redirect)
GET /auth/authorize?client_id=...&redirect_uri=...&response_type=code

# 3. Exchange code for token
POST /auth/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=...&redirect_uri=...

AI clients (Claude, ChatGPT, Codex, Gemini) handle this flow automatically when configured.

Tool schema

mcpgate uses a two-tool pattern per service: a read tool and a write tool.

Read tools

Safe, read-only operations. Annotated with readOnlyHint: true.

{
  "name": "jira_read_actions",
  "description": "Jira READ tool with strict action validation",
  "inputSchema": {
    "type": "object",
    "properties": {
      "action": {
        "type": "string",
        "enum": ["get_issue", "list_issues", "search_issues", "get_comments", ...]
      },
      "query": { "type": "string" },
      "issue_key": { "type": "string" }
    },
    "required": ["action"]
  }
}

Write tools

Mutating operations. Annotated with destructiveHint: true. Pre-hooks can require confirmation.

{
  "name": "jira_write_actions",
  "description": "Jira WRITE tool with strict action validation",
  "inputSchema": {
    "type": "object",
    "properties": {
      "action": {
        "type": "string",
        "enum": ["create_issue", "update_issue", "add_comment", "transition_issue", ...]
      },
      "project": { "type": "string" },
      "summary": { "type": "string" },
      "description": { "type": "string" }
    },
    "required": ["action"]
  }
}

Available services

Each configured service registers its read/write tools at startup. See Services for the full list.

ServiceRead toolWrite toolActions
Google Workspacegoogle_workspace_read_actionsgoogle_workspace_write_actions~90
Jirajira_read_actionsjira_write_actions22
GitLabgitlab_read_actionsgitlab_write_actions30+
Slackslack_read_actionsslack_write_actions15+
Notionnotion_read_actionsnotion_write_actions20+
Figmafigma_read_actionsfigma_write_actions10+
Grafanagrafana_read_actionsgrafana_write_actions10+
Home Assistanthome_assistant_read_actionshome_assistant_write_actions10+
Joanjoan_read_actionsjoan_write_actions10+
Amplitudeamplitude_mcp_read_actionsamplitude_mcp_write_actions10+
Metabasemetabase_read_actionsmetabase_write_actions10+
Sentrysentry_read_actionssentry_write_actions8+
WordPresswordpress_read_actionswordpress_write_actions10+

REST endpoints

EndpointMethodAuthPurpose
/healthGETNoneHealth check with version and component status
/mcpPOSTBearerMCP protocol endpoint
/connectionsGETSessionOAuth dashboard for service connections
/admin/reloadPOSTAdminHot-reload hooks and configuration
/.well-known/oauth-authorization-serverGETNoneOAuth 2.0 discovery (RFC 8414)

Health check

GET /health

{
  "status": "healthy",
  "version": "2.0.265",
  "timestamp": "2026-04-02T10:30:00.000Z",
  "components": {
    "redis": { "status": "up", "latency_ms": 0.5 }
  }
}

Tool discovery

AI clients discover available tools automatically via the MCP tools/list method. Only services with configured credentials appear. The tool list updates dynamically when services are connected or disconnected.