Skip to main content

CLI Commands

Main Commands

openapi_mcp_codegen

Primary command for generating MCP servers:

uvx --from git+https://github.com/cnoe-io/openapi-mcp-codegen.git openapi_mcp_codegen \
--spec-file INPUT_SPEC \
--output-dir OUTPUT_DIR \
[OPTIONS]

enhance_and_generate

Enhanced generation with LLM optimization:

python -m openapi_mcp_codegen.enhance_and_generate \
INPUT_SPEC \
OUTPUT_DIR \
CONFIG_FILE \
[OPTIONS]

overlay_generator

Generate OpenAPI overlays:

python -m openapi_mcp_codegen.overlay_generator \
INPUT_SPEC \
OUTPUT_OVERLAY \
[--use-llm]

Command Options

OptionDescriptionDefault
--generate-agentCreate LangGraph agentfalse
--generate-evalInclude evaluation frameworkfalse
--save-overlaySave generated overlayNot saved
--enhance-docstring-with-llmLLM docstring enhancementfalse

For complete option reference, run with --help.