MCP HubMCP Hub
wong2

mcp-cli

by: wong2

A CLI inspector for the Model Context Protocol

239created 05/12/2024
Visit
CLI
inspector

📌Overview

Purpose: The main goal of the mcp-cli is to serve as a command-line interface inspector for the Model Context Protocol, allowing users to interact with various MCP servers efficiently.

Overview: mcp-cli provides a streamlined interface for running and managing MCP servers, enabling users to execute commands, run servers from different sources, and interact with tools and resources in the Model Context Protocol ecosystem.

Key Features:

  • Run MCP Servers: Users can run MCP servers from various sources, including NPM packages or local files, enhancing flexibility in server management.

  • List and Interact with Tools: The CLI allows users to list and utilize Tools, Resources, and Prompts, facilitating a comprehensive interaction with the MCP environment.


mcp-cli

A CLI inspector for the Model Context Protocol

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 Streamable HTTP

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

Connect to a running server over SSE

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

Features

  • Run MCP servers from various sources
  • List Tools, Resources, Prompts
  • Call Tools, Read Resources, Read Prompts

Related

  • mcpservers.org - A curated list of MCP servers
  • LiteMCP - A TypeScript library that simplifies MCP server development