@modelcontextprotocol/server-pdf 1.1.2 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -149,9 +149,27 @@ bun examples/pdf-server/main.ts ./local.pdf https://arxiv.org/pdf/2401.00001.pdf
149
149
  bun examples/pdf-server/main.ts --stdio ./papers/
150
150
  ```
151
151
 
152
+ ## Security: Client Roots
153
+
154
+ 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.
155
+
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`:
158
+
159
+ ```bash
160
+ # Trust that the HTTP client is local and its roots are safe
161
+ bun examples/pdf-server/main.ts --use-client-roots
162
+ ```
163
+
164
+ When roots are ignored the server logs:
165
+
166
+ ```
167
+ [pdf-server] Client roots are ignored (default for remote transports). Pass --use-client-roots to allow the client to expose local directories.
168
+ ```
169
+
152
170
  ## Allowed Sources
153
171
 
154
- - **Local files**: Must be passed as CLI arguments
172
+ - **Local files**: Must be passed as CLI arguments (or via client roots when enabled)
155
173
  - **Remote URLs**: arxiv.org, biorxiv.org, medrxiv.org, chemrxiv.org, zenodo.org, osf.io, hal.science, ssrn.com, and more
156
174
 
157
175
  ## Tools