click-mcp
@crowecawcaw
关于 click-mcp
Turn click CLIs into MCP servers with one line of code
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"click-mcp": {
"command": "python",
"args": [
"my_app.py",
"mcp"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is click-mcp?
click-mcp is a Python library that extends Click applications with Model Context Protocol (MCP) support, allowing AI agents to discover and interact with CLI tools programmatically. It provides a simple decorator that converts Click commands into MCP tools.
How to use click-mcp?
Install via pip (pip install click-mcp), then decorate your Click group with @click_mcp(). Run the MCP server using python my_app.py mcp (or a custom command name if configured). The decorator automatically converts Click commands into MCP tools with named parameters and dot‑notation for nested groups.
Key features of click-mcp
- Simple
@click_mcpdecorator syntax - Automatic conversion of Click commands to MCP tools
- Support for nested command groups
- Support for positional arguments
- Stdio‑based MCP server for easy integration
Use cases of click-mcp
- Turn any existing Click CLI into an MCP‑compatible tool
- Allow AI agents to invoke CLI commands with structured parameters
- Expose complex nested command hierarchies as discoverable MCP tools
FAQ from click-mcp
What is the Model Context Protocol (MCP)?
MCP is an open standard for AI agents to interact with tools and applications in a structured way.
What are the dependencies or runtime requirements?
click-mcp requires Python and the Click library. The README assumes a standard Python environment.
How can I customize the MCP command name?
Use the command_name parameter in the @click_mcp decorator, e.g. @click_mcp(command_name="start-mcp").
How are command errors handled?
When a Click command raises an exception, click-mcp captures the error and returns it as part of the MCP response, enabling AI agents to handle errors gracefully.
How are nested commands named when exposed as MCP tools?
Nested commands use dot notation (e.g., users.create).
其他 分类下的更多 MCP 服务器
ICSS
chokcoco不止于 CSS
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web

EverArt
modelcontextprotocolModel Context Protocol Servers
评论