Back to Home
crowecawcaw icon

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

Run Command
python <your_cli_app>.py mcp

Security 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

Stats

Interest Score36
Security Score4
Cost ClassLow
Avg Tokens100
Stars7
Forks1
Last Update2026-01-12

Tags

PythonClickMCPAI AgentsCLI Tools