cli-mcp¶
cli-mcp projects a urfave/cli v3 command tree as a Model Context Protocol server.
Every leaf command becomes an MCP tool; the tool name is the underscore-joined command path (override with Options.NameJoiner). The input schema is derived from the command's flags and positional arguments. Built on the official modelcontextprotocol/go-sdk.
Two transports:
- stdio - default for editor/agent integrations (Claude Code, mcp-inspector, mcporter).
- Streamable HTTP - current MCP remote transport (2025-03-26 spec). Mount the SDK handler on any
net/httpserver.
The deprecated HTTP+SSE transport is reachable via the SDK but not surfaced here.
Where to go next¶
- Features - feature inventory.
- Examples - stdio demo and Streamable HTTP demo.
- Source on GitHub - issues, releases, code.
cli-mcp is part of the cli-* family: cli-guard, cli-web-docs, cli-web-ops.