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).
「その他」の他のコンテンツ
Codelf
unbugA search tool helps dev to solve the naming things problem.
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
コメント