golf command-line interface is your primary tool for managing GolfMCP projects.
Commands
golf init
Initializes a new GolfMCP project directory with Golf branding and modern authentication setup.
The name of the project and the directory to be created.
Specifies a different directory to create the project in. Defaults to a new directory named
project_name in the current location.Alias: -ogolf build
Builds your GolfMCP project into a runnable MCP server. The build process includes enhanced authentication handling and validation.
dev or prod:
Development (dev) | Production (prod) |
|---|---|
• Copies .env file to dist/ directory• Environment variables loaded from local file • Optimized for local development and testing | • No .env file copied• Environment variables expected at runtime • Optimized for production deployment |
golf run
Runs a previously built GolfMCP server with enhanced runtime features.
Make sure to run
golf build prod or golf build dev before using golf run.