fastmcp-stdio-proxy
Installation
SKILL.md
fastmcp-stdio-proxy
Purpose
Routing tools via FastMCP requires a persistent stdio connection. Running an MCP application in a detached Docker container causes an immediate exit because it hits an EOF on standard input. Furthermore, an MCP router container needs a way to invoke other MCP containers via stdio locally without exposing network layers.
Usage
1. Keeping FastMCP Alive in Docker Detached Mode
When using docker-compose up -d, add stdin_open and tty to the service definition. This tricks FastMCP's stdio listener into staying alive in the background:
services:
mcp-router:
build: .
stdin_open: true
tty: true