Labsco
MCP SERVER

Click to MCP

by Coding-Dev-Tools

Point it at a Click or Typer CLI and every command becomes an MCP tool — no schema to write.

MCP Plumbing: Proxies, Registries & Inspectors
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 discover` scans your environment's console scripts and lists every Click or Typer CLI it finds
  • `click-to-mcp list-tools <name>` previews the tools a CLI would expose without starting a server, with a JSON output mode for CI
  • `click-to-mcp serve <name>` runs that CLI as an MCP server over stdio
  • `click-to-mcp serve-http <name>` serves the same thing over HTTP and SSE, with a `/health` endpoint for load balancers
  • `click-to-mcp config <name>` prints ready-to-paste client configuration for Claude Desktop, Cursor, VS Code, Windsurf and Cline
  • A library API — `run(app, prefix=...)` or `serve_stdio(cli, ...)` — for CLIs that are not installed as entry points
  • `click-to-mcp demo` and `demo-http` start 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