· par Michael Kerkhoff

Creating Custom Wrappers, CLIs & MCP Servers — The Future of Software Development

Build custom CLI wrapper tools and MCP servers in 2026: the wrapper pattern, modern CLI frameworks, MCP integration and packaging tools as AI agent skills.

Top Picks

(01)

Go + Cobra

A proven standard for production CLI tools. Compiles to a single static binary — no runtime, no dependencies, instant startup. Cobra provides subcommands, flags, shell completions, and automatic help generation out of the box. kubectl, gh (GitHub CLI), the docker CLI and many other DevOps tools are built with Cobra. Perfect for wrappers that need to be fast, distributable, and cross-platform. Example wrapper skeleton: ```go package main import ( "fmt" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "bird", Short: "X/Twitter CLI wrapper", } var tweetCmd = &cobra.Command{ Use: "tweet [text]", Short: "Post a tweet", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { // Call X API, post tweet fmt.Printf("Posted: %s\n", args[0]) }, } func main() { rootCmd.AddCommand(tweetCmd) rootCmd.Execute() } ``` Go wrappers compile in seconds, run instantly, and ship as a single file. The learning curve is real, but the payoff for production CLI tools is high.

Production CLI tools, DevOps, system utilities, API wrappersFree / Open Source (Apache 2.0)
(02)

Rust + Clap

High performance and memory safety. Rust CLIs avoid garbage-collection pauses, memory-safe by design, and compile to tiny binaries. Clap's derive macros generate argument parsing from struct definitions — almost zero boilerplate. ripgrep, fd, bat, exa, and most "modern Unix tools" are Rust+Clap. Choose Rust when you need sub-millisecond latency or are building tools that process large datasets. Example: ```rust use clap::{Parser, Subcommand}; #[derive(Parser)] #[command(name = "himalaya")] #[command(about = "Email CLI wrapper for IMAP/SMTP")] struct Cli { #[command(subcommand)] command: Commands, } #[derive(Subcommand)] enum Commands { /// List emails in folder List { #[arg(short, long, default_value = "INBOX")] folder: String, }, /// Send email Send { #[arg(short, long)] to: String, #[arg(short, long)] subject: String, }, } ``` Steeper learning curve than Go, but Rust CLIs are typically among the fastest and smallest in the ecosystem.

High-performance CLI tools, data processing, system utilitiesFree / Open Source (MIT/Apache)
(03)

TypeScript + Commander/Oclif

Fastest path from idea to working CLI if you're already in a TypeScript codebase. Commander is minimal (subcommands + options); Oclif (Salesforce) is batteries-included (plugins, hooks, update mechanisms). Node.js startup is slower than Go/Rust (~100-300ms), but for API wrappers where network latency dominates, it's irrelevant. Many MCP-adjacent tools and API wrappers are built in TypeScript. Excellent for rapid prototyping and teams that don't want to learn Go. Commander example: ```typescript import { Command } from 'commander'; const program = new Command(); program .name('gog') .description('Google Workspace CLI wrapper') .version('1.0.0'); program .command('calendar') .description('List calendar events') .option('-d, --days <number>', 'days ahead', '7') .action(async (opts) => { const events = await fetchGoogleCalendar(opts.days); console.table(events); }); program.parse(); ``` Ship same-day, iterate fast, compile to single executable with `bun build --compile` (Bun) or `deno compile` (Deno) for zero-dependency distribution. Node.js 25 also supports native TypeScript execution without transpilation.

Rapid CLI development, API wrappers, MCP toolingFree / Open Source (MIT)AI-Native
(04)

Python + Typer/Click

The data science and ML community's go-to for CLI tools. Typer (by FastAPI creator) wraps Click with type annotations, generating help text and validation automatically. Python startup is slow (~200-500ms), but if your wrapper calls ML models, Pandas, or NumPy, you're already in Python anyway. Excellent for internal tools, data pipelines, and wrappers that need Python libraries. Typer example: ```python import typer app = typer.Typer() @app.command() def transcribe( audio_file: str, model: str = "whisper-large-v3", language: str = "en" ): """Transcribe audio using Whisper API.""" result = call_whisper_api(audio_file, model, language) typer.echo(result.text) @app.command() def summarize(url: str, max_length: int = 500): """Summarize content from URL.""" text = fetch_and_extract(url) summary = call_llm_summarize(text, max_length) typer.echo(summary) if __name__ == "__main__": app() ``` Best choice when Python ecosystem access outweighs startup time concerns.

Data pipelines, ML tools, internal utilities, rapid prototypingFree / Open Source (MIT)AI-Native
(05)

