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

# MCP server

> The seven tools over Streamable HTTP, with the customer bound by the subject_token.



## OpenAPI

````yaml openapi/en/cell.json POST /mcp
openapi: 3.1.0
info:
  title: Niadra data API
  version: '1'
  description: >-
    Writing, context, history, objects, identity, privacy and governance of one
    space. Every space has a stable address, with the space and the region in
    its name.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: The space, which comes in the source key.
      region:
        default: us-east-1
        description: The region of the space, which also comes in the key.
security: []
paths:
  /mcp:
    post:
      tags:
        - mcp
      summary: MCP server
      description: >-
        The remote MCP server of the space, over Streamable HTTP with JSON-RPC
        2.0. Authenticate with the source key and bind the customer with the
        `Niadra-Subject-Token` header, minted by `POST /v1/subject-tokens`. It
        serves seven tools (`get_customer_context`, `track_event`,
        `record_action`, `resolve_identity`, `search_customer_history`,
        `get_customer_timeline`, `open_history_item`), the `niadra://context`
        resource and prompts. Each tool needs its own scope, and no tool takes
        the customer as an argument.


        **Authentication.** Source key plus the `Niadra-Subject-Token` header.
        Each tool needs its own scope: `context`, `track`, `act`, `identify` or
        `search`.
      operationId: mcp_mcp_post
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: >-
            The JSON-RPC answer. A tool failure comes back as a result with
            `isError`, not as an HTTP error.
      security:
        - sourceKey: []
          subjectToken: []
components:
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    subjectToken:
      type: apiKey
      in: header
      name: Niadra-Subject-Token

````