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

# Call MCP

> Stateless MCP Streamable HTTP endpoint for Agent tools. The response is JSON.

Send `X-Api-Key`, or `Authorization: Bearer <API Key>`. A missing or invalid key does not return 401. The session falls back to anonymous and only exposes `aitoearn_connection_help`. The legacy path `POST /api/unified/mcp` is forwarded to this endpoint.



## OpenAPI

````yaml /openapi/en/aitoearn.openapi.json post /api/ai/agent/mcp
openapi: 3.0.1
info:
  title: AiToEarn Open Platform API
  description: >-
    AiToEarn Open Platform API. You can switch between the China and
    international sites for testing. Business success is determined by whether
    the response body has code === 0.
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: China site
  - url: https://aitoearn.ai
    description: International site
security: []
tags:
  - name: AI Services
  - name: AI Services/Video Generation
  - name: AI Services/Image Generation
  - name: Channel Management
  - name: Channel Management/Accounts
  - name: Channel Management/Publishing
  - name: Channel Management/Platforms
  - name: Channel Management/Works
  - name: Channel Management/Account Groups
  - name: Channel Management/Authorization
  - name: Asset Management
  - name: AI Services/Large Language Models
  - name: AI Services/Real-person Assets
  - name: AI Services/Agent
paths:
  /api/ai/agent/mcp:
    post:
      tags:
        - AI Services/Agent
      summary: Call MCP
      description: >-
        Stateless MCP Streamable HTTP endpoint for Agent tools. The response is
        JSON.


        Send `X-Api-Key`, or `Authorization: Bearer <API Key>`. A missing or
        invalid key does not return 401. The session falls back to anonymous and
        only exposes `aitoearn_connection_help`. The legacy path `POST
        /api/unified/mcp` is forwarded to this endpoint.
      operationId: AgentMcpController_handleStreamablePost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: MCP JSON-RPC request body.
              additionalProperties: true
            examples:
              default:
                summary: Request example
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: tools/list
      responses:
        '200':
          description: >-
            Native third-party protocol response or SSE data, not wrapped in the
            AiToEarn common response envelope.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                description: >-
                  Native third-party protocol response, not wrapped in the
                  AiToEarn common response envelope.
              examples:
                success:
                  summary: Native third-party success response
                  value:
                    id: AgentMcpController_handleStreamablePost_example
                    object: response
            text/event-stream:
              schema:
                type: string
                description: SSE streaming response.
      security:
        - apikey-header-X-Api-Key: []
components:
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Need to get API Key from AiToEarn. Click to go to ["API Key Obtaining
        Tutorial"](/en/use/api-key).

````