MCP Connector

Integrate Python CLIs with MCP

An MCP server that exposes any Python CLI app (Click, Typer, Argparse) as callable tools.

Works with githubclicktyperargparse

86
Spark score
out of 100
Updated 23 days ago
Version 0.4.0
Models

Add to Favorites

Why it matters

Connect any Python command-line application to the MCP, supporting popular frameworks like Click, Typer, and Argparse. This asset provides an extensible server architecture for seamless integration.

Outcomes

What it gets done

01

Integrate Click-based CLIs

02

Integrate Typer-based CLIs

03

Provide experimental Argparse support

04

Extend MCP compatibility with Python applications

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-python-cli-mcp | bash

Overview

Python CLI MCP Server

PyCLI MCP is an MCP server that exposes any Click, Typer, or (experimentally) Argparse Python CLI application as callable MCP tools. Use it when you have an existing Click/Typer/Argparse CLI and want to make it callable from an MCP client without a custom bridge; not for CLIs in other languages or heavily interactive terminal UX.

What it does

PyCLI MCP is an extensible MCP (Model Context Protocol) server that makes any Python command line application usable by an MCP client. It supports Click and Typer natively, with experimental support for Argparse, letting a CLI built on one of these frameworks be exposed to an AI assistant without writing a separate MCP integration by hand.

The project is distributed as a PyPI package (pycli-mcp), built with Hatch, linted with Ruff, and licensed under MIT.

When to use - and when NOT to

Use it when you already have a Python CLI tool built with Click, Typer, or (experimentally) Argparse and want to make its commands callable from an MCP-compatible AI assistant without hand-rolling a bridge.

Do not use it for CLI tools written in other languages, or if your CLI relies on interactive prompts or terminal-only UX that doesn't translate cleanly to a tool-call interface. Argparse support is explicitly experimental, so validate behavior carefully before relying on it in production.

Inputs and outputs

Input: an existing Python CLI application built on Click, Typer, or Argparse.

Output: an MCP server that exposes that CLI's commands as callable MCP tools, installed via:

pip install pycli-mcp

Who it's for

Python developers and tool builders who maintain a Click/Typer/Argparse CLI and want to make it accessible to MCP clients with minimal integration work.

Source README

PyCLI MCP

CI/CD CI - Test CD - Build
Docs Docs
Package PyPI - Version PyPI - Python Version
Meta Hatch project linting - Ruff License - MIT GitHub Sponsors

This provides an extensible MCP server that is compatible with any Python command line application.

Supported frameworks:

Installation

pip install pycli-mcp

Documentation

The documentation is made with Material for MkDocs and is hosted by GitHub Pages.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.