Labsco
MCP SERVER

MCP CLI

by chrishayuk

Talk to your MCP servers from a terminal — a chat mode with streaming and visible reasoning, a shell for direct server operations, and a Unix-friendly command mode for scripts.

MCP Plumbing: Proxies, Registries & Inspectors
Summary
A terminal front end for MCP that works with a local model and no API key.

It defaults to Ollama, so the whole loop — chat, tool calls, sessions — runs on your machine; the cloud providers are there when you want them, not required to get started.

What it is

A command-line host for MCP servers. It reads a server configuration file, connects to the servers listed there, and gives a model access to their tools across four modes: chat, interactive shell, scriptable command mode, and one-off direct commands.

What you get
  • A chat interface with streaming responses, visible reasoning for models that expose it, concurrent tool execution that still preserves conversation order, and Ctrl+C interruption mid-stream
  • Provider coverage through CHUK-LLM: Ollama locally by default, plus OpenAI, Anthropic, Azure OpenAI, Google Gemini, Groq, Perplexity, IBM watsonx and Mistral
  • Production-grade tool execution — timeouts, retries with exponential backoff, caching, circuit breakers and rate limiting, with a choice of in-process, isolated subprocess, or remote execution
  • MCP Apps: servers that serve interactive HTML applications get them rendered in your browser
  • Multi-modal attachments — images, text files and audio via `/attach`, `--attach`, `@file:` references or browser upload
  • Session persistence with auto-save, plus conversation export to Markdown or JSON including token usage
  • Token usage tracking per turn and cumulative through `/usage`, and a real-time browser dashboard
Requirements

Python 3.11 or higher and a server configuration file, `server_config.json` by default. The default path is local: install Ollama and pull the default reasoning model with `ollama pull gpt-oss`, then run `uvx mcp-cli --help`. Cloud providers are optional and read their own environment variables — `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `AZURE_OPENAI_API_KEY` with `AZURE_OPENAI_ENDPOINT`, `GEMINI_API_KEY` or `GROQ_API_KEY`. Interactive browser UIs need the extra install, `pip install -e ".[apps]"`.

Setup effort

One command — uvx mcp-cli --help