diff --git a/skills/mcp/native-mcp/SKILL.md b/skills/mcp/native-mcp/SKILL.md index 9b315ee..e56bf3f 100644 --- a/skills/mcp/native-mcp/SKILL.md +++ b/skills/mcp/native-mcp/SKILL.md @@ -242,59 +242,6 @@ pip install --upgrade mcp The client retries up to 5 times with exponential backoff (1s, 2s, 4s, 8s, 16s, capped at 60s). If the server is fundamentally unreachable, it gives up after 5 attempts. Check the server process and network connectivity. -### feishu-mcp causes EPIPE / "write EPIPE" errors in stdio mode - -Many community MCP servers (e.g. `cso1z/Feishu-MCP`) emit console.log/warn output to stdout *before* the JSON-RPC handshake begins. This corrupts the stdio stream, causing `httpx.ReadError` on the Hermes side and EPIPE errors in the Node process. - -**Symptoms:** -- `Error: write EPIPE` in the MCP server process -- `httpx.ReadError` or `Session termination failed: All connection attempts failed` in Hermes logs -- Tools register briefly then immediately fail on first use - -**Solution — use HTTP transport instead of stdio:** - -1. Run feishu-mcp as a persistent HTTP server behind a systemd service: - -```bash -# Install globally -npm install -g feishu-mcp - -# Create systemd user service at ~/.config/systemd/user/feishu-mcp.service -[Unit] -Description=Feishu MCP Server -After=network.target - -[Service] -Type=simple -Restart=always -RestartSec=5 -ExecStart=/root/.hermes/node/bin/node /root/.hermes/node/lib/node_modules/feishu-mcp/dist/index.js --log-level=none --feishu-app-id=YOUR_APP_ID --feishu-app-secret=YOUR_APP_SECRET --feishu-auth-type=tenant --enabled-modules=document,task -StandardOutput=null -StandardError=journal - -[Install] -WantedBy=default.target -``` - -2. Reload and start the service: -```bash -systemctl --user daemon-reload -systemctl --user enable --now feishu-mcp -``` - -3. Configure Hermes to connect via HTTP instead of stdio: -```yaml -mcp_servers: - feishu: - url: http://127.0.0.1:3333/mcp - timeout: 120 - connect_timeout: 60 -``` - -4. Restart Hermes gateway: `hermes gateway restart` - -5. Verify: `hermes mcp test feishu` — should show "✓ Connected" with tools listed. - ## Examples ### Time Server (uvx)