Skip to content

Add a simple /health endpoint for ALB / K8 #138

@sredmond-arrow

Description

@sredmond-arrow

Describe the problem

When running the MCP server with the HTTP transport (e.g. --transport streamable-http), there is no simple health check endpoint.

A GET to /snowflake-mcp returns:

HTTP/1.1 406 Not Acceptable
content-type: application/json
{"error": {"code": -32600, "message": "Not Acceptable: Client must accept text/event-stream"}}

This makes it difficult to use standard health checks in AWS ALB, Kubernetes, or other orchestration systems that expect a plain 200 OK response.


Suggested solution

Add a lightweight /health (or /status) endpoint that returns a 200 OK JSON body, for example:

{
  "status": "ok"
}

Implementation example (inside the FastAPI app used by FastMCP):

@app.get("/health")
async def health():
    return {"status": "ok"}

This would allow standard HTTP-based health checks to succeed without requiring an event-stream connection.


Benefits

  • Works with AWS ALB, ECS, and Kubernetes health checks
  • Simple, low-maintenance addition
  • No effect on MCP protocol behavior
  • Makes the HTTP transport easier to operate in production environments

Environment

  • MCP version: (latest / main branch)
  • Transport: streamable-http
  • Command: curl 127.0.0.1:9000/snowflake-mcp
  • Observed result: 406 Not Acceptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions