witnyx mcp
witnyx mcp starts a Model Context Protocol (MCP) server for coding agents.
It speaks JSON-RPC on standard input and output and opens no network port.
Standard output carries only JSON-RPC; anything else goes to standard error.
The server runs until the client closes standard input, then exits with code 0.
Use it when a coding agent should call Witnyx as tools instead of running commands in a shell. The server offers four tools:
| Tool | What it does |
|---|---|
check_sbom |
Runs the release security check on a software bill of materials (SBOM) and returns the JSON report. |
explain_finding |
Explains one finding by its ID: what it means, its fix and its docs page. It uses the session’s last check of the same SBOM, or runs one. |
propose_not_affected |
Adds a pending “not affected” entry to .witnyx.yml. It counts only after a person fills in approvedBy and approvedOn. |
get_report_schema |
Returns the JSON Schema of a Witnyx document, as witnyx schema prints it. |
The tools read and write only inside one folder: --repo-dir, or without it the folder the server starts in.
Some clients start servers in the file-system root or the home folder, so mcp refuses both, and any folder that contains the home folder: name the repository.
--cache-dir and --timeout work as they do for witnyx check.
An error in the options is printed on standard error before the server starts, with exit code 2.
Examples
Section titled “Examples”The client starts the server itself.
Give it the command witnyx with the arguments mcp, --repo-dir and the absolute path of the repository:
witnyx mcp --repo-dir /path/to/your/repositoryMany clients read an entry like this one; where it goes depends on the client:
{ "mcpServers": { "witnyx": { "command": "witnyx", "args": ["mcp", "--repo-dir", "/path/to/your/repository"] } }}See also: Connect the MCP server.
Usage
witnyx mcp [-hV] [--cache-dir=DIR] [--format=FORMAT] [--repo-dir=DIR] [--timeout=SECONDS]Options
| Option | Value | Default | Description |
|---|---|---|---|
--repo-dir |
DIR |
. |
The repository root (default: the current directory). |
--cache-dir |
DIR |
Cache directory for public data (default: the platform’s cache folder). | |
--timeout |
SECONDS |
120 |
Time budget in seconds (default: 120). |
-h, --help |
Show this help message and exit. | ||
-V, --version |
Print version information and exit. | ||
--format |
FORMAT |
With --help: text (the default) or json, a machine-readable reference. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Done. |
| 2 | Could not run: a usage error, an input error or a failed download. |
Witnyx is a record-keeping and workflow tool. It does not certify compliance. Nothing on this site is legal advice.