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

# MCP JSON-RPC

Invokes MCP tools such as `listResources`, `ask`, `addResource`, and `sync`.

The hosted endpoint supports request/response MCP tool calls over `POST /api/mcp`.
Long-lived SSE notification streams are disabled on the cloud deployment.


## OpenAPI

````yaml /api-reference/openapi.cloud.json POST /api/mcp
openapi: 3.1.0
info:
  title: btca Cloud API
  version: 2.0.0
  description: HTTP API used by hosted MCP tools.
servers:
  - url: https://btca.dev
security:
  - bearerAuth: []
paths:
  /api/mcp:
    post:
      summary: MCP JSON-RPC endpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest'
      responses:
        '200':
          description: Tool call response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpToolCallResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
components:
  schemas:
    JsonRpcRequest:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
      properties:
        jsonrpc:
          const: '2.0'
        id:
          oneOf:
            - type: integer
            - type: string
        method:
          type: string
        params:
          $ref: '#/components/schemas/McpToolCallParams'
    McpToolCallResponse:
      type: object
      required:
        - result
      properties:
        result:
          $ref: '#/components/schemas/McpToolCallResult'
    CloudError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
    McpToolCallParams:
      type: object
      required:
        - name
        - arguments
      properties:
        name:
          type: string
        arguments:
          type: object
          additionalProperties: true
        project:
          type: string
    McpToolCallResult:
      type: object
      required:
        - content
        - isError
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/McpContentItem'
        isError:
          type: boolean
    McpContentItem:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
        text:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````