Server
thesis server
Manage a local Thesis Core server.
thesis server [command] [options]
Description: "Manage a Thesis core server."
thesis server start
Start the Thesis Server.
thesis server start [options]
-
Arguments
- None
-
Options
| Option | Description | Default | Required? |
|---|---|---|---|
-d, --detach |
Run server in background | No | |
-p, --port <port> |
The port to run the server on | 42421 |
No |
--root-dir <path> |
Root directory for notebooks | Computed default (see Notes) | No |
- Examples
Foreground:
thesis server start
Background (writes logs to a file):
thesis server start --detach
Use a non-default port:
thesis server start --port 50000
- Notes
- Creates
~/.thesisif it does not exist. - Writes a PID file at
~/.thesis/pids/server.jsonand cleans up stale ones from previous runs. - In detached mode, stdout/stderr are appended to
~/.thesis/logs/server.log. - If a prior server is already running it does not start a new one; it reports the existing PID.
- Fails with a clear error if the port is already in use.
- Creates
thesis server mcp start
Start the Thesis Core server and print MCP (Model Context Protocol) connection info.
thesis server mcp start [options]
-
Arguments
- None
-
Options
| Option | Description | Default | Required? |
|---|---|---|---|
-p, --port <port> |
The port to run the server on | 42421 |
No |
--root-dir <path> |
Root directory for notebooks | Computed default | No |
- Examples
thesis server mcp start
thesis server mcp start --port 50000
- Notes
- Always runs in foreground (no
--detachflag). - After start-up, prints the MCP URL
http://localhost:<port>/mcpand a ready-to-paste.cursor/mcp.jsonsnippet. - Kills any previous server recorded in
~/.thesis/pids/server.jsonbefore starting.
- Always runs in foreground (no
thesis server stop
Stop the Thesis Server.
thesis server stop
-
Arguments
- None
-
Options
- None
-
Examples
thesis server stop
- Notes
- Reads the PID file at
~/.thesis/pids/server.json, performs a graceful shutdown (SIGTERM, then SIGKILL if needed), and removes the PID file. - If the PID file is stale (process not alive), it is removed and the command reports that the server was not running.
- Reads the PID file at
thesis server status
Check whether the Thesis Server is running.
thesis server status
-
Arguments
- None
-
Options
- None
-
Examples
thesis server status
- Notes
- Prints the running PID when alive; otherwise reports "not running" and cleans up a stale PID file.