Skip to content

[BUG] observability-agent logs "Unexpected content type" errors when polling kagent-tools MCP server #1200

@dirien

Description

@dirien

Description

The observability-agent continuously logs mcp.client.streamable_http - ERROR - Unexpected content type: every 30 seconds when trying to communicate with the kagent-tools MCP server. The actual tool calls work fine, but these errors spam the logs and make it harder to spot real issues.

Environment

  • Kagent version: 0.7.8 (helm chart)
  • Kubernetes: DigitalOcean managed K8s
  • observability-agent connecting to kagent-tools.kagent:8084/mcp

Steps to Reproduce

  1. Deploy kagent with observability-agent enabled
  2. Check the observability-agent pod logs: kubectl logs -n kagent -l app.kubernetes.io/name=observability-agent

Observed Behavior

2026-01-11 20:52:10,395 - httpx - INFO - HTTP Request: POST http://kagent-tools.kagent:8084/mcp "HTTP/1.1 200 OK"
2026-01-11 20:52:10,396 - mcp.client.streamable_http - ERROR - Unexpected content type: 
2026-01-11 20:52:40,408 - httpx - INFO - HTTP Request: POST http://kagent-tools.kagent:8084/mcp "HTTP/1.1 200 OK"
2026-01-11 20:52:40,408 - mcp.client.streamable_http - ERROR - Unexpected content type: 

This repeats every 30 seconds. The HTTP request returns 200 OK, but the Content-Type header seems to be empty or unexpected.

Expected Behavior

Either:

  • The health check responses should include the correct Content-Type header
  • Or these polling errors shouldn't be logged at ERROR level if they don't affect functionality

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions