jdx mcp
IDE equivalent: MCP stdio server (typed jdx_* tools)
Serve the MCP stdio server: each jdx query as a typed jdx_* tool with a generated schema, for agents that speak Model Context Protocol. Holds the workspace in memory for the session, so repeated queries are instant. Tool calls may pass jars, coord, or discover when no stored workspace exists. MCP clients spawn this as a child process and talk JSON-RPC over stdin/stdout. This server never downloads. jdx_doctor refuses with exit 6; run jdx doctor in a shell. ws and cache are not tools (issue #19).
Usage#
jdx mcp [<options>]Options#
| Option | Description |
|---|---|
-w, --workspace=<text> | Stored workspace the server answers from (default: default). A missing workspace reads as an error naming jdx ws unless the call passes jars, coord, or discover, or this server was started with --discover. Individual tool calls may override it per call. |
--discover | When the selected workspace does not exist, auto-discover a Gradle or Maven project from this process's working directory. Never runs Gradle or Maven. A workspace that exists still wins. Tool calls may pass discover, jars, or coord. Coordinates resolve from local caches only; this server never downloads. |
-h, --help | Show this message and exit |
Full help text#
Show jdx mcp --help
jdx mcp --help
Usage: jdx mcp [<options>]
Serve the MCP stdio server: each jdx query as a typed jdx_* tool with a generated schema, for agents that speak Model Context Protocol. Holds the workspace in memory for the session, so repeated queries are instant. Tool calls may pass jars, coord, or discover when no stored workspace exists. MCP clients spawn this as a child process and talk JSON-RPC over stdin/stdout. This server never downloads. jdx_doctor refuses with exit 6; run `jdx doctor` in a shell. ws and cache are not tools (issue #19).
Options:
-w, --workspace=<text> Stored workspace the server answers from (default: default). A missing workspace reads as an error naming `jdx ws` unless the call passes jars, coord, or discover, or this server was started with --discover. Individual tool calls may override it per call.
--discover When the selected workspace does not exist, auto-discover a Gradle or Maven project from this process's working directory. Never runs Gradle or Maven. A workspace that exists still wins. Tool calls may pass discover, jars, or coord. Coordinates resolve from local caches only; this server never downloads.
-h, --help Show this message and exitReal output — this example ran against the current jdx when the page was built.
Learn more#
Guide: MCP, daemon, HTTP & batch · All commands