# jdx serve

IDE equivalent: Local HTTP/JSON API

Serve the HTTP/JSON API: GET /v1/<command>?query=…&<param>=… for each jdx query, POST /v1/batch for NDJSON batches, GET /v1/health as a liveness probe. Answers are the exact --json envelopes over one stored workspace (default: default), bound to localhost by default. Blocks until interrupted.

## Usage

```text
jdx serve [<options>]
```

## Options

| Option | Description |
|---|---|
| `-w, --workspace=<text>` | Stored workspace the server answers from (default: default). Individual requests may override it per call with ?workspace=. |
| `--port=<int>` | Port to listen on (default 7070). |
| `--bind=<text>` | Address to bind (default 127.0.0.1; localhost only unless changed). |
| `-h, --help` | Show this message and exit |

## Full help text

```console
$ jdx serve --help
Usage: jdx serve [<options>]

  Serve the HTTP/JSON API: GET /v1/<command>?query=…&<param>=… for each jdx query, POST /v1/batch for NDJSON batches, GET /v1/health as a liveness probe. Answers are the exact --json envelopes over one stored workspace (default: default), bound to localhost by default. Blocks until interrupted.

Options:
  -w, --workspace=<text>  Stored workspace the server answers from (default: default). Individual requests may override it per call with ?workspace=.
  --port=<int>            Port to listen on (default 7070).
  --bind=<text>           Address to bind (default 127.0.0.1; localhost only unless changed).
  -h, --help              Show this message and exit
```

## Learn more

Guide: [MCP, daemon, HTTP & batch](https://mohammadmd1383.github.io/jdx/docs/serving/) · [All commands](https://mohammadmd1383.github.io/jdx/docs/reference/)
