Agents

MCP Gateway

View as MarkdownOpen in Claude

The MCP Gateway module provides an HTTP/HTTPS server that bridges Model Context Protocol (MCP) servers with SignalWire SWAIG functions. It manages sessions, handles authentication, and translates between the MCP JSON-RPC protocol and SignalWire’s tool-calling interface.

Use the MCP Gateway when you want to expose tools from one or more MCP servers as SWAIG functions that a SignalWire AI agent can call during a conversation.

1from signalwire.mcp_gateway import MCPGateway
2
3gateway = MCPGateway("config.json")
4gateway.run()

For agent-side MCP integration, see AgentBase.add_mcp_server(). For the CLI entry point, see the mcp-gateway CLI command.

Learn More