click-mcp
by crowecawcaw
Overview
A Python library that enables AI agents to interact with Click CLI applications by converting commands into Model Context Protocol (MCP) tools.
Installation
python <your_cli_app>.py mcpSecurity Notes
The server's core functionality involves taking parameters from an MCP client (e.g., an AI agent) and directly passing them as arguments to a Click CLI application for execution via `cli_group.main(args=args)`. This design inherently means that `click-mcp` acts as a conduit for executing commands on the host system. If the underlying Click application contains commands that can perform destructive actions, access sensitive resources, or execute arbitrary code (e.g., through `os.system`, `subprocess.run`, or `eval` if poorly implemented within the Click command's logic) based on user-supplied input, then an MCP client could potentially trigger these actions. The `click-mcp` library itself does not introduce direct `eval` or similar dangerous patterns, but it enables the execution of the decorated Click commands with parameters controlled by the client. Therefore, the overall security largely depends on the care with which the developer implements and exposes their Click commands.
Similar Servers
mcp-use
A comprehensive framework for building full-stack Model Context Protocol (MCP) applications, including AI agents, MCP servers with UI widgets, and integrated debugging tools in both Python and TypeScript.
mcp-interviewer
A Python CLI tool to evaluate Model Context Protocol (MCP) servers for agentic use-cases, by inspecting capabilities, running functional tests, and providing LLM-as-a-judge evaluations.
Polymcp
A comprehensive TypeScript framework for building and orchestrating Model Context Protocol (MCP) servers and AI agents, enabling LLMs to intelligently discover, select, and execute external tools.
zeromcp
A minimal, pure Python Model Context Protocol (MCP) server for exposing tools, resources, and prompts via HTTP/SSE and Stdio transports.