🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

agentdocs-mcp

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agentdocs-mcp - npm Package Compare versions

Comparing version
0.9.0
to
0.9.1
+22
-0
CHANGELOG.md

@@ -7,2 +7,24 @@ # Changelog

## 0.9.1 — 2026-08-05
### Fixed
- **The server no longer refuses to start on an unverified credential.** It
still probes `/api/auth/me` at boot to learn the credential's scope (a
space-scoped token hides the workspace-level tools), but a 401 — or an
unreachable API — now logs a warning and serves the full tool surface
instead of `process.exit(1)`.
This mattered more than it looked. The MCP handshake and `tools/list` carry
no credential of their own, and automated clients rely on that: registry
indexers (Glama, `docker/mcp-registry`'s `build --tools`) boot a server with
a *placeholder* token purely to enumerate its tools. Exiting first made this
server un-inspectable by every one of them — Glama reported it as "cannot be
installed / quality: not tested", and the Docker catalog submission had to
carry a hand-maintained `tools.json` to work around it.
The diagnosis the old fail-fast gave up isn't lost, just deferred: the first
tool call returns the same actionable 401 ("regenerate it at … and update
AGENTDOCS_TOKEN"). Verified against Glama's exact placeholder token —
18 tools listed, tool call reports the credential error.
## 0.9.0 — 2026-08-03

@@ -9,0 +31,0 @@

+20
-12

@@ -28,19 +28,27 @@ #!/usr/bin/env node

const client = new AgentDocsClient(config);
// Verify the credential up front: a bad token should fail fast with a clear
// message instead of surfacing as cryptic per-tool errors later.
let credential;
// Probe the credential to learn its scope — a space-scoped token hides the
// workspace-level tools — but NEVER refuse to start over it. The MCP
// handshake and tools/list carry no credential of their own, and automated
// clients depend on that: registry indexers (Glama, docker/mcp-registry's
// `build --tools`) boot the server with a placeholder token purely to
// enumerate its tools. Exiting here made this server un-inspectable by all
// of them — it had to ship a hand-maintained tools.json to compensate.
//
// So on a bad or unreachable credential we log, assume the full tool
// surface, and let the first actual tool call return the real API error.
// The diagnosis the old fail-fast provided is preserved, just deferred to
// the point where it costs nothing.
let credential = { type: "account" };
try {
credential = await detectCredential(client);
const scopeNote = credential.type === "space"
? ` (space-scoped: ${credential.spaceName ?? credential.spaceId} in ${credential.workspaceName ?? "?"})`
: ` (${credential.type} credential)`;
console.error(`agentdocs-mcp v${VERSION}: connected to ${config.baseUrl} as ${credential.userName ?? "unknown"}${scopeNote}`);
}
catch (err) {
if (err instanceof ApiError && err.status === 401) {
console.error(`agentdocs-mcp: ${err.message}`);
process.exit(1);
}
throw err;
const why = err instanceof ApiError && err.status === 401 ? err.message : err instanceof Error ? err.message : String(err);
console.error(`agentdocs-mcp v${VERSION}: could not verify the credential against ${config.baseUrl} — ${why}`);
console.error("agentdocs-mcp: serving the full tool surface anyway; tool calls will fail until AGENTDOCS_TOKEN is valid.");
}
const scopeNote = credential.type === "space"
? ` (space-scoped: ${credential.spaceName ?? credential.spaceId} in ${credential.workspaceName ?? "?"})`
: ` (${credential.type} credential)`;
console.error(`agentdocs-mcp v${VERSION}: connected to ${config.baseUrl} as ${credential.userName ?? "unknown"}${scopeNote}`);
const resolver = new Resolver(client, credential.type !== "space", credential.spaceId);

@@ -47,0 +55,0 @@ const ctx = { client, resolver, credential };

{
"name": "agentdocs-mcp",
"mcpName": "io.github.hoornet/agentdocs-mcp",
"version": "0.9.0",
"version": "0.9.1",
"description": "MCP server for AgentDocs (agentdocs.eu) — read, search, and write collaborative docs from any MCP client",

@@ -57,4 +57,4 @@ "license": "MIT",

"@types/node": "^26.0.1",
"typescript": "^6.0.3"
"typescript": "^7.0.2"
}
}