ext-apps/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Olivier Chafik 30f79b9e3f
ignore client roots by default in pdf-server (#510)
* security: ignore client roots by default in pdf-server

When the pdf-server is started with --stdio, MCP clients may advertise
roots that refer to directories on the *client's* file system. Because
the server resolves those paths locally, accepting them by default would
give the remote client access to arbitrary directories on the server's
machine.

This commit makes client roots opt-in via the --use-client-roots flag.
Without the flag, the server logs a notice and skips roots setup
entirely. The createServer() function now accepts a CreateServerOptions
object with a `useClientRoots` boolean (defaults to false).

https://claude.ai/code/session_014ohk5NMEPe8TBKpqp4ZRSw

* Enable client roots by default for HTTP, keep off for stdio

HTTP mode serves a local client so roots are safe. Stdio mode may
have a remote client whose roots would resolve against the server's
filesystem, so roots stay off unless --use-client-roots is passed.

https://claude.ai/code/session_014ohk5NMEPe8TBKpqp4ZRSw

* fix: correct transport-aware defaults for useClientRoots

stdio = local client (e.g. Claude Desktop) → auto-enable roots
HTTP = remote client → ignore roots unless --use-client-roots passed

The previous commit had the logic inverted.

https://claude.ai/code/session_014ohk5NMEPe8TBKpqp4ZRSw

* refactor: inline useClientRoots per transport branch

Remove the intermediate effectiveUseClientRoots variable — just pass
`true` in the stdio branch and the flag value in the HTTP branch.

https://claude.ai/code/session_014ohk5NMEPe8TBKpqp4ZRSw

* 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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-28 00:42:11 +00:00
..
basic-host chore: bump ext-apps to 1.1.2 (#503) 2026-02-25 01:43:51 +00:00
basic-server-preact Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
basic-server-react Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
basic-server-solid Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
basic-server-svelte Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
basic-server-vanillajs Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
basic-server-vue Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
budget-allocator-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
cohort-heatmap-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
customer-segmentation-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
debug-server chore: bump ext-apps to 1.1.2 (#503) 2026-02-25 01:43:51 +00:00
integration-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
map-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
pdf-server ignore client roots by default in pdf-server (#510) 2026-02-28 00:42:11 +00:00
qr-server Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
quickstart chore: bump ext-apps to 1.1.2 (#503) 2026-02-25 01:43:51 +00:00
say-server chore: bump ext-apps to 1.1.2 (#503) 2026-02-25 01:43:51 +00:00
scenario-modeler-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
shadertoy-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
sheet-music-server Merge pull request #499 from jonathanhefner/update-docs-url 2026-02-25 08:36:18 -06:00
system-monitor-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
threejs-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
transcript-server chore: bump ext-apps to 1.1.2 (#503) 2026-02-25 01:43:51 +00:00
video-resource-server chore: bump ext-apps to 1.1.2 (#503) 2026-02-25 01:43:51 +00:00
wiki-explorer-server fix examples servers' npm run start:stdio (#507) 2026-02-26 04:00:23 +00:00
run-all.ts add EXAMPLE=folder-name support for tests & basic-host (#292) 2026-01-19 20:16:37 +00:00