← Back to directory
M

MCP CLI

Community
Not a standard server
A lightweight CLI to interact with MCP servers.

This is not a typical connect-and-use MCP server; read the source repository before using it.

Category
Dev Tools #60 of 438
Stars
★ 1.3k Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Bun 1.0.0+ · Prebuilt binary
Credentials
No credential needed
License
MIT
Last commit
⚠
Tools
3
64FMRS · C

mcp-cli is a feature-rich CLI tool, especially suited for AI agents and terminal users, providing script-friendly access to MCP servers.

Strongest · Documentation 15/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
12/20
Maintenance
14/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 10/20
Static review based on README only; no actual source files provided. README describes a feature-rich CLI and claims unit/integration tests, but no evidence is verifiable. Uncertainty lowers score, hence 10.
Security and permissions 12/20
README mentions env var substitution, tool filtering, and clear error messages, but lacks confirmation prompts for dangerous operations, data flow disclosure, and security-specific tests. No red-line risks apparent, but least privilege and confirmation are incomplete, hence 12.
Maintenance 14/20
Repo has MIT license, many stars, and signs of ongoing updates, but no concrete evidence of release frequency, issue response, or dependency update policy. No security response channel evident, hence 14.
Documentation 15/20
README is thorough, covering install, config, usage, errors, and dev guide, but lacks troubleshooting and limitation disclosure. High quality but not perfect, hence 15.
Setup experience 13/20
Install steps are clear (curl or bun), but requires Bun runtime and lacks specific client config examples. Static evidence insufficient to exceed 15 cap, hence 13.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesUses the network

Best for

  • AI coding agents that need lightweight MCP server integration.
  • Developers who prefer terminal-based interactions.
  • Users needing efficient, scriptable access to MCP tools.

Not for

  • Users requiring a graphical interface.
  • Scenarios not involving the MCP protocol.
  • Applications needing persistent connections or heavy session management (CLI is designed for one-off requests).

Required permissions

  • Read and write MCP server configuration as specified in config file.
  • Spawn subprocesses via stdio (e.g., npx).
  • Establish network connections to remote MCP servers if configured.
  • Create temporary Unix sockets for connection pooling (daemon mode enabled by default).

Risks and side effects

  • Sensitive information (e.g., API keys) in config may be stored in plaintext.
  • MCP servers launched may execute arbitrary commands, especially from untrusted sources.
  • Connection keep-alive may hold resources if not idle-timeout.
  • Supply chain risks when using npm/npx packages as server commands.

Setup

Before you start

Runtime:Bun 1.0.0+ · Prebuilt binary

Other optional settings (9)
MCP_CONFIG_PATH optional Path to the config file, overriding the built-in search order for mcp_servers.
MCP_DEBUG optional Set to 1 to enable debug output (including daemon debug)
MCP_TIMEOUT optional Request timeout in seconds, default 1800
MCP_CONCURRENCY optional Number of servers processed in parallel, default 5
MCP_MAX_RETRIES optional Retry attempts for transient errors, default 3; 0 disables
MCP_RETRY_DELAY optional Base retry delay in milliseconds, default 1000
MCP_STRICT_ENV optional Default true; errors on missing ${VAR} in config, set to false to use empty values
MCP_NO_DAEMON optional Set to 1 to disable connection caching and force fresh connections
MCP_DAEMON_TIMEOUT optional Idle timeout in seconds for cached connections, default 60
  1. Install via curl -fsSL https://raw.githubusercontent.com/philschmid/mcp-cli/main/install.sh | bash or bun install -g https://github.com/philschmid/mcp-cli.
  2. Create config file mcp_servers.json (see above).
  3. Use mcp-cli commands.
claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ]
    },
    "deepwiki": {
      "url": "https://mcp.deepwiki.com/mcp"
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "."
      ]
    },
    "deepwiki": {
      "url": "https://mcp.deepwiki.com/mcp"
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
claude mcp add --transport http deepwiki https://mcp.deepwiki.com/mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After installing, run `mcp-cli` (or `mcp-cli -d`); the output should list the configured servers (e.g. filesystem, deepwiki) and their tools, confirming the connection works.

Troubleshooting

  1. Check config file path (`mcp_servers.json` or `~/.config/mcp/`).
  2. Set `MCP_DEBUG=1` for debug output.
  3. Set `MCP_NO_DAEMON=1` to disable connection caching to resolve issues.
  4. Ensure server command is available (e.g., npx installed).
  5. Verify environment variable substitution (`${VAR}`) meets `MCP_STRICT_ENV`.
  6. Refer to error messages for recovery suggestions.

Things to try

Once connected, you can ask your AI assistant things like:

  • List all configured MCP servers and their tools
  • Show the input schema for the read_file tool on the filesystem server
  • Use mcp-cli to call filesystem read_file on README.md
  • Grep for all tools matching a glob pattern containing file

Tools 3

info read-only
Show server information, tools, and schemas.
grep read-only
Search tools by glob pattern.
call
Call a tool on a server, with inline JSON or from stdin.

Use cases

Quickly list and call MCP tools from the command line.
Provide command-line access to MCP servers for AI coding agents (e.g., Gemini CLI, Claude Code).
Chain MCP tools with shell utilities like jq in scripts.

Supported clients

Claude DesktopPartial support
Gemini CLIPartial support
OpenCodePartial support
Claude CodePartial support

Listed from the project's documentation, not tested by this site.

Overview

mcp-cli is a lightweight, Bun-based CLI for interacting with Model Context Protocol (MCP) servers. It supports servers over stdio and HTTP transports, offering tool discovery, schema viewing, invocation, and is optimized for AI coding agents.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision d77672a1ce80 Data synced 2026-10-12 Read the FMRS scoring method