Setting Up MCP Server
To expose tools as a standalone MCP endpoint, use therun_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
Therun_mcp() function accepts several configuration parameters:
Authentication
Authentication is controlled via environment variables:APP_TOKEN is set, authentication will be disabled and the server will accept all requests.
MCP Client Usage
- Local MCP Server
- Hosted MCP Server
This example shows how to use a local MCP server with stdio transport: