Bridge a Model Context Protocol (MCP) Gateway service with SWAIG functions. The skill connects to the gateway at load time, enumerates the configured services and tools, and registers each as a SWAIG function on the agent.
The gateway URL is validated by an SSRF guard — private, loopback, and
cloud-metadata endpoints are rejected. Requests use retry semantics with
retry_attempts and a per-request timeout of request_timeout seconds.
Class: McpGatewaySkill
Tools: Dynamically registered from the gateway (prefixed by tool_prefix)
Required packages: undici
Env vars: MCP_GATEWAY_AUTH_TOKEN, MCP_GATEWAY_AUTH_USER,
MCP_GATEWAY_AUTH_PASSWORD
URL of the MCP Gateway service. Must pass the SSRF guard.
Bearer token for authentication. Falls back to the
MCP_GATEWAY_AUTH_TOKEN environment variable. Takes precedence over
basic auth when provided.
Basic-auth username (used when auth_token is not supplied). Falls back
to MCP_GATEWAY_AUTH_USER.
Basic-auth password. Falls back to MCP_GATEWAY_AUTH_PASSWORD.
Services to expose. Each entry has:
name (string) — service name registered on the gateway.tools ("*" or string[]) — which tools to expose from that service.Empty array exposes every available service/tool.
Gateway session timeout in seconds.
Prefix prepended to each SWAIG function name registered from the gateway
(e.g., mcp_todo_add_todo).
Number of retry attempts for failed requests.
Per-request timeout in seconds.
Whether to verify SSL certificates on outbound requests.