Skip to content

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 --help

Output 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 tool

gm-mcp --version

Display current installed version information.

bash
gm-mcp --version

Output example:

1.0.0

Project 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

OptionShortDescriptionDefault
--template-tSelect project templatebasic
--yes-ySkip confirmation prompts, use default configurationfalse

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 --yes

Interactive Flow

When you run gm-mcp init, you will be guided through the following steps:

  1. Enter project name (if not provided)
  2. Select project template
  3. Confirm dependency installation

gm-mcp help

Display detailed help information.

bash
gm-mcp help

gm-mcp version

Display detailed version information.

bash
gm-mcp version

gm-mcp update

Check and update scaffold tool.

bash
gm-mcp update

Error Handling

Common Errors

Project name already exists

bash
 Directory "my-project" already exists

Solution: Choose a different project name or delete the existing directory.

Network connection issues

bash
💡 Tip: Ensure network connection is normal, or try again later

Solution: Check network connection or try again later.

Permission issues

bash
Error: EACCES: permission denied

Solution: Use sudo or configure npm to use a different directory.

Environment Variables

gm-mcp supports the following environment variables:

Variable NameDescriptionDefault Value
NPM_REGISTRYnpm registry URLhttps://registry.npmjs.org/
GM_MCP_CACHE_DIRCache directory~/.gm-mcp/cache

Next Steps

Released under the MIT License