mcp-cli

mcp-cli

By wong2 GitHub

A CLI inspector for the Model Context Protocol

Overview

what is mcp-cli?

mcp-cli is a command-line interface (CLI) inspector designed for the Model Context Protocol (MCP), providing users with tools to interact with and manage MCP servers.

how to use mcp-cli?

To use mcp-cli, you can run it with or without a configuration file.

  • To run without a config file, use: npx @wong2/mcp-cli (this will use the default config).
  • To specify a config file, use: npx @wong2/mcp-cli -c config.json.
  • You can also run MCP servers from NPM or locally developed servers with the provided commands in the documentation.

key features of mcp-cli?

  • Ability to run MCP servers from multiple sources.
  • Lists available Tools, Resources, and Prompts.
  • Facilitates calling Tools, reading Resources, and accessing Prompts.

use cases of mcp-cli?

  1. Inspecting and managing various MCP servers in a development environment.
  2. Testing and launching tools and resources integrated with the Model Context Protocol.
  3. Assisting developers in working with the Claude Desktop system and its configurations.

FAQ from mcp-cli?

  • Does mcp-cli work with any MCP server?

Yes, as long as the server adheres to the Model Context Protocol.

  • Is there a default configuration for mcp-cli?

Yes, it can run with a default config file used by Claude Desktop if none is specified.

  • Can I develop my own servers with mcp-cli?

Yes, you can run locally developed servers by providing the path to the server script.

Content

mcp-cli

A CLI inspector for the Model Context Protocol

https://github.com/user-attachments/assets/4cd113e9-f097-4c9d-b391-045c5f213183

Usage

Run without config file

npx @wong2/mcp-cli

This will use the config file of Claude Desktop.

Run with a config file

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

The config file has the same format as the Claude Desktop config file.

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

You need to first start an MCP server running over SSE transport.

Features

  • Run MCP servers from various sources
  • List Tools, Resources, Prompts
  • Call Tools, Read Resources, Read Prompts
  • LiteMCP - A TypeScript library that simplifies MCP server development
  • mcpservers.org - A curated list of MCP servers
No tools information available.
No content found.