Repository navigation
Releases
Releases · hoornet/agentdocs-mcp
v0.11.0 — page history, move and trash tools
Added
- Page history tools.
list_page_versionslists a page's saved versions,
newest first, with the date, the author, which app made each edit
(edited_via,token_name) and the text length. It leaves the text out,
because the REST route returns every version in full;limit(default 50,
max 200) caps the list.get_page_versionreturns one version's text, and
restore_page_versionbrings it back. The restore is a new version, and the
text it replaces stays in the history. move_pagemoves a page and its children under another page
(parent_page), to the top level of its space (top_level: true), or into
another space of the same workspace (space). The server enforces the
same-workspace rule, and space-scoped tokens stay inside their own space.- Trash tools.
list_trashlists the deleted pages in a space that can
still be restored, with how many child pages went with each and how long the
trash keeps them.restore_pagebrings one back by UUID (deleted pages can't
be found by path) and reports a changed slug or a move to the top level. search_docsandsemantic_searchtake an optionalspaceto search one
space of the workspace instead of all of it. The REST API already supported
this.
Changed
delete_pageno longer says deletion is permanent. AgentDocs moves deleted
pages to the trash, andrestore_pagecan bring them back.update_pagepoints to the page history tools instead of saying every
update creates a new version (saves within ten minutes are kept as one).move_page,delete_pageandrestore_pageclear the cached page paths, so
a long-running local session looks a path up again after it may have
changed. Before, a path cached before a delete kept pointing at the trashed
page; with moves, an old path could have reached the moved page even after a
new page took that path.- README: setup leads with the hosted endpoint and OAuth sign-in. Most apps
(Claude, ChatGPT, Grok, Grok Bot, Cursor, VS Code, Claude Code, Codex, Gemini
CLI, Zed, opencode, Devin Desktop) now connect tohttps://agentdocs.eu/mcp
with no token: add the URL and sign in. The README gives the steps for each,
then the token route, then this stdio package. It no longer says AgentDocs
lacks OAuth, gives the hosted endpoint its real tool count (33 with this
release: the 25 here plus eight collaboration tools), and describes space tokens by their current
permissions (Read only, Read and propose edits, Read and edit directly).
README only; no code change. - README: ChatGPT and Grok are now listed as tested end to end, alongside
Claude, Claude Code and Grok Bot.
v0.10.5 — upload_image checks a local file's size before reading it
Fixed
upload_imagepathchecks the file before reading it. The path was read
whole withreadFile()and only then compared to the 5 MB cap, so a path at a
multi-gigabyte file was buffered in memory first, and/dev/zero(a device
that never reaches end of file) was read until the process ran out of memory.
The file is now opened non-blocking andfstated on the same descriptor: a
directory, device or FIFO is refused as "not a regular file", a file over the
cap is refused from its size, and the read is bounded to that size, so a file
that grows during the read is refused rather than read past the cap. This only
affects the stdio binary; the remote surface never reads paths.
Changed
- CI and CodeQL checkouts set
persist-credentials: false, soGITHUB_TOKENis
not left in the runner's git config for later steps (neither workflow pushes). - CI runs the unit tests on Node 20, 22, 24 and 26 instead of 20 only. That
surfaced a test that failed on 24 and 26: from Node 24,node:http's server
merges writes made in the same tick into one chunk, so the "one-byte HTTP
chunks" test was no longer sending one-byte chunks. It now writes the chunked
framing over raw TCP.fetchImageitself was unaffected: the client still
emits one event per chunk on every version, so its event cap still applies.
v0.10.4 — bounded, connect-time-guarded source_url fetch
(0.10.3 is skipped deliberately — the Glama listing already consumed that number;
see docs/PUBLISHING.md.)
Security
upload_imagesource_urlno longer buffers an unbounded response. The
fetch read the whole body witharrayBuffer()and only then compared it to
the 5 MB cap, so a URL pointing at a receiver that streams gigabytes was held
entirely in memory first. On the remote surface this code runs inside the
AgentDocs backend onPOST /mcp, i.e. in the one process serving every
tenant. The body is now read chunk by chunk and the connection is cut at the
cap; a declaredContent-Lengthover the cap is refused before any body is
read. Bytes are copied into one preallocated buffer rather than kept as one
Buffer per chunk — a 5 MB body sent as one-byte HTTP chunks had been measured
at ~1 GB of heap — and a response fragmented beyond anything an image
transfer produces is refused outright. A reply that ends without a response
(a101 Switching Protocols, for instance) now fails promptly instead of
leaving the tool call pending.- The private-address check now runs at connect time. Previously the
hostname was resolved and checked, and then globalfetchresolved it again
on its own — a TTL-0 record could answer public for the check and private for
the connection (DNS rebinding). The request now goes throughhttp.request
with a guardedlookupthat refuses the address the socket is actually about
to use, and IP literals are checked directly sincelookupis skipped for
them. The range list moved tonet.BlockListand now also covers
IPv4-mapped IPv6 spellings (::ffff:127.0.0.1), carrier-grade NAT
(100.64/10),0.0.0.0/8,192.0.0.0/24,198.18.0.0/15, multicast and
reserved ranges, plus the IPv4-embedding IPv6 transition prefixes (NAT64,
6to4, Teredo, IPv4-compatible), site-local and the discard prefix. - Ports outside HTTP and credentials in the URL are refused.
fetch()did
both implicitly (its "bad port" list; it rejectsuser:pass@); the direct
http.requestpath does neither, so they are checked explicitly. Connection
errors are reported generically so the tool cannot be used to probe ports
from the server's address.
Found by an external static scan of the AgentDocs backend on 2026-10-08, which
fixed the same two patterns in the backend's webhook delivery the same day.
Changed
- Redirects on
source_urlstill are not followed; the error now says so
instead of surfacing fetch's genericTypeError. - Dropped the pre-connect DNS round trip — the connect-time check supersedes it.
- Responses are requested uncompressed (
Accept-Encoding: identity); an image a
server will only serve gzip-encoded now fails the format check rather than
being decompressed. Image formats are already compressed, so this is rare.
v0.10.2 — dependency security release
Dependency-only release; no tool or behaviour changes.
Security
- fast-uri 3.1.5 → 3.1.7 (transitive, runtime) — clears four advisories:
SSRF via malformed IPv6 and via repeated hostname, host confusion via
percent-encoded scheme normalisation and via skipped IDN canonicalisation. - qs 6.15.2 → 6.16.0 (transitive, runtime) — array-limit bypass via
bracket-key comma parsing.
Changed
- zod 4.4.3 → 4.5.4, @types/node 26.2.0 → 26.4.1.
npm audit is clean (dev and runtime). Published so that clients running
npx agentdocs-mcp — and the AgentDocs backend, which imports this package for
its remote /mcp endpoint — stop carrying the vulnerable versions.
v0.10.1 — image handling fixes and clearer upload guidance
Follow-ups from verifying 0.10.0 against production, and from watching an agent
actually try to use it.
Fixed
get_page include_imagescould return an HTML page as an image. A deleted
or dangling/api/uploads/reference does not 404 — the app's catch-all answers
200 text/html— soresponse.okwas true and a 22 KB HTML page was base64'd
into the model's context undermimeType: text/html. The content type is now
checked: anything that isn'timage/*is skipped and explained in
image_notes. This matters more since 0.10.0 shipped a delete endpoint, which
makes dangling references routine rather than rare.datanow accepts adata:image/png;base64,...URI, not only bare base64.
Agents reach for the URI form naturally; previously the whole string was decoded,
produced garbage, and failed with a misleading "unsupported format" error. That
error message now also names the likely causes.- Dropped
absolute_urlfrom the upload result. On the remote surface
client.baseUrlis a synthetic self-base that nothing dials, so the field
rendered ashttp://127.0.0.1:3000/...— a URL an agent would follow and fail
on. The relativeurlandmarkdownare what belong in a page.
Changed
upload_image's description now explains how to supply an image, because
field reports showed agents getting stuck here. It states the accepted formats
and size up front, describes each source and when it is usable, and names the
trap directly: an image you have only viewed (a screenshot another tool
returned) cannot be re-encoded from what you see — you saw pixels, not bytes, so
you need the actual file. The stdio and remote surfaces give different advice,
sincepathonly exists on one of them.
v0.10.0 — agents can attach and read images
Added
upload_image— agents can finally attach images. Until now an agent could
write a page about a screenshot but had no way to include it: the REST API had
POST /api/uploads, and none of the 18 tools wrapped it. Takespath(stdio
only — see below),source_url, or base64data; returns the URL plus
ready-to-paste Markdown. Format is identified from magic bytes rather than the
filename, and SVG is refused because the server rejects it as a script-injection
vector. Uploads count against the workspace's image storage quota, so an
over-quota call surfaces the usual tier-limit message with the upgrade path.get_pagegainedinclude_images. The other half of the same problem:
get_pagereturns Markdown, so an image on a page reached the reader as
— a string it could not see. Withinclude_images: true
the embedded images come back as MCP image content blocks (max 5). Off by default
so ordinary reads stay cheap. Only AgentDocs-hosted/api/uploads/URLs are
fetched; arbitrary URLs found in page content are deliberately left alone.
Security
ToolContext.capabilities.localFilesgates local file access. These tool
definitions are shared with AgentDocs' backend, which registers them per request
onPOST /mcp.upload_image'spathargument reads the filesystem of whatever
machine the server runs on — correct for stdio, arbitrary file read on the
production host if honoured remotely. The stdio entry point sets it true; the
remote endpoint sets it false; an absentcapabilitiesobject defaults to
refusing paths, so a forgetful caller fails closed. Covered by tests on both
sides of the boundary.source_urlrefuses URLs resolving to loopback, private, or link-local
addresses (including the cloud metadata endpoint) — on the remote surface an
unguarded fetch would be a server-side request forgery primitive inside
AgentDocs' own network.