MCP TypeScript SDK

The official SDK for building MCP servers — the bridge between your CLI tools and AI agents. Any CLI can become an MCP server by wrapping its commands as MCP tools. Supports stdio (local) and Streamable HTTP (remote, the recommended transport in the current spec, replacing the older HTTP+SSE transport). MCP now includes OAuth 2.1 with PKCE for authenticated remote servers. Zod schemas auto-generate JSON Schema for AI tool calling. The TypeScript SDK is one of the most widely used implementations; clients such as Claude Desktop, Cursor and Windsurf speak the protocol natively. Minimal MCP server wrapping a CLI (safely, without a shell): ```typescript import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; import { execFile } from "node:child_process"; import { promisify } from "node:util"; const execFileAsync = promisify(execFile); const server = new McpServer({ name: "bird-mcp", version: "1.0.0" }); server.tool( "post_tweet", { text: z.string().max(280) }, async ({ text }) => { // Arguments as an array, no shell: the input cannot inject commands. // "--" ends option parsing, so text starting with "-" is not read as a flag. const { stdout } = await execFileAsync("bird", ["tweet", "--", text]); return { content: [{ type: "text", text: stdout }] }; } ); await server.connect(new StdioServerTransport()); ``` This pattern — CLI → MCP wrapper → AI agent — is a strong model for software composition.

MCP server development, AI tool exposure, TypeScript ecosystemFree / Open Source (MIT)AI-Native
(06)

FastMCP (Python)

The "FastAPI of MCP" — build Python MCP servers with very little code. Automatic schema generation from type annotations, async-first, and zero boilerplate. Perfect for wrapping Python CLIs or exposing Python functions directly to AI agents. If your wrapper is Python-based (Typer/Click), FastMCP is the fastest path to MCP. Example: ```python from fastmcp import FastMCP mcp = FastMCP("whisper-mcp") @mcp.tool() async def transcribe_audio(file_path: str, language: str = "en") -> str: """Transcribe audio file using Whisper.""" result = await run_whisper(file_path, language) return result.text @mcp.tool() async def list_voices() -> list[dict]: """List available TTS voices.""" return await fetch_voices() ``` Deploy with `uvicorn` for HTTP or run directly for stdio. Considerably less boilerplate than the low-level SDK.

Rapid Python MCP servers, minimal boilerplate, type-driven schemasFree / Open SourceAI-Native
(07)

Vercel MCP Adapter

Serverless MCP deployment without infrastructure. The mcp-handler package (formerly @vercel/mcp-adapter) wraps your MCP server in a Next.js route handler that speaks Streamable HTTP and runs as a serverless function with automatic HTTPS. Teams use it to run MCP servers with many tools without managing their own infrastructure. Deploy pattern: ```typescript // app/api/[transport]/route.ts import { createMcpHandler } from "mcp-handler"; import { z } from "zod"; const handler = createMcpHandler( (server) => { server.tool("echo", "Echo a message", { message: z.string() }, async ({ message }) => ({ content: [{ type: "text", text: message }], })); }, {}, { basePath: "/api" } ); export { handler as GET, handler as POST, handler as DELETE }; ``` Deploy with `vercel deploy`; the server is then reachable at `/api/mcp`.

Serverless MCP, zero-ops deployment, Next.js integrationFree tier available; paid plans – see vendor pricingAI-Native
(08)

any-cli-mcp-server

Turn ANY existing CLI into an MCP server with zero code changes. Wraps the CLI's --help output to auto-generate MCP tool schemas, then proxies tool calls to the underlying CLI. Instant MCP exposure for git, gh, aws, az, kubectl, or any CLI that follows standard conventions. Usage: ```json { "mcpServers": { "github-cli": { "command": "npx", "args": ["-y", "any-cli-mcp-server", "gh"] }, "git": { "command": "npx", "args": ["-y", "any-cli-mcp-server", "git"] } } } ``` Zero-effort MCP. Limited customization but unbeatable for wrapping existing tools quickly.

Zero-code MCP wrapping, legacy CLI exposure, rapid integrationFree / Open SourceAI-Native

Comparison Table

