agentdocs-mcp
Advanced tools
+23
-0
@@ -7,2 +7,25 @@ # Changelog | ||
| ## 0.8.0 — 2026-07-26 | ||
| ### Added | ||
| - `Config.fetchImpl`: an injectable transport for API calls, defaulting to the | ||
| global `fetch`. | ||
| Motivated by a real production failure. AgentDocs' remote MCP endpoint runs | ||
| *inside* the process that serves the REST API and originally reached it over | ||
| loopback HTTP. On the production platform that process cannot reach itself — | ||
| neither at `127.0.0.1:$PORT` nor on a second loopback listener it binds | ||
| itself — so the transport worked (`initialize`, `tools/list`) while every | ||
| actual tool call failed with "Could not reach http://127.0.0.1:3000". | ||
| With `fetchImpl`, the host can dispatch requests straight into its own HTTP | ||
| app in-process. Permissions, tier limits, provenance and usage metering still | ||
| run in the real middleware, because it is the same app handling the request — | ||
| but there is no network hop to fail. | ||
| ### Changed | ||
| - No behavioural change for the stdio server or any existing consumer: | ||
| `fetchImpl` is optional and the default remains the global `fetch`, including | ||
| the existing cold-start retry. | ||
| ## 0.7.0 — 2026-07-26 | ||
@@ -9,0 +32,0 @@ |
+3
-2
@@ -103,4 +103,5 @@ /** | ||
| async fetchWithColdStartRetry(url, init) { | ||
| const doFetch = this.config.fetchImpl ?? fetch; | ||
| try { | ||
| return await fetch(url, { ...init, signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS) }); | ||
| return await doFetch(url, { ...init, signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS) }); | ||
| } | ||
@@ -112,5 +113,5 @@ catch (err) { | ||
| throw err; | ||
| return await fetch(url, { ...init, signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS) }); | ||
| return await doFetch(url, { ...init, signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS) }); | ||
| } | ||
| } | ||
| } |
+11
-0
@@ -17,3 +17,14 @@ export interface Config { | ||
| authHeader?: string; | ||
| /** | ||
| * Transport used for API calls. Defaults to the global `fetch`. | ||
| * | ||
| * AgentDocs' own backend hosts the remote endpoint *inside* the same process | ||
| * that serves the REST API, and injects a dispatcher that feeds requests | ||
| * straight into its Express app. That keeps every permission check, tier | ||
| * limit and usage counter running in the real middleware while removing any | ||
| * dependence on the process being able to reach itself over the network — | ||
| * which it could not do on the production platform. | ||
| */ | ||
| fetchImpl?: (url: URL | string, init?: RequestInit) => Promise<Response>; | ||
| } | ||
| export declare function loadConfig(): Config; |
+2
-2
| { | ||
| "name": "agentdocs-mcp", | ||
| "mcpName": "io.github.hoornet/agentdocs-mcp", | ||
| "version": "0.7.0", | ||
| "description": "MCP server for AgentDocs (agentdocs.eu) — read, search, and write collaborative docs from any MCP client", | ||
| "version": "0.8.0", | ||
| "description": "MCP server for AgentDocs (agentdocs.eu) \u2014 read, search, and write collaborative docs from any MCP client", | ||
| "license": "MIT", | ||
@@ -7,0 +7,0 @@ "author": "Jure (https://agentdocs.eu)", |
60454
3%864
1.41%1
-50%