MCP CLI
A command-line tool for creating and running Model Context Protocol servers that expose resources, tools, and prompts to LLM clients.
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
Maintainer
Works with
Installation
Manual Installation
npx mcp-cliConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 linkScaffold 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.0Explore 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 startAdd 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"]
}
}
}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.
MCP CLI Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP CLI? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up MCP CLI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.