---
title: "Terminate MCP session"
method: DELETE
path: "/api/v1/mcp-server"
tags: ["MCP Server"]
---

# Terminate MCP session

`DELETE /api/v1/mcp-server`

## Request

- Base URL: `https://agent.getaxonflow.com`
- URL: `https://agent.getaxonflow.com/api/v1/mcp-server`
- Auth: none declared. Required headers: `Authorization`
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-agent-api/docs/api/v1/mcp-server/delete.ts> (a function with typed inputs; its response is checked against the schema)

Terminates the MCP session identified by the `Mcp-Session-Id` header.

## Headers

- `Authorization` string, required
- `Mcp-Session-Id` string

## Response `200`

Session terminated

## Other responses

- `401`: Missing or invalid authentication. Handler-written 401s use the `{success, error}` envelope; 401s written by the auth middleware use the `{"error": {"code", "message"}}` envelope (JSONError).
- `403`: A tier admission refusal of the caller (#4249 row 5682255301): no body; `X-Axonflow-Tier-Limit` (`service_principal` or `human_principal`) and `X-Axonflow-Upgrade-URL`.
- `429`: The pre-credential per-minute limit (#4261), or a tier admission refusal while the admission ledger cannot be reached (#4249 row 5682255301, with `X-Axonflow-Tier-Limit`). No body; `Retry-After`.

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-agent-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-agent-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-agent-api/revisions/34d30fcb7fa1?raw)
