> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# stdio

stdio MCP servers are not intended to be run remotely, but [`fly mcp`](/flyctl/cmd/fly_mcp) provides the ability to proxy and wrap them.

The data flow is that the proxy is a stdio MCP that forwards requests to a wrapper MCP (basically a slimmed down and streamlined Streamable HTTP server), which in turn forwards requests to a stdio MCP running on a remote server:

<img src="https://mintcdn.com/fly-io/izaS1l2UMuz6sm1H/images/mcp-proxy-wrap-flog.png?fit=max&auto=format&n=izaS1l2UMuz6sm1H&q=85&s=90eef2fd90b2b21bb7a1277fcd7d2d6a" alt="MCP Proxy/Wrapper data flow" width="1530" height="188" data-path="images/mcp-proxy-wrap-flog.png" />

Start by cloning the MCP servers git repository and making a copy of the `Dockerfile`:

```sh theme={null}
git clone https://github.com/modelcontextprotocol/servers.git
cd servers
cp src/everything/Dockerfile .
```

Make the following changes to the `Dockerfile`:

```diff theme={null}
 RUN npm ci --ignore-scripts --omit-dev
+
+COPY --from=flyio/flyctl /flyctl /usr/bin
+ENTRYPOINT [ "/usr/bin/flyctl", "mcp", "wrap", "--" ]
+EXPOSE 8080

 CMD ["node", "dist/index.js"]
```

Now run:

```sh theme={null}
fly launch --ha=false
```

Access the MCP server via the MCP inspector:

```sh theme={null}
fly mcp proxy -i
```

An example `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "filesystem": {
      "command": "/Users/rubys/.fly/bin/flyctl",
      "args": [
         "mcp",
         "proxy",
         "--url=https://mcp.fly.dev/"
       ]
    }
  }
}
```

Adjust the `flyctl` path and the value of the `--url` to match your needs.
