For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
MCP servers
Connect to an MCP server and try tools in the agentgateway playground.
Verified Code examples on this page have been automatically tested and verified.Use the agentgateway binary to proxy requests to an open source MCP test server, server-everything. Then, try a tool in the built-in agentgateway playground.
Before you begin
Install the agentgateway binary.
curl -sL https://agentgateway.dev/install | bash
Steps
Step 1: Start the MCP test server
Run the open source server-everything MCP test server with the streamable HTTP transport.
PORT=3005 npx -y @modelcontextprotocol/server-everything streamableHttpStep 2: Start agentgateway
You add the MCP server from the UI in the next steps, so you can start agentgateway without a config file. When you run agentgateway without specifying a config, it bootstraps a basic config at ~/.config/agentgateway/config.yaml and uses it automatically.
agentgatewayExample output:
info app serving UI at http://localhost:4000/uiStep 3: Enable MCP
The first time that you run the UI, the Welcome to Agentgateway wizard walks you through enabling LLM configuration. If you already did this, you can skip to the next step.
Open the agentgateway UI.
From the welcome wizard, click Enable MCP and then click Continue.


The Gateway Overview home page opens, with the MCP row enabled.
Step 4: Add the MCP server
- In the MCP section of the navigation menu, click Servers, and then click Add server.
- For the Server name, enter
server-everything. - Keep the Streamable HTTP transport. For the URL, enter
http://localhost:3005/mcp. - Click Save server.


Step 5: Try a tool in the playground
In the MCP section, click Tool Playground.
If you see a Browser access is not allowed notice, click Apply CORS so the playground can call the MCP listener from the UI.
Click Initialize to open an MCP session. The playground lists the tools that the server exposes, such as
echoand variousgetcommands.

From the Tool dropdown list, select the
echotool.In the Message field, enter a string, such as
This is my first agentgateway setup, and click Call tool.Verify that the Result card shows an
HTTP 200response with your message echoed back.

Next steps
Check out more guides for using MCP servers with agentgateway.