> ## Documentation Index
> Fetch the complete documentation index at: https://arcpay-somnia.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Call hosted MCP-style JSON-RPC method

> Supports initialize, tools/list, and tools/call over JSON-RPC. Only safe developer tools are exposed.



## OpenAPI

````yaml /apps/frontend/public/openapi.json post /api/mcp
openapi: 3.1.0
info:
  title: ArcPay Somnia Developer API
  version: 0.1.2
  summary: >-
    Public developer surface for ArcPay's Somnia x402, workspace evidence, and
    agent integration flows.
  description: >-
    ArcPay Somnia exposes a wallet-first app, a live x402 payment server, an MCP
    server for local agent hosts, and OpenAPI-compatible endpoint docs for
    developers building on Somnia Testnet.
servers:
  - url: https://x402.20.208.46.195.nip.io
    description: Live ArcPay Somnia x402 server
  - url: https://arcpay-somnia.vercel.app
    description: ArcPay Somnia frontend and workspace API
security: []
tags:
  - name: x402
    description: HTTP 402 payment-gated agent work on Somnia.
  - name: Workspace
    description: Workspace authentication and evidence mirror endpoints.
  - name: Beta
    description: Public beta access requests for Somnia builders and operators.
  - name: Discovery
    description: Machine-readable docs and integration discovery.
  - name: Developer Tools
    description: HTTP wrapper around safe ArcPay MCP-style tools.
  - name: MCP
    description: Hosted MCP-style JSON-RPC bridge for agent clients.
  - name: Developer Keys
    description: Workspace-scoped bearer keys for hosted MCP access.
  - name: Admin
    description: Operator-only beta queue management endpoints.
  - name: Status
    description: Runtime health checks for ArcPay Somnia production surfaces.
paths:
  /api/mcp:
    post:
      tags:
        - MCP
      summary: Call hosted MCP-style JSON-RPC method
      description: >-
        Supports initialize, tools/list, and tools/call over JSON-RPC. Only safe
        developer tools are exposed.
      operationId: callMcpBridge
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpJsonRpcRequest'
            examples:
              listTools:
                value:
                  jsonrpc: '2.0'
                  id: '1'
                  method: tools/list
                  params: {}
              callTool:
                value:
                  jsonrpc: '2.0'
                  id: '2'
                  method: tools/call
                  params:
                    name: derive_agent_id
                    arguments:
                      slug: research-agent
      responses:
        '200':
          description: JSON-RPC result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpJsonRpcResponse'
        '400':
          description: Invalid method, request, or tool input.
        '401':
          description: Bearer token required when ARCPAY_MCP_BEARER_TOKEN is configured.
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    McpJsonRpcRequest:
      type: object
      required:
        - jsonrpc
        - method
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        id:
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
        method:
          type: string
          enum:
            - initialize
            - tools/list
            - tools/call
        params:
          type: object
          additionalProperties: true
    McpJsonRpcResponse:
      type: object
      properties:
        jsonrpc:
          type: string
        id: {}
        result: {}
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string

````