---
title: "MCP JSON-RPC 2.0 endpoint"
method: POST
path: "/api/mcp"
tags: ["mcp"]
---

# MCP JSON-RPC 2.0 endpoint

`POST /api/mcp`

## Request

- Base URL: `https://claw-link.dev`
- URL: `https://claw-link.dev/api/mcp`
- Auth: one of:
  - API key in header `x-clawlink-api-key`
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://clerk.claw-link.dev/oauth/authorize`, token URL `https://clerk.claw-link.dev/oauth/token`, scopes: `openid`)

Model Context Protocol over plain JSON-RPC 2.0 request/response (no SSE stream). Supports initialize, tools/list, and tools/call. The server exposes 10 tools namespaced clawlink.* covering discovery (clawlink.search, clawlink.list_actions, clawlink.get_action), connections (clawlink.list_integrations, clawlink.get_connection, clawlink.connect_app), and execution (clawlink.execute, clawlink.get_execution). Write tools need "confirm": true in clawlink.execute arguments.

## Request body

- object
  - `jsonrpc` '2.0', required
  - `id` union
    - integer
    - string
  - `method` string, required
  - `params` object

## Response `200`

JSON-RPC 2.0 response (errors are carried in the JSON-RPC "error" member)

- object
  - `jsonrpc` '2.0', required
  - `id` union
    - integer
    - string
  - `result` object
  - `error` object
    - `code` integer
    - `message` string
    - `data` unknown

## Other responses

- `401`: Missing or invalid API key

---

[API](https://skmtc.dev/claw-link/apis/clawlink-agent-api.md) · [All operations](https://skmtc.dev/claw-link/apis/clawlink-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/claw-link/apis/clawlink-agent-api/revisions/6ce0c62d160a?raw)
