servers icon indicating copy to clipboard operation
servers copied to clipboard

everything: zip tool: add outputType to control resource vs. resource link output

Open ochafik opened this issue 2 months ago • 3 comments

Follow up on https://github.com/modelcontextprotocol/servers/pull/2830

  • Switch to gzip / single file so there's no extra deps
  • Tool has default inputs to facilitate testing
  • Add outputType input:
    • resource: blob
    • resourceLink: needs to be read by uri after the fact
  • Added limitations:
    • fetch size limit = 10MB (overridable w/ GZIP_MAX_FETCH_SIZE)
    • fetch timeout (over all files) = 30sec (overridable w/ GZIP_MAX_FETCH_TIME_MILLIS env var)
    • only fetch http:, https: (restricted to domains listed in GZIP_ALLOWED_DOMAINS to mitigate SSRF attacks; defaults to just raw.githubusercontent.com) and data: URIs; no file:

cc/ @crondinini-ant

To test:

  • Run gzip tool w/ a url as input (must be on raw.githubusercontent.com)

    image
  • If selecting resourceLink for outputType, the resource can then be read in the resources tab (hit List More Resources until reached last page)

    CleanShot 2025-10-14 at 20 21 14@2x

ochafik avatar Oct 08 '25 17:10 ochafik

@cliffhall Added some file size limit + timeout to address @domdomegg 's comments on related pr.

Also simplified the resource handling / reusing the existing resource array.

ochafik avatar Oct 14 '25 19:10 ochafik

Thanks @cliffhall for testing & for the suggestion! (applied)

ochafik avatar Oct 24 '25 01:10 ochafik

@ochafik seems like the package-lock.json has gotten out of sync. Can you resolve?

cliffhall avatar Nov 08 '25 17:11 cliffhall

@ochafik I think this is a good change, would like to see it merged if you can just resolve conflicts.

cliffhall avatar Dec 03 '25 21:12 cliffhall