Core Commands
Commands
codemcp
Starts the project agent server. If no `codemcp.json` is found in the current working directory, initiates the interactive setup wizard.
$ codemcp
codemcp init
Runs the interactive project setup wizard to configure project name, context summary, permissions, and create `.mcpignore`.
$ codemcp init
codemcp serve
Starts the MCP server in non-interactive headless mode, ideal for background services, systemd, Docker, or CI/CD pipelines.
$ codemcp serve --port 4173
codemcp vault
Manages session credentials. Generates, reveals, or rotates high-entropy access tokens stored in your local secret vault.
$ codemcp vault --rotate
Global Flags
Options & Flags
--stdio(-s)
Launches CodeMCP in standard I/O communication mode for direct subprocess integration with Claude Desktop and CLI agents.
--port <num>(-p)
Specifies the local HTTP and SSE port for the Model Context Protocol server. Defaults to 4173.
--read-only(-r)
Forces read-only execution, disabling `write_file` and destructive modifications regardless of `codemcp.json` settings.
--auto-apply(-y)
Bypasses interactive human confirmation prompts and automatically applies file edits generated by AI models.
--no-tunnel(-l)
Disables automatic ngrok tunnel generation and restricts the server strictly to localhost loopback (127.0.0.1).
--help(-h)
Displays CLI command help, available options, and version information.