NameLanguage / EcosystemCompilation Target (binary vs interpreted)Startup TimeMCP Integration PathLearning Curve
(01) Go + CobraProduction CLI tools, DevOps, system utilities, API wrappersGo 1.24+, Cobra, Viper (config), single-binary distributionSteve Francia (creator) + massive communityFree / Open Source (Apache 2.0)– Non
(02) Rust + ClapHigh-performance CLI tools, data processing, system utilitiesRust 1.85+, Clap 4.x, tokio (async), static binariesKevin K. (creator) + Rust communityFree / Open Source (MIT/Apache)– Non
(03) TypeScript + Commander/OclifRapid CLI development, API wrappers, MCP toolingTypeScript, Node.js 25 / Bun 1.2+ / Deno 2.x, Commander.js or OclifTJ Holowaychuk (Commander) + Salesforce (Oclif)Free / Open Source (MIT)✓ Oui
(04) Python + Typer/ClickData pipelines, ML tools, internal utilities, rapid prototypingPython 3.10+, Typer or Click, Rich (output formatting)Sebastián Ramírez (Typer) + Armin Ronacher (Click)Free / Open Source (MIT)✓ Oui
(05) MCP TypeScript SDKMCP server development, AI tool exposure, TypeScript ecosystemTypeScript, Node.js 22+, Zod, JSON-RPC 2.0, Streamable HTTP transport, OAuth 2.1Anthropic + Linux FoundationFree / Open Source (MIT)✓ Oui
(06) FastMCP (Python)Rapid Python MCP servers, minimal boilerplate, type-driven schemasPython 3.10+, FastMCP, Pydantic v2, asynciojlowin + communityFree / Open Source✓ Oui
(07) Vercel MCP AdapterServerless MCP, zero-ops deployment, Next.js integrationNext.js, Vercel Functions, mcp-handler, MCP TypeScript SDK, OAuth 2.1VercelFree tier available; paid plans – see vendor pricing✓ Oui
(08) any-cli-mcp-serverZero-code MCP wrapping, legacy CLI exposure, rapid integrationNode.js, npx, CLI help parsingeirikb + communityFree / Open Source✓ Oui

← Scroll horizontally to see all columns

How to Choose

  1. (01)

    Start with your team's existing language expertise. Go if you want bulletproof production CLIs, TypeScript if you're already in Node.js, Python if you need ML/data libraries. Don't learn Rust just for a wrapper — the productivity loss rarely pays off unless you need sub-millisecond performance.

  2. (02)

    For production distribution, Go and Rust compile to single binaries with zero dependencies. TypeScript can compile via Bun or pkg but adds complexity. Python requires runtime or bundling with PyInstaller. If "just download and run" matters, Go wins.

  3. (03)

    Every CLI wrapper you build should have a clear MCP exposure path. Design commands to be stateless with JSON output options (`--json` flag) — this makes MCP wrapping trivial. The pattern: CLI → MCP server → AI agent capability.

  4. (04)

    Use the wrapper pattern (facade pattern) to simplify complex APIs. A good wrapper does less than the underlying service but does it perfectly. bird wraps X API's 50+ endpoints into 10 commands developers actually use. Curation > completeness.

  5. (05)

    Build MCP servers early, not as an afterthought. The TypeScript SDK or FastMCP adds some initial development time but makes your tool AI-agent-ready from day one. In 2026, "AI-compatible" is increasingly a requirement, not a feature.

  6. (06)

    Test your MCP servers with the MCP Inspector (`npx @modelcontextprotocol/inspector`) before connecting to Claude/Cursor. Testing tools directly is much faster than round-tripping through an AI. Set up CI that validates all tools with sample inputs.

  7. (07)

    Package mature CLI+MCP combinations as Agent Skills (OpenClaw skill system or equivalent). Skills bundle the CLI, MCP config, and a SKILL.md that tells the AI how to use them. Skills are the unit of AI capability reuse.

Frequently Asked Questions

