CLI¶
Generated from the Typer application. Behavior the help text does not state is in Usage.
mcp4api¶
Turn API docs into a working MCP server, then verify every generated tool against the real API.
Usage¶
mcp4api [OPTIONS] COMMAND [ARGS]...
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--version |
Print the version and exit. | No | False |
Commands¶
| Name | Description |
|---|---|
run |
|
ingest |
Read an OpenAPI file path or URL and write... |
curate |
Read endpoints.json and write tools.yaml. |
emit |
Read tools.yaml and endpoints.json and... |
verify |
Call every generated tool and write report/. |
record |
Record cassettes against a sandbox URL. |
Subcommands¶
run¶
No description available
Usage¶
mcp4api run [OPTIONS] {spec}
Arguments¶
| Name | Description | Required |
|---|---|---|
spec |
OpenAPI file path or URL. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--out |
Directory that receives stage artifacts. | No | - |
--json |
Print errors as a JSON object. | No | False |
--quiet |
Show errors only. | No | False |
--verbose |
Show debug logs. | No | False |
--offline |
Read local files only. | No | False |
--allow-ref-host |
Host allowed for remote reference fetches. | No | - |
--model |
Claude model used for agent curation. | No | claude-opus-5-5 |
--budget-tokens |
Maximum tokens for agent curation. | No | 200000 |
--budget-usd |
Maximum estimated USD for agent curation. | No | 5.0 |
--curation [agent|heuristic|manual] |
Curation mode. | No | agent |
--max-tools |
Tool-count target. Exceeding it requires a rationale. | No | 20 |
--namespace |
Prefix added to each tool name. | No | - |
--include-tag |
Tag or category to keep instead of excluding. | No | - |
--dry-run |
Print a token and cost estimate without a paid call. | No | False |
--recurate |
Curate again even when the input hash matches. | No | False |
--force |
Overwrite generated files that were edited. | No | False |
--allow-host |
Host the verification proxy may dial. | No | - |
--on-failure [exclude|keep] |
exclude drops a failed tool. keep warns in its description. | No | exclude |
--sandbox |
Sandbox base URL for record, or for verify instead of fixtures. | No | - |
--deterministic |
Omit timestamps and durations from the report. | No | False |
--live |
Call the spec server instead of fixtures. | No | False |
--allow-writes |
Call destructive and non-idempotent tools during --live. | No | False |
--isolate |
Run verification in a Linux network namespace. | No | False |
--html |
Also write report/verification.html. | No | False |
ingest¶
Read an OpenAPI file path or URL and write endpoints.json.
Usage¶
mcp4api ingest [OPTIONS] {spec}
Arguments¶
| Name | Description | Required |
|---|---|---|
spec |
OpenAPI file path or URL. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--out |
Directory that receives stage artifacts. | No | - |
--json |
Print errors as a JSON object. | No | False |
--quiet |
Show errors only. | No | False |
--verbose |
Show debug logs. | No | False |
--offline |
Read local files only. | No | False |
--allow-ref-host |
Host allowed for remote reference fetches. | No | - |
curate¶
Read endpoints.json and write tools.yaml.
Usage¶
mcp4api curate [OPTIONS]
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--out |
Directory that receives stage artifacts. | No | - |
--json |
Print errors as a JSON object. | No | False |
--quiet |
Show errors only. | No | False |
--verbose |
Show debug logs. | No | False |
--offline |
Read local files only. | No | False |
--model |
Claude model used for agent curation. | No | claude-opus-5-5 |
--budget-tokens |
Maximum tokens for agent curation. | No | 200000 |
--budget-usd |
Maximum estimated USD for agent curation. | No | 5.0 |
--curation [agent|heuristic|manual] |
Curation mode. | No | agent |
--max-tools |
Tool-count target. Exceeding it requires a rationale. | No | 20 |
--namespace |
Prefix added to each tool name. | No | - |
--include-tag |
Tag or category to keep instead of excluding. | No | - |
--dry-run |
Print a token and cost estimate without a paid call. | No | False |
--recurate |
Curate again even when the input hash matches. | No | False |
emit¶
Read tools.yaml and endpoints.json and write generated/.
Usage¶
mcp4api emit [OPTIONS]
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--out |
Directory that receives stage artifacts. | No | - |
--json |
Print errors as a JSON object. | No | False |
--quiet |
Show errors only. | No | False |
--verbose |
Show debug logs. | No | False |
--force |
Overwrite generated files that were edited. | No | False |
verify¶
Call every generated tool and write report/.
Usage¶
mcp4api verify [OPTIONS]
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--out |
Directory that receives stage artifacts. | No | - |
--json |
Print errors as a JSON object. | No | False |
--quiet |
Show errors only. | No | False |
--verbose |
Show debug logs. | No | False |
--offline |
Read local files only. | No | False |
--allow-host |
Host the verification proxy may dial. | No | - |
--on-failure [exclude|keep] |
exclude drops a failed tool. keep warns in its description. | No | exclude |
--sandbox |
Sandbox base URL for record, or for verify instead of fixtures. | No | - |
--deterministic |
Omit timestamps and durations from the report. | No | False |
--live |
Call the spec server instead of fixtures. | No | False |
--allow-writes |
Call destructive and non-idempotent tools during --live. | No | False |
--isolate |
Run verification in a Linux network namespace. | No | False |
--html |
Also write report/verification.html. | No | False |
record¶
Record cassettes against a sandbox URL.
Usage¶
mcp4api record [OPTIONS]
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--out |
Directory that receives stage artifacts. | No | - |
--json |
Print errors as a JSON object. | No | False |
--quiet |
Show errors only. | No | False |
--verbose |
Show debug logs. | No | False |
--allow-host |
Host the verification proxy may dial. | No | - |
--sandbox |
Sandbox base URL for record, or for verify instead of fixtures. | No | - |