---
title: "Create an MCP endpoint"
method: POST
path: "/api/mcp_endpoints"
tags: ["MCP endpoints"]
---

# Create an MCP endpoint

`POST /api/mcp_endpoints`

## Request

- Base URL: `https://app.herondata.io`
- URL: `https://app.herondata.io/api/mcp_endpoints`
- Auth: API key in header `x-api-key`

Creates an endpoint for this environment. Its id becomes part of the MCP server URL. With require_request_secret, the response carries a secret, shown once, that every MCP request to the endpoint must send in the X-Auth-Token header.

## Request body

- CreateMcpEndpointSchema
  - `label` string, required: Human-readable label for this endpoint
  - `require_request_secret` boolean: Issue a secret that every MCP request to this endpoint must carry in its X-Auth-Token header. It is returned once, in this response.

## Response `201`

Endpoint created

- McpEndpointCreatedSchema
  - `created` string, date-time
  - `heron_id` string
  - `label` string: Human-readable label for this endpoint
  - `request_secret` string: Present only when requested. Shown once; Heron stores only its digest.
  - `request_secret_required` boolean: Whether MCP requests must carry the endpoint's request secret

## Other responses

- `403`: Only the organization's admins and Heron admins can manage MCP endpoints
- `422`: Invalid label

## Changes

- **2026-11-03** `bd8008e49534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/herondata/apis/heron-data-api/changes/api/mcp_endpoints/post.md)

---

[API](https://skmtc.dev/herondata/apis/heron-data-api.md) - [All operations](https://skmtc.dev/herondata/apis/heron-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/herondata/apis/heron-data-api/revisions/1ec936e17fef?raw)
