mcp-cli

The mcp-cli is a command-line tool for inspecting and interacting with Model Context Protocol (MCP) servers, allowing users to list, call, and read various components from different sources.

284
17

mcp-cli

A CLI tool for inspecting and interacting with servers implementing the Model Context Protocol (MCP).

Usage

Run without config file

npx @wong2/mcp-cli

This uses the default configuration file, typically from Claude Desktop.

Run with a config file

npx @wong2/mcp-cli -c config.json

The config file should adhere to the format used by Claude Desktop.

Run servers from NPM

npx @wong2/mcp-cli npx <package-name> <args>

Run locally developed server

npx @wong2/mcp-cli node path/to/server/index.js args...

Connect to a running server over SSE

npx @wong2/mcp-cli --sse http://localhost:8000/sse

Requires an MCP server running over Server-Sent Events (SSE).

Features

  • Execute MCP servers from NPM packages or local files.
  • Enumerate available Tools, Resources, and Prompts exposed by the server.
  • Invoke Tools, retrieve Resources, and fetch Prompts.

Related

  • LiteMCP - A TypeScript library for easier MCP server creation.
  • mcpservers.org - A directory of publicly available MCP servers.

Repository

WO
wong2

wong2/mcp-cli

Created

December 5, 2024

Updated

March 28, 2025

Language

JavaScript

Category

Developer Tools