OpenCode

Configure OpenCode, the open source AI coding assistant, to use agentgateway as an MCP server.

Configuration

Add agentgateway to your OpenCode configuration file ~/.opencode/config.json:

{
  "mcp": {
    "servers": {
      "agentgateway": {
        "type": "sse",
        "url": "http://localhost:15000/mcp/sse"
      }
    }
  }
}

Project-Level Configuration

For project-specific configuration, create .opencode/config.json in your project root:

{
  "mcp": {
    "servers": {
      "agentgateway": {
        "type": "sse",
        "url": "http://localhost:15000/mcp/sse"
      }
    }
  }
}

Using Streamable HTTP

For improved performance, use the streamable HTTP transport:

{
  "mcp": {
    "servers": {
      "agentgateway": {
        "type": "http",
        "url": "http://localhost:15000/mcp/http"
      }
    }
  }
}

Authentication

Include authentication if required:

{
  "mcp": {
    "servers": {
      "agentgateway": {
        "type": "sse",
        "url": "http://localhost:15000/mcp/sse",
        "headers": {
          "Authorization": "Bearer your-token-here"
        }
      }
    }
  }
}
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?