majordomus mcp
Serve the repository's AI layer to an MCP client over stdio (read-only)
majordomus mcp
Usage
majordomus mcp [OPTIONS]Arguments
| argument | value | default | description |
|---|---|---|---|
| --repo | <PATH> | — | Start the search for the repository root here (default: the current directory) (accepted by every subcommand) |
| --discovery | vcs | filesystem | vcs | How declarative files are enumerated (accepted by every subcommand)
|
| --strict | flag | — | Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand) |
| --share | <DIR> | — | The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand) |
| --inspect | flag | — | Print what would be served, and every diagnostic, then exit without serving |
| --format | text | json | text | Output shape of --inspect
|
| --transport | stdio | stdio | The transport to serve on
|
| --standalone | flag | — | Serve this client alone: no shared server, no HTTP, no Swagger UI, no peers, and nothing written anywhere. The default is the shared server (below) |
| --http-host | <HOST> | 127.0.0.1 | Interface the shared server binds when this process is the one that starts it |
| --http-port | <PORT> | 8741 | Port the shared server binds when this process starts it; when it is taken, a free port is used instead and the URL is logged on stderr either way |
Examples
-
See what would be served, without serving it
Builds the registry and the index of the repository in the working directory and prints the repository, the capabilities, the objects and every diagnostic, then exits. Nothing is served and nothing is written.
$ majordomus mcp --inspectVerified by the example tests: exits 0; prints repository, capabilities.
-
The same, as one JSON document for a script
The shape `--inspect` prints for a person, as JSON: the repository, its discovery mode, the capabilities and the diagnostics, deterministic and safe to diff.
$ majordomus mcp --inspect --format jsonVerified by the example tests: exits 0; prints one JSON document carrying /repository/repository/root, /tools.
-
Serve one MCP client on stdio
The form an MCP client spawns: JSON-RPC frames in on stdin, frames out on stdout, logs on stderr, and the session ends at end of input. `--standalone` keeps this process to itself: no shared server, no HTTP, nothing written anywhere.
$ majordomus mcp --standaloneVerified by the example tests: answers initialize and tools/list on stdio, and exits 0 at end of input.
Where this comes from
Declared once in apps/majordomus-cli/src/cli.rs: clap for the structure, typed Rust metadata beside it for the examples. This page, majordomus mcp --help, docs/generated/cli.md and docs/generated/cli.json are projections of that one declaration.
The whole command line on one page: the registry's command-line page. The task lifecycle (init, start, finish, doctor, ...) belongs to the shell tool, a different program: Commands and its specification.