LABSCO SUMMARY
The CLI stays the source of truth.
Because the mapping is done by introspection at start-up, a new flag on your CLI is a new tool parameter with no second file to update — which is the failure mode of every hand-written wrapper. The preview command is the one to run first: it shows exactly what an agent will see, including how nested groups get their prefixes, before anything is exposed.
What it is
An adapter, not a server of its own. It introspects an installed Python CLI at runtime and maps each command to a tool: arguments become required properties, options become optional ones with defaults, choices become enums, and nested command groups become prefixed tool names.
What you get
click-to-mcp discoverscans your environment's console scripts and lists every Click or Typer CLI it findsclick-to-mcp list-tools <YOUR_CLI>previews the tools a CLI would expose without starting a server, with a JSON output mode for CIclick-to-mcp serve <YOUR_CLI>runs that CLI as an MCP server over stdioclick-to-mcp serve-http <YOUR_CLI>serves the same thing over HTTP and SSE, with a/healthendpoint for load balancersclick-to-mcp config <YOUR_CLI>prints ready-to-paste client configuration for Claude Desktop, Cursor, VS Code, Windsurf and Cline- A library API —
run(app, prefix=...)orserve_stdio(cli, ...)— for CLIs that are not installed as entry points click-to-mcp demoanddemo-httpstart a built-in example CLI so you can see the mapping before wiring your own
Requirements
Version 0.5.0, installed from the repository with pip; the project's own badge notes it is not on public PyPI, and Homebrew and Scoop taps are provided as alternatives. HTTP and SSE need the http extra. Nothing else — no key, no account, no rate limit.
Setup effort
One command — pip install git+https://github.com/Coding-Dev-Tools/click-to-mcp.git
USE CASES
01
Giving an agent access to a CLI you already maintain
Serve it as-is and skip the wrapper package, the JSON Schema and the transport plumbing.
02
Checking what an agent would actually see
Preview the generated tools and their parameters before exposing anything, and diff that output in CI.
03
Wiring the same CLI into several editors
Generate each client's configuration block rather than hand-writing the JSON for every one.
04
Exposing a CLI to a browser-based client
Run it over HTTP and SSE and point the client at the stream URL.
BEFORE YOU INSTALL
What to know first
Requires
click-to-mcp on PATH
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
TERMINAL
pip install git+https://github.com/Coding-Dev-Tools/click-to-mcp.gitMCP Clients
Claude Code, Cursor, Cline
JSON
{
"mcpServers": {
"<YOUR_CLI>": {
"command": "click-to-mcp",
"args": [
"serve",
"<YOUR_CLI>"
]
}
}
}<YOUR_CLI> is the command name of your own Click or Typer CLI (api-contract-guardian, json2sql and deploydiff in the project's examples are the author's own tools). click-to-mcp discover lists the CLIs installed in your environment, and click-to-mcp config <name> prints this block for one of them.