adhikasp/mcp-client-cli

A simple CLI to run LLM prompt and implement MCP client.

678 ★81 forksPythonUpdated 8mo ago

What you need to know

Simple CLI program (pip package mcp-client-cli) for running LLM prompts that implements an MCP client, letting you use any MCP-compatible server from the terminal with any LLM provider (OpenAI, Groq, or local llama.cpp).

Install

pip install mcp-client-cli
Create ~/.llm/config.json (or $PWD/.llm/config.json) with llm + mcpServers config

Usage

  • llm "What is the capital city of North Sumatra?" # or omit quotes / pipe input: echo ... | llm
  • llm p review / llm p commit / llm p yt url=... # prompt templates; llm --list-prompts
  • llm c ... # continue last conversation; llm cb # process clipboard text/image
  • llm --no-confirmations / llm --no-intermediates / llm --list-tools / llm --model gpt-4

Key features

  • Full MCP client: tool calls with per-tool requires_confirmation prompts, exclude_tools, enabled flags
  • Image input by piping files (cat image.jpg | llm "What do you see?") with multimodal LLMs
  • Clipboard support (cb) on Windows (PowerShell), macOS (pbpaste/pngpaste), Linux (xclip), and WSL
  • Prompt templates, continuation, no-tools mode, force-refresh, text-only output, --show-memories

Best for

Terminal users who want to run MCP servers without Claude Desktop and with a free choice of LLM provider (including local models).

Caveats

  • Config lives in ~/.llm/config.json; LLM API key can also come from LLM_API_KEY or OPENAI_API_KEY env vars
  • Clipboard support needs platform tools: xclip on Linux (sudo apt install xclip), optional pngpaste on macOS for images, powershell.exe accessible from WSL
  • A terminal/CLI client, not a GUI
Platforms: Windows · macOS · Linux · WSL

Reviewed 2026-08-07

Topics

langchainllmmcpmodel-context-protocol
View on GitHub ↗
Stars
678★
Forks
81
Language
Python
License
MIT
Created
2024-11-27
Last push
2025-12-02