---
updatedAt: 2026-09-22T13:46:36.000Z
agentTools:
  projectIndex: https://docs.hosttools.com/llms.txt
---

# End MCP Session

Returns `204`. Sessions do not outlive the request that created them, so there is nothing to tear down. It answers anyway so a client's teardown step succeeds rather than 404ing.


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.30.0",
    "title": "Host Tools API Reference",
    "description": "Host Tools API. Supports two authentication methods:\n- **Legacy auth token**: Pass the `authToken` header with your user token\n- **OAuth 2.0 Bearer token**: Pass `Authorization: Bearer <token>` header (see OAuth endpoints below)\n\nOAuth 2.0 is recommended for new integrations. It supports granular scopes and automatic token refresh.\n",
    "contact": {
      "name": "Tom Krones",
      "email": "support@hosttools.com",
      "url": "https://hosttools.com"
    }
  },
  "servers": [
    {
      "url": "https://app.hosttools.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth2 Access Token",
        "description": "OAuth 2.0 access token obtained via the authorization code flow"
      },
      "authToken": {
        "type": "apiKey",
        "in": "header",
        "name": "authToken",
        "description": "Legacy user authentication token (UUID)"
      }
    },
    "schemas": {
      "TokenError": {
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error code per RFC 6749 (invalid_request, invalid_client, invalid_grant, unsupported_grant_type, access_denied)",
            "example": "invalid_grant"
          },
          "error_description": {
            "type": "string",
            "description": "Human-readable error description",
            "example": "Invalid or expired authorization code"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "authToken": []
    }
  ],
  "paths": {
    "/mcp": {
      "delete": {
        "summary": "End MCP Session",
        "description": "Returns `204`. Sessions do not outlive the request that created them, so there is nothing to tear down. It answers anyway so a client's teardown step succeeds rather than 404ing.\n",
        "tags": [
          "MCP"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Nothing to terminate"
          },
          "401": {
            "description": "Missing, invalid, or expired Bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenError"
                }
              }
            }
          }
        }
      }
    }
  }
}
```