Documentation
/

CLI Reference

CLI Reference

Complete reference for ModelFetch CLI tools including create-modelfetch and modelfetch commands.

create-modelfetch

The create-modelfetch CLI scaffolds new MCP server projects with all necessary dependencies and configuration.

Installation

No installation required. Use directly with npx:

npx create-modelfetch <project-name>

Usage

npx create-modelfetch my-mcp-server

The command will:

modelfetch CLI

The modelfetch CLI provides development, build, and deployment commands for MCP servers.

Installation

Installed automatically with create-modelfetch projects:

# Already included in your package.json
npm run dev    # Uses modelfetch dev
npm run build  # Uses modelfetch build
npm run deploy # Uses modelfetch deploy

Commands

CommandDescriptionUsage
devStart development server with live reloadmodelfetch dev
buildBuild for productionmodelfetch build
deployDeploy to ModelFetch platformmodelfetch deploy
loginAuthenticate with ModelFetch accountmodelfetch login
logoutSign out of ModelFetch accountmodelfetch logout

Command Details

modelfetch dev

Starts the development server with automatic recompilation and restart on file changes.

Features:

modelfetch build

Builds the MCP server for production deployment.

Output:

modelfetch deploy

Deploys your MCP server to the ModelFetch platform.

modelfetch login

Authenticates with your ModelFetch account.

modelfetch logout

Signs out of your ModelFetch account.

Common Patterns

Complete Development Workflow

# Create new project
npx create-modelfetch my-server
cd my-server

# Start development
npm run dev

# Build for production
npm run build

# Test production build
npm start

# Deploy to platform
npm run deploy

Authentication Management

# Initial login
modelfetch login

# Deploy your server
modelfetch deploy

# Logout for security
modelfetch logout

Debugging Build Issues

# Clean build
rm -rf dist/
npm run build

# Test locally
npm start

# Check for TypeScript errors
npx tsc --noEmit

Getting Help

Use the --help flag with commands for detailed usage:

# General help
modelfetch --help

# Command-specific help
modelfetch dev --help
modelfetch deploy --help