Skip to content

Commit c551669

Browse files
committed
docs: update README to match transport-aware client roots defaults
Stdio always enables roots (client is local); HTTP ignores them by default. The previous README text had these reversed. https://claude.ai/code/session_014ohk5NMEPe8TBKpqp4ZRSw
1 parent 3002141 commit c551669

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/pdf-server/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,18 @@ bun examples/pdf-server/main.ts --stdio ./papers/
153153

154154
MCP clients may advertise **roots**`file://` URIs pointing to directories on the client's file system. The server uses these to allow access to local files under those directories.
155155

156-
- **HTTP mode** (default): Client roots are **enabled** — the client is typically on the same machine, so the roots are safe.
157-
- **Stdio mode** (`--stdio`): Client roots are **ignored** by default — the client may be remote, and its roots would be resolved against the server's filesystem. To opt in, pass `--use-client-roots`:
156+
- **Stdio mode** (`--stdio`): Client roots are **always enabled** — the client is typically on the same machine (e.g. Claude Desktop), so the roots are safe.
157+
- **HTTP mode** (default): Client roots are **ignored** by default — the client may be remote, and its roots would be resolved against the server's filesystem. To opt in, pass `--use-client-roots`:
158158

159159
```bash
160-
# Trust that the stdio client is local and its roots are safe
161-
bun examples/pdf-server/main.ts --stdio --use-client-roots
160+
# Trust that the HTTP client is local and its roots are safe
161+
bun examples/pdf-server/main.ts --use-client-roots
162162
```
163163

164164
When roots are ignored the server logs:
165165

166166
```
167-
[pdf-server] Client roots are ignored (default for security). Pass --use-client-roots to allow the client to expose local directories.
167+
[pdf-server] Client roots are ignored (default for remote transports). Pass --use-client-roots to allow the client to expose local directories.
168168
```
169169

170170
## Allowed Sources

0 commit comments

Comments
 (0)