(01)What is the wrapper pattern in software development?
The wrapper pattern (also called Facade or Adapter pattern) creates a simplified interface around a complex system. In CLI development, a wrapper is a focused command-line tool that exposes a subset of an API or service's functionality with a clean, composable interface. For example: `bird` wraps the X/Twitter API (50+ endpoints) into 10 commands (`tweet`, `timeline`, `dm`, etc.); `gog` wraps Google Workspace APIs (Gmail, Calendar, Drive) into a single CLI; `himalaya` wraps IMAP/SMTP protocols into simple `list`, `read`, `send` commands. Wrappers beat SDKs because they're scriptable (pipe to other commands), composable (combine with Unix tools), and AI-agent-compatible (easy to expose via MCP). The Unix philosophy "do one thing well" is the wrapper philosophy.
(02)What is an MCP server and why does it matter in 2026?
An MCP (Model Context Protocol) server is a program that exposes typed tools for AI models to discover and call at runtime. It's "USB for AI" — a universal interface that lets any AI agent (Claude, Cursor, Windsurf, custom agents) connect to any tool without custom integration code. MCP servers describe their tools via JSON Schema, so AI models can construct valid calls automatically. In 2026, MCP is a core building block of AI agent infrastructure, with thousands of servers listed on registries such as Smithery, mcp.so and LobeHub. Key 2026 developments: Streamable HTTP is now the recommended remote transport (replacing the older HTTP+SSE transport), OAuth 2.1 with PKCE enables authenticated remote servers, and monetization models are emerging for premium MCP tools. The spec is governed by the Linux Foundation and supported by major AI providers. For CLI developers, MCP turns any human-facing CLI into an AI-agent capability with minimal code.
(03)How do I build a CLI tool in 2026?
Choose a framework based on your language and use case: Go + Cobra for production-grade, single-binary CLIs; Rust + Clap for maximum performance; TypeScript + Commander for rapid development; Python + Typer for data/ML workflows. All four patterns support subcommands, flags, help generation, and shell completions. Design for MCP from day one: add a `--json` output mode so your CLI can be wrapped as an MCP tool trivially. Structure commands as stateless operations (input → output, no side effects where possible). Test with both human invocation (`./mycli command --flag`) and programmatic invocation (`execFile("mycli", ["command", "--flag", value])` from an MCP server; pass arguments as an array and never interpolate user input into a shell string). Deploy the CLI to brew/apt/npm for humans, and deploy an MCP server wrapper for AI agents.
(04)Why are CLI tools making a comeback in 2026?
Three forces are driving the CLI renaissance: (1) AI agents prefer CLIs — AI models can invoke command-line tools directly via shell or MCP, but navigating GUIs requires complex automation. CLIs are the natural interface for AI-driven workflows. (2) DevEx improvements — modern CLIs have TUI interfaces (charm.sh/bubbletea), rich output formatting (Rich, lipgloss), autocomplete, and fuzzy finders. They're no longer hostile to humans. (3) Composability beats integration — piping `curl | jq | xargs | mycli` accomplishes in one line what often takes dozens of lines of SDK code. As systems grow more complex, composable tools beat monolithic apps. The terminal is the original "orchestration layer," and AI makes it considerably more powerful.
(05)What is the difference between a CLI wrapper and an SDK?
An SDK is a library you import into your codebase; a CLI wrapper is a standalone executable you invoke from any context. Key differences: (1) Scriptability — CLIs compose with shell pipes, cron, scripts, and AI agents; SDKs require writing code. (2) Language independence — a Go CLI can be called from Python, Node, Rust, or a bash script; an SDK locks you to its language. (3) Deployment — CLIs are self-contained binaries or scripts; SDKs add dependencies to your project. (4) AI compatibility — AI agents can invoke CLIs directly or via MCP; using an SDK requires the agent to generate and execute code. Choose SDKs for tight integration in a single codebase; choose CLI wrappers for cross-system orchestration, automation, and AI agent capabilities.
(06)How do I turn my CLI into an MCP server?
Three approaches, from zero-code to full-custom: (1) any-cli-mcp-server — `npx any-cli-mcp-server mycli` auto-generates MCP tools from your CLI's --help output. Zero code, limited customization. (2) Thin MCP wrapper — use the TypeScript SDK or FastMCP to create a server that shells out to your CLI. Each MCP tool calls `execFile("mycli", ["subcommand", "--flag", value])` (arguments as an array, no shell, so tool input cannot inject commands) and parses the output. Typically well under 100 lines of code. (3) Native MCP integration — if your CLI is TypeScript or Python, import its core functions directly into an MCP server instead of shelling out. Best performance, full control. The thin wrapper pattern is the sweet spot: your CLI remains the source of truth, and the MCP server is just a translation layer. Keep them in sync by testing both interfaces in CI.
(07)What is the future of developer tools in 2026 and beyond?
Developer tooling is converging on four trends: (1) AI-native from day one — more and more new tools ship with MCP support; registries such as Smithery and mcp.so already list thousands of MCP servers. (2) Composable over monolithic — instead of "apps," developers build pipelines from small, focused tools connected via MCP. The Unix philosophy wins, enabled by AI orchestration. (3) Streamable HTTP + OAuth 2.1 — MCP is maturing from local stdio connections to authenticated, cloud-deployed services. Remote MCP servers with OAuth 2.1 enable SaaS-like tool distribution. (4) MCP monetization — premium MCP tools are becoming a business model, with companies like AWS, GitHub, and Stripe publishing official MCP servers. The logical endpoint: developers describe what they want in natural language, and AI assembles the toolchain from composable primitives. The developers who win are those building the primitives, not the monoliths.

Prêt pour votre projet IA ?

Réservez une consultation gratuite de 30 minutes pour discuter de vos besoins.