Basic information

Runtime
python
Category
License
MIT
Transports
stdio
Author
crowecawcaw
Submitted by
Community
Quality
35
Stars
14

About click-mcp Server

Turn click CLIs into MCP servers with one line of code

click-mcp is a MCP server in the Other category listed in the AddMCP.net directory, published by crowecawcaw. Supported transport: stdio. Runtime: python. License: MIT. The repository has 14 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "click-mcp": {
            "command": "python",
            "args": [
                "my_app.py",
                "mcp"
            ]
        }
    }
}

click-mcp config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "click-mcp": {
            "command": "python",
            "args": [
                "my_app.py",
                "mcp"
            ]
        }
    }
}

click-mcp tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

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_mcp decorator 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

Frequently asked questions

1 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.

2 What are the dependencies or runtime requirements?

click-mcp requires Python and the Click library. The README assumes a standard Python environment.

3 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").

4 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.

5 How are nested commands named when exposed as MCP tools?

Nested commands use dot notation (e.g., users.create).

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