MCP CLI

v1.0.0Developer Toolsstable

A command-line tool for creating and running Model Context Protocol servers that expose resources, tools, and prompts to LLM clients.

mcp-climcpai-integration
Share:
1,148
Stars
0
Downloads
0
Weekly
0/5

What is MCP CLI?

MCP CLI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to command-line tool for creating and running model context protocol servers that expose resources, tools, and prompts to llm clients.

A command-line tool for creating and running Model Context Protocol servers that expose resources, tools, and prompts to LLM clients.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A command-line tool for creating and running Model Context P

Use Cases

Create and run MCP servers from the command line.
Expose resources, tools, and prompts to LLM clients.
james-gibson

Maintainer

LicenseAGPL 3.0
Languagetypescript
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-cli

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP CLI

MCP CLI is a command-line tool and Node.js library for scaffolding, building, and running Model Context Protocol servers that expose resources, tools, and prompts to LLM clients. It provides a create-server command that generates a fully-working MCP server project with example implementations of static and dynamic resources, calculator and text-processing tools, and prompt templates — giving developers a clean, tested starting point for building their own MCP integrations. It is especially useful for developers learning the MCP specification or prototyping new server capabilities before integrating them into a larger codebase.

Prerequisites

  • Node.js 16+ and npm installed
  • Git installed for cloning the repository
  • An MCP-capable client such as Claude Desktop or any MCP-compatible tool for testing the generated server
  • Basic familiarity with TypeScript and the MCP specification
1

Clone and install the MCP CLI repository

Clone the repository, install dependencies, build the TypeScript source, and link the package globally so the mcp-cli command is available on your PATH.

git clone https://github.com/james-gibson/mcp.git
cd mcp
npm install
npm run build
npm link
2

Scaffold a new MCP server

Use the create-server subcommand to generate a new server project. Provide a name and optional version. The generated project includes example resources, tools, and prompt implementations.

npx mcp-cli create-server my-mcp-server
# or globally after npm link:
mcp-cli create-server my-mcp-server --version 1.0.0
3

Explore the generated server

The scaffold creates a working server with: a static info resource, a dynamic echo resource, calculator tool (add/subtract/multiply/divide), text processing tools (uppercase, lowercase, reverse, character count), a greeting prompt, and a team greeting prompt with completable arguments.

cd my-mcp-server
npm install
npm run build
npm start
4

Add the generated server to your MCP client config

Register your newly built server with Claude Desktop or another MCP client. Point the command to the server's entry point.

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/my-mcp-server/dist/index.js"]
    }
  }
}
5

Customize and extend the server

Edit the generated TypeScript source to add your own resources, tools, and prompts. The MCP SDK handles protocol details; you only need to implement the handler functions for your capabilities.

MCP CLI Examples

Client configuration

Claude Desktop config entry for a server generated and built with MCP CLI.

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/my-mcp-server/dist/index.js"]
    }
  }
}

Prompts to try

Example prompts that exercise the built-in tools and resources in a server generated by MCP CLI.

- "What tools are available on the MCP server?"
- "Calculate 1234 multiplied by 567"
- "Convert this text to uppercase: hello world from mcp"
- "Reverse the string: model context protocol"
- "Count the characters in: the quick brown fox"
- "Show me the server info resource"

Troubleshooting MCP CLI

npm link fails with permission errors

On macOS/Linux, run 'sudo npm link' or configure npm to use a user-writable prefix: 'npm config set prefix ~/.npm-global' and add ~/.npm-global/bin to your PATH.

MCP client cannot find or start the generated server

Ensure you have run 'npm run build' in the generated server directory so the dist/ folder exists. Use the absolute path to the compiled entry point (dist/index.js) in your MCP client config, not a relative path.

TypeScript build errors in the generated project

Run 'npm install' in the generated project directory to ensure all MCP SDK dependencies are installed. Check that your Node.js version is 16+ with 'node --version'. Delete node_modules and run npm install again if errors persist.

Frequently Asked Questions about MCP CLI

What is MCP CLI?

MCP CLI is a Model Context Protocol (MCP) server that command-line tool for creating and running model context protocol servers that expose resources, tools, and prompts to llm clients. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP CLI?

Follow the installation instructions on the MCP CLI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP CLI?

MCP CLI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP CLI free to use?

Yes, MCP CLI is open source and available under the AGPL 3.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-cli": { "command": "npx", "args": ["-y", "mcp-cli"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP CLI?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides