Submit

click-mcp

@crowecawcaw

a year ago
developer-tools
Turn click CLIs into MCP servers with one line of code
Overview

what is click-mcp?

click-mcp is a Python library that allows developers to turn Click command-line interfaces (CLIs) into Model Context Protocol (MCP) servers with minimal effort, enabling AI agents to interact with CLI tools programmatically.

how to use click-mcp?

To use click-mcp, install it via pip and decorate your Click commands with the @click_mcp decorator. This will automatically convert your commands into MCP tools that can be invoked by AI agents.

key features of click-mcp?

  • Simple decorator syntax for easy integration
  • Automatic conversion of Click commands to MCP tools
  • Support for nested command groups
  • Stdio-based MCP server for seamless operation

use cases of click-mcp?

  1. Enabling AI agents to interact with CLI applications for automation tasks.
  2. Creating user-friendly interfaces for complex command-line tools.
  3. Facilitating programmatic access to CLI commands for testing and development.

FAQ from click-mcp?

  • What is the Model Context Protocol (MCP)?

MCP is an open standard that allows AI agents to interact with tools and applications in a structured manner.

  • How do I start the MCP server?

You can start the MCP server by running your application with the command python my_app.py mcp.

  • Can I customize the MCP command name?

Yes! You can customize the command name using the command_name parameter in the @click_mcp decorator.

© 2025 MCP.so. All rights reserved.

Build with ShipAny.