SSE Transport

Server-Sent Events (SSE) transport allows agentgateway to connect to remote MCP servers over HTTP with real-time streaming responses.

Overview

SSE transport is useful when:

  • MCP servers run as standalone HTTP services
  • You need real-time streaming of responses
  • The server is accessible over the network

Configuration

# yaml-language-server: $schema=https://agentgateway.dev/schema/config
binds:
- port: 3000
  listeners:
  - routes:
    - policies:
        cors:
          allowOrigins:
            - "*"
          allowHeaders:
            - "*"
          exposeHeaders:
            - "Mcp-Session-Id"
      backends:
      - mcp:
          targets:
          - name: remote-mcp
            mcp:
              host: http://mcp-server:8080/sse

Why use agentgateway?

Direct SSE Connection With agentgateway
Client manages connection lifecycle Gateway handles reconnection and buffering
No authentication OAuth2, API keys, or custom auth
No access control Tool-level authorization
Single server per client Multiple servers aggregated
No metrics Full observability with OpenTelemetry

Learn more

Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

↑↓ navigate select esc dismiss

What could be improved?