A CLI tool to scaffold Model Context Protocol (MCP) server projects in Go and other languages. It generates ready-to-use MCP server templates with support for multiple transports, Docker, and example resources/tools.
Current Version: v0.4.1 (latest release)
Learn more about the Model Context Protocol at the official introduction page.
- Generate new MCP server projects with a single command
- Supports multiple languages (Go, Node.js, Java, Python)
- Choose transport method (stdio, rest, websocket)
- Optional Docker support
- Example resources and tools included
- Interactive and non-interactive modes
- Test MCP server resources, tools, and capabilities
Clone the repository and build the CLI:
git clone https://github.com/aawadall/mcpcli.git
cd mcpcli
go build -o mcpcli ./cmd/mcpcligenerate(aliases:gen,g): Generate a new MCP server projecttest: Test MCP server resources, tools, capabilities, and initialization
./mcpcli generate my-server --language golang --transport stdio --docker --examplesOr use interactive mode (if required options are missing):
./mcpcli generate--name, -nProject name--language, -lProgramming language (golang,python,java,javascript/Node.js)--transport, -tTransport method (stdio,rest,websocket)--docker, -dInclude Docker support--examples, -eInclude example resources and tools--output, -oOutput directory (default: project name)--force, -fOverwrite existing directory
./mcpcli test --config configs/mcp-config.json --allOr use interactive mode (if no flags are provided):
./mcpcli test--config, -cPath to MCP configuration file--allTest all components (resources, tools, capabilities, init)--resourcesTest resources--toolsTest tools--capabilitiesTest capabilities--initTest initialization--script, -fPath to test script file
--verbose, -vEnable verbose output--quiet, -qSuppress output
cmd/Entrypoint for the CLIinternal/Core logic, generators, handlers, templatespkg/Shared packages
A generated Go MCP server project includes:
cmd/server/main.go- Main server entrypointinternal/handlers/- Request handlerspkg/mcp/- MCP protocol types and clientconfigs/mcp-config.json- Server configurationDockerfile- Docker support (optional)examples/- Example usage (optional)
A generated Node.js MCP server project includes:
src/index.js- Main server entrypointsrc/handlers/- Request handlersconfigs/mcp-config.json- Server configurationDockerfile- Docker support (optional)
Run go test ./... -cover to execute the unit tests. Overall coverage should remain above 85%.
Recent additions include tests for internal/commands/test.go and error handling cases in internal/generators/node_test.go to ensure the CLI testing workflow behaves as expected.
See the testing guide for more details on running the tests for mcpcli v0.4.1 (latest).
All contributions must maintain this minimum coverage level.
Contributions are welcome! Please open issues or pull requests.
The release workflow builds cross-platform archives.
For details on packaging mcpcli for Homebrew, APT, and Chocolatey see
the releasing guide.
MIT License