Skip to main content
Glama
README.md
<div align="center">

# `cli2mcp`

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

![License](https://img.shields.io/badge/license-MIT-blue.svg) ![Language](https://img.shields.io/badge/language-python-green.svg) ![Status](https://img.shields.io/badge/status-active-success.svg) ![Python](https://img.shields.io/badge/python-3.9%2B-blue) ![MCP](https://img.shields.io/badge/MCP-compatible-orange) ![License](https://img.shields.io/badge/license-MIT-green)

<img src="demo.gif" alt="Demo" width="700" />

</div>

---

## 🎯 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.

## ✨ 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

```bash
# Install
pip install cli2mcp

# Run
cli2mcp --help
```

## 📦 Installation

### From Source

```bash
git clone https://github.com/YOUR_USERNAME/cli2mcp.git
cd cli2mcp
```

```bash
# 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](https://github.com/charmbracelet/vhs):

```bash
vhs < demo.tape
```

## 📖 Usage

```bash
# Show help
cli2mcp --help

# Common usage examples
cli2mcp --example
```

## 🏗️ Architecture

```mermaid
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](LICENSE) for details.

---

<div align="center">

**If this project helped you, please ⭐ star it!**

[Made with ❤️ and AI](https://github.com)

</div>

Maintenance

ActivityMaintained
ResponsivenessNo issues