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

# MCP JSON-RPC endpoint

> Send MCP (Model Context Protocol) JSON-RPC 2.0 requests to the specified server. Use for methods like tools/list and tools/call. Pass the server ID you got when registering the MCP server.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/mcp/{serverId}
openapi: 3.0.0
info:
  title: Flowra API (API Key Endpoints)
  description: >-
    **Flowra** is an AI-powered platform for building agents, workflows, and
    integrations.


    ### Capabilities

    - **Tools & Toolkits** – Define and group tools for agents and workflows.

    - **Workflows** – Orchestrate steps and automate processes.

    - **Triggers** – Schedule or event-based execution.

    - **Auth & Connections** – OAuth, API keys, and connected accounts.

    - **MCP** – Model Context Protocol server integration.

    - **Knowledge / RAG** – Add files and URLs for retrieval-augmented
    generation.


    ### Authentication

    Use the **x-api-key** header with a project API key to access endpoints that
    support API Key auth. Create and manage API keys in the dashboard under your
    project settings.


    Only endpoints that support API Key authentication via the @ApiKeyEnabled()
    decorator.


    Send x-api-key (required). On multi-tenant endpoints, optionally send
    x-username to act as an external user.


    Only endpoints that support API Key authentication via the @ApiKeyEnabled()
    decorator.


    Send x-api-key (required). On multi-tenant endpoints, optionally send
    x-username (defaults to the project’s default external user).
  version: '1.0'
  contact:
    name: Flowra
    url: https://flowra.dev
servers:
  - url: https://flowra.dev
    description: Flowra API
security: []
tags:
  - name: Users
    description: User profile
  - name: External Users
    description: End-user identities inside a project (x-username)
  - name: Auth Configs
    description: OAuth and API key configs for toolkits
  - name: Connected Accounts
    description: OAuth connected accounts and link creation
  - name: Toolkits
    description: List and search toolkits
  - name: Tools
    description: List, execute, and manage tools
  - name: Skills
    description: Browse, create, import, and install skills
  - name: Workflow & Agent
    description: Create, run, and inspect workflows and agents
  - name: Triggers
    description: Schedule and event-based trigger instances
  - name: Chat
    description: Threads and streaming agent runs
  - name: File
    description: Upload, list, and download files
  - name: Knowledge
    description: RAG knowledge collections
  - name: Table
    description: Collections and documents
  - name: Sandbox
    description: Ephemeral and durable code sandboxes
  - name: Browser
    description: Live browser sessions and view
  - name: LLM
    description: List AI models and generate completions
  - name: MCP
    description: MCP server management
paths:
  /api/v1/mcp/{serverId}:
    post:
      tags:
        - MCP
      summary: MCP JSON-RPC endpoint
      description: >-
        Send MCP (Model Context Protocol) JSON-RPC 2.0 requests to the specified
        server. Use for methods like tools/list and tools/call. Pass the server
        ID you got when registering the MCP server.
      operationId: McpController_handlePost
      parameters:
        - name: serverId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpRequestDto'
      responses:
        '200':
          description: Operation completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpJsonRpcResponseDto'
        '201':
          description: ''
      security:
        - x-api-key: []
components:
  schemas:
    McpRequestDto:
      $ref: '#/components/schemas/McpRequestDto'
      type: object
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: JSON-RPC version
        method:
          type: string
          description: 'MCP method: tools/list, tools/call, etc.'
          default: tools/list
          example: tools/list
        params:
          type: object
          description: >-
            Method params (e.g. cursor for tools/list; name + arguments for
            tools/call)
          example: {}
        id:
          type: object
          description: JSON-RPC request id (string or number)
          example: '1'
    McpJsonRpcResponseDto:
      $ref: '#/components/schemas/McpJsonRpcResponseDto'
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC version
          example: '2.0'
        id:
          type: object
          description: Request id (echoed from request)
        result:
          type: object
          description: >-
            Result (e.g. tools/list → { tools, nextCursor }; tools/call → {
            content, isError })
        error:
          description: Error object when request failed
          allOf:
            - $ref: '#/components/schemas/McpJsonRpcErrorDto'
      required:
        - jsonrpc
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Project API key. Create and manage keys in the dashboard under Project →
        API Keys. Send as header: x-api-key: <your-key>

````