Skip to main content
Glama

cli2mcp

Turn any command-line tool into an MCP server in one line.

License Language Status Python MCP License


🎯 Why?

MCP is becoming the default way for agents to call tools, but most useful internal tools are still plain CLIs. Building a full MCP server for each command requires SDK boilerplate, packaging, and maintenance. cli2mcp fills this gap with a zero-dependency adapter that turns a command template into a callable MCP tool instantly.

Target audience: Agent developers, platform engineers, and AI tinkerers who want to expose CLI utilities, scripts, and internal tools to Claude, Cursor, or custom MCP clients without writing server code.

Related MCP server: cli2mcp

✨ Features

  • Wrap any command with {placeholders} as an MCP tool

  • Auto-generate JSON Schema from placeholders

  • Works over stdio with initialize, tools/list, and tools/call

  • Timeouts, stderr capture, and non-zero exit reporting

🚀 Quick Start

# Install
pip install cli2mcp

# Run
cli2mcp --help

📦 Installation

From Source

git clone https://github.com/YOUR_USERNAME/cli2mcp.git
cd cli2mcp
# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest -v

🎬 Demo

The GIF above was recorded using Charm VHS:

vhs < demo.tape

📖 Usage

# Show help
cli2mcp --help

# Common usage examples
cli2mcp --example

🏗️ Architecture

graph LR
    A[Input] --> B[Core Engine]
    B --> C[Output]
    B --> D[Plugins]
    D --> E[Extensions]

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repo

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

📄 License

MIT © 2026 — See LICENSE for details.


If this project helped you, please ⭐ star it!

Made with ❤️ and AI

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that publishes CLI tools on your machine for discoverability by LLMs
    8
    1
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Enables AI assistants to call any CLI tool by scanning its help output and serving it as an MCP server.
    GPL 3.0
  • A
    license
    -
    quality
    A
    maintenance
    Universal MCP server that wraps any CLI tool, enabling AI assistants to run commands via natural language.
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yulinlina/cli2mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server