Skip to main content
Agency Swarm supports serving your tools as production-ready MCP (Model Context Protocol) endpoints. This enables AI models to interact with your tools remotely over HTTP, making them accessible to any MCP-compatible client or AI system.

Setting Up MCP Server

To expose tools as a standalone MCP endpoint, use the run_mcp() function from the integrations module. This will create an MCP server that will serve provided tools over the streamable HTTP protocol.

Example: Serving Individual Tools

Configuration Options

The run_mcp() function accepts several configuration parameters:

Authentication

Authentication is controlled via environment variables:
If no APP_TOKEN is set, authentication will be disabled and the server will accept all requests.

MCP Client Usage

This example shows how to use a local MCP server with stdio transport:

See Also