Quick Start
1
One stdio server, two agents
npx process serves both agents.2
Mix stdio and HTTP servers
3
String shorthand for a local binary
How It Works
Every agent that lists the server name walks the same path and lands on the same client.Configuration
Each key undermcp_servers: is the server’s name (also its tool-name prefix), and the value is its spec.
Referencing a server from an agent
List the server name in an agent’stools: to attach the pooled client.
mcp_servers: fall through to the normal tool resolver, so built-in tools work alongside MCP servers.
Tool-name namespacing
Tools from a server namedgithub are exposed as github_<tool>, so two servers that each offer a search tool never shadow each other.
Hot Reload
The pool keys each client by name and spec, so a reload only reconnects what changed.Failure Modes
- Bad spec (no
commandand nourl) — logged, skipped, gateway continues. - Server fails to start — logged, skipped, gateway continues; the agent still registers without that server’s tools.
- stdio server dies mid-session — the core
praisonaiagents.MCPclient restarts it on the next call. - Gateway stops — every pooled client is shut down.
Security
MCP tools frommcp_servers: run through the agent’s normal tool path, so existing tool policy and approval checks still apply.
Configuration Options
praisonaiagents.MCP
Underlying MCP client and its keyword options
Gateway YAML Configuration
Full
gateway.yaml layoutBest Practices
Declare each server once
Declare each server once
Put every downstream server under
mcp_servers: and reference it by name — never repeat the spec per agent.Keep server names short and lowercase
Keep server names short and lowercase
The name becomes the tool prefix (
github_create_issue), so short names keep tool names readable.Keep secrets in environment variables
Keep secrets in environment variables
Use
${TOKEN} in env and headers instead of pasting credentials into the YAML.Watch the logs on boot
Watch the logs on boot
A failing server does not stop the gateway — look for
Failed to start MCP server warnings.Related
Gateway
Gateway setup and YAML configuration
MCP
Use MCP tools with agents
Gateway API Endpoints
The inverse — serve gateway agents as MCP tools
Runtime MCP
Attach and detach MCP servers at runtime

