Skip to content

odoo-work-cli mcp print

NAME

odoo-work-cli-mcp-print - Print the MCP client configuration for this server

SYNOPSIS

odoo-work-cli mcp print [--binary VALUE] [--command] [--read-only]

DESCRIPTION

Print the configuration an MCP client needs to start this server. Nothing is written; copy the output where your client expects it.

By default the output is the JSON "mcpServers" block, as it goes into a project's .mcp.json (Claude Code) or the MCP settings of another client:

{"mcpServers": {"odoo-work-cli": {"type": "stdio", "command": "odoo-work-cli", "args": ["mcp"]}}}

With --command the output is the "claude mcp add" command line that registers the server for the current user in Claude Code.

Use --binary for an absolute path when the client does not search PATH, and --read-only to register a server without the write tools.

OPTIONS

--binary VALUE

Command used in the entry, e.g. an absolute path.

string; optional; default: odoo-work-cli

--command

Print the claude mcp add command line instead of JSON.

flag; optional

--read-only

Register the server with --read-only.

flag; optional

GLOBAL OPTIONS

--backend BACKEND

BACKEND: odoo or fake (offline, made-up data; env ODOO_WORK_CLI_BACKEND).

string; optional; default: odoo; env: ODOO_WORK_CLI_BACKEND

--config FILE

Read only the config FILE (skip discovery).

string; optional

-h, --help
Print the help of the command and exit.

OUTPUT

The mcpServers JSON block, or with --command one claude mcp add command line.

EXIT STATUS

0 on success, 1 on any error, including usage errors. The error is printed as "Error: TEXT" on standard error.

Error kinds this command can fail with:

validation
Invalid input: unknown flag, bad argument, malformed date, time or hours, a time in the future, an unknown project.
internal
Anything else: an unexpected Odoo response or a bug.

EXAMPLES

JSON block for .mcp.json:

$ odoo-work-cli mcp print

Register with Claude Code, read tools only:

$ $(odoo-work-cli mcp print --command --read-only)

Absolute path for clients without PATH lookup:

$ odoo-work-cli mcp print --binary "$(command -v odoo-work-cli)"

SEE ALSO