QuickMCP CLI Commands: The Complete Reference

Complete guide to all QuickMCP CLI commands: serve, build, list, add, delete. Master flags, options, and real-world usage patterns.

The QuickMCP CLI is your primary interface for generating and managing MCP servers. This guide covers every command, flag, and option with practical examples.

Installation

First, install the CLI as a global .NET tool:

dotnet tool install -g QuickMCP.CLI

Verify installation:

quickmcp --version
quickmcp --help

The serve Command

Start an MCP server from API specifications or configuration files.

Basic Usage

From URL:

quickmcp serve --spec-url https://api.example.com/swagger.json

From local file:

quickmcp serve --spec-path ./my-api-spec.json

From saved configuration:

quickmcp serve --config-path ./my-server-config.json

All serve Options

Flag Alias Description
--config-path -c Path to configuration file
--spec-url -s OpenAPI/Discovery spec URL
--spec-path -p Local spec file path
--api-base-url -a Override API base URL
--logging -l Enable verbose logging

Real Examples

GitHub API:

quickmcp serve \
  --spec-url https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json \
  --logging

With custom base URL:

quickmcp serve \
  --spec-path ./swagger.json \
  --api-base-url https://staging.api.example.com \
  --logging

The build Command

Generate MCP server configurations and specifications.

Build Config

Create a reusable configuration file:

quickmcp build config \
  --spec-url https://api.example.com/swagger.json \
  --output-path ./server-config.json

All build config Options

Flag Alias Description Default
--spec-url -s API specification URL
--spec-path -p Local spec file
--output-path -o Output file path
--api-type -t openapi or discovery auto-detect
--server-name -n Server identifier from spec
--auth Authentication type none
--exclude-paths -x Exclude endpoints
--only-for-paths -f Include only these
--ai-metadata -m Generate AI descriptions false

Authentication Types

Use with --auth flag:

  • apikey - API key authentication
  • basicauth - Basic authentication
  • bearertoken - Bearer token
  • oauth - OAuth 2.0 client credentials
  • customheader - Custom header

Advanced build Examples

With authentication:

quickmcp build config \
  --spec-url https://api.stripe.com/openapi.json \
  --auth bearertoken \
  --ai-metadata \
  --output-path ./stripe-config.json

With path filtering:

quickmcp build config \
  --spec-url https://api.example.com/swagger.json \
  --exclude-paths "/admin/*,/internal/*,/debug/*" \
  --output-path ./filtered-config.json

Include specific paths only:

quickmcp build config \
  --spec-url https://api.example.com/swagger.json \
  --only-for-paths "/users/*,/posts/*" \
  --output-path ./users-posts-config.json

Build Spec

Generate an OpenAPI spec from API documentation:

quickmcp build spec -d https://api.example.com/docs

This is useful when an API has documentation but no formal OpenAPI specification.

The list Command

Display available options and configured servers.

List Authentication Types

quickmcp list auth

Output:

Available Authentication Types:
- apiKey: Header or query parameter authentication
- basicAuth: Base64-encoded username/password
- bearerToken: Authorization header token
- customHeader: Custom header with value
- oAuth: Client credentials flow with token endpoint

List Configured Servers

quickmcp list server

Output:

Configured Servers:
- github: GitHub API (Bearer Auth)
- stripe: Stripe API (Bearer Auth)
- internal-api: Internal Tools (API Key Auth)

The add Command

Save server configurations for easy reuse.

Usage

quickmcp add server <config_path> -n <server_name>

Examples

quickmcp add server ./github-config.json -n github
quickmcp add server ./stripe-config.json -n stripe
quickmcp add server ./internal-config.json -n internal

Now you can serve by name:

quickmcp serve --server-id github

The delete Command

Remove saved server configurations.

Usage

quickmcp delete server <server_name>

Example

quickmcp delete server github

Real-World Workflows

Workflow 1: Quick Testing

# Test a public API immediately
quickmcp serve --spec-url https://petstore.swagger.io/v2/swagger.json

Workflow 2: Configured Production Server

# Step 1: Build config with filters
quickmcp build config \
  --spec-url https://api.company.com/swagger.json \
  --auth oauth \
  --exclude-paths "/admin/*,/internal/*" \
  --ai-metadata \
  --output-path ./prod-config.json

# Step 2: Edit config, add credentials via env vars

# Step 3: Save for reuse
quickmcp add server ./prod-config.json -n production

# Step 4: Start server
export OAUTH_CLIENT_ID="..."
export OAUTH_CLIENT_SECRET="..."
quickmcp serve --server-id production --logging

Workflow 3: Multiple Environments

# Dev environment
quickmcp build config \
  --spec-url https://dev-api.company.com/swagger.json \
  --auth apikey \
  --output-path ./dev-config.json

quickmcp add server ./dev-config.json -n dev

# Staging
quickmcp build config \
  --spec-url https://staging-api.company.com/swagger.json \
  --auth oauth \
  --output-path ./staging-config.json

quickmcp add server ./staging-config.json -n staging

# Production
quickmcp build config \
  --spec-url https://api.company.com/swagger.json \
  --auth oauth \
  --exclude-paths "/debug/*" \
  --output-path ./prod-config.json

quickmcp add server ./prod-config.json -n production

# Switch environments easily
quickmcp serve --server-id dev
quickmcp serve --server-id staging
quickmcp serve --server-id production

Common Patterns

Pattern: Environment-Specific Configs

# Use different base URLs for environments
quickmcp serve \
  --config-path ./config.json \
  --api-base-url https://dev.api.example.com

quickmcp serve \
  --config-path ./config.json \
  --api-base-url https://prod.api.example.com

Pattern: Debugging

Always use --logging when troubleshooting:

quickmcp serve --config-path ./config.json --logging

Pattern: Filtering Endpoints

Exclude dangerous operations:

--exclude-paths "*/delete,*/remove,/admin/*"

Include only safe operations:

--only-for-paths "*/get,*/list,/search/*"

Tips and Tricks

Tip 1: Save Your Build Commands

Create a build.sh script:

#!/bin/bash
quickmcp build config \
  --spec-url https://api.example.com/swagger.json \
  --auth bearertoken \
  --exclude-paths "/admin/*" \
  --ai-metadata \
  --output-path ./config.json

echo "Config generated! Remember to add your Bearer token."

Tip 2: Use AI Metadata

The --ai-metadata flag makes your tools more discoverable by AI assistants:

quickmcp build config \
  --spec-url https://api.example.com/swagger.json \
  --ai-metadata \
  --output-path ./config.json

Tip 3: Test Before Saving

Always test a configuration before adding it:

# Test first
quickmcp serve --config-path ./new-config.json --logging

# If it works, save it
quickmcp add server ./new-config.json -n my-server

Troubleshooting

Error: "Specification not found"

Check your URL or file path:

# Verify URL works
curl https://api.example.com/swagger.json

# Check file exists
ls -la ./my-spec.json

Error: "Authentication failed"

Enable logging to see what's happening:

quickmcp serve --config-path ./config.json --logging

Error: "Port already in use"

QuickMCP uses stdio by default, not network ports. This usually means another MCP server is running.

Next Steps

The CLI is your primary tool for working with QuickMCP. Master these commands and you'll be generating MCP servers effortlessly.