Commands
gm-mcp provides the following commands to help you create and manage MCP projects.
Global Commands
gm-mcp --help
Display help information.
bash
gm-mcp --helpOutput example:
Usage: gm-mcp [options] [command]
MCP TypeScript Project Scaffold Tool
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
init [options] [project-name] Initialize a new MCP TypeScript project
help Display help information
version Display version information
update Check and update scaffold toolgm-mcp --version
Display current installed version information.
bash
gm-mcp --versionOutput example:
1.0.0Project Commands
gm-mcp init [project-name]
Initialize a new MCP TypeScript project.
Syntax
bash
gm-mcp init [project-name] [options]Parameters
project-name(optional): Project name. If not provided, you will be prompted to enter it.
Options
| Option | Short | Description | Default |
|---|---|---|---|
--template | -t | Select project template | basic |
--yes | -y | Skip confirmation prompts, use default configuration | false |
Available Templates
basic: Basic template (recommended for learning and development)advanced: Advanced template (recommended for production environments)minimal: Minimal template (recommended for rapid prototyping)
Usage Examples
bash
# Interactive project creation
gm-mcp init my-mcp-project
# Use specified template
gm-mcp init my-project --template advanced
# Skip confirmation, use default configuration
gm-mcp init my-project --yes
# Quick creation with minimal template
gm-mcp init my-project --template minimal --yesInteractive Flow
When you run gm-mcp init, you will be guided through the following steps:
- Enter project name (if not provided)
- Select project template
- Confirm dependency installation
gm-mcp help
Display detailed help information.
bash
gm-mcp helpgm-mcp version
Display detailed version information.
bash
gm-mcp versiongm-mcp update
Check and update scaffold tool.
bash
gm-mcp updateError Handling
Common Errors
Project name already exists
bash
❌ Directory "my-project" already existsSolution: Choose a different project name or delete the existing directory.
Network connection issues
bash
💡 Tip: Ensure network connection is normal, or try again laterSolution: Check network connection or try again later.
Permission issues
bash
Error: EACCES: permission deniedSolution: Use sudo or configure npm to use a different directory.
Environment Variables
gm-mcp supports the following environment variables:
| Variable Name | Description | Default Value |
|---|---|---|
NPM_REGISTRY | npm registry URL | https://registry.npmjs.org/ |
GM_MCP_CACHE_DIR | Cache directory | ~/.gm-mcp/cache |
Next Steps
- Configuration Options - Learn about all configuration options
- Template Overview - Learn about all available templates