From ec046d4bfc5b0b6bbc7e01f196bb5162f7e8ffd6 Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Wed, 9 Sep 2026 10:04:19 -0400 Subject: [PATCH 1/2] docs: fix stale Algolia description and wrong tool-name reference search_mapbox_docs_tool's README entry still said it used Algolia full-text search, left over from before that dependency was replaced with the self-contained llms.txt index (throttling under the hosted server's shared free-tier quota was the reason for the migration). Separately, get_document_tool's own description - the text shown to the LLM, not just docs - referenced a tool named get_latest_mapbox_docs_tool, which doesn't exist and was actively misdirecting tool-chaining behavior. Fixed to reference the real search_mapbox_docs_tool. --- CHANGELOG.md | 1 + README.md | 2 +- src/tools/get-document-tool/GetDocumentTool.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 768afb2..3f9c55e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased +- docs: fix two stale tool descriptions left over from the Algolia-to-`llms.txt` search migration. `search_mapbox_docs_tool`'s README entry still said it used "Algolia full-text search" — that was removed a while back (see the "Replace Algolia search with self-contained llms.txt search" entry below) and it now searches the self-hosted `llms.txt` index. Separately, `get_document_tool`'s own description (the text shown to the LLM, not just docs) referenced a tool named `get_latest_mapbox_docs_tool`, which doesn't exist — it should have said `search_mapbox_docs_tool`, and was actively misdirecting tool-chaining behavior. - fix: startup/shutdown/error logging messages now actually reach clients. The `McpServer` never declared the `logging` capability, so every `sendLoggingMessage` call (including the existing "server started"/"shutting down"/"Fatal error" messages) was a silent no-op regardless of when it was sent. Declared `logging: {}` in the server's capabilities. - feat: the server now identifies which MCP client connected to it. `server.server.getClientVersion()` (populated from the `clientInfo` sent in the client's `initialize` request) is now logged on connect, e.g. `Client identified as: claude-ai v1.0.0`. Reading it required moving the read to a `server.server.oninitialized` callback rather than right after `server.connect()`, since `getClientVersion()` is only populated once the client's `initialize` request has actually been processed, which is not guaranteed by the time `connect()`'s promise resolves. Also recorded as `mcp.client.name`/`mcp.client.version` on every subsequent tool-execution trace span (`withToolSpan`), so OTel-backed traces can be filtered or grouped by client. Matches the equivalent changes landing in `@mapbox/mcp-server` and `@mapbox/mcp-devkit-server`. - chore: bump `@modelcontextprotocol/sdk` to `1.30.0`. Verified this version's own `SUPPORTED_PROTOCOL_VERSIONS` constant does not include the `2026-07-28` spec revision (https://blog.modelcontextprotocol.io/posts/2026-07-28/) — this repo uses neither elicitation nor sampling, so that migration is lower-priority here regardless; tracked in #40. diff --git a/README.md b/README.md index b6fae4e..eb24579 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Example prompts: **`batch_get_documents_tool`** — Fetches multiple Mapbox documentation pages in a single call (max 20). More efficient than calling `get_document_tool` multiple times. Failed pages include an error message rather than failing the whole batch. -**`search_mapbox_docs_tool`** — Searches Mapbox documentation using Algolia full-text search and returns matching page URLs and excerpts. Use this to find relevant documentation before fetching full pages with `get_document_tool` or `batch_get_documents_tool`. +**`search_mapbox_docs_tool`** — Searches Mapbox documentation across API reference, GL JS, Help Center, Style Spec, Studio, Search JS, iOS/Android Maps and Navigation SDKs, and Tilesets, returning ranked page URLs and descriptions. Use this to find relevant documentation before fetching full pages with `get_document_tool` or `batch_get_documents_tool`. Example prompts: diff --git a/src/tools/get-document-tool/GetDocumentTool.ts b/src/tools/get-document-tool/GetDocumentTool.ts index 1269a23..37e5fcc 100644 --- a/src/tools/get-document-tool/GetDocumentTool.ts +++ b/src/tools/get-document-tool/GetDocumentTool.ts @@ -41,7 +41,7 @@ function hasAccessToken(url: string): boolean { export class GetDocumentTool extends BaseTool { name = 'get_document_tool'; description = - 'Fetch the full content of a specific Mapbox documentation page by URL. Use this after get_latest_mapbox_docs_tool to follow a link from the index and retrieve the complete page content. For fetching multiple pages at once, use batch_get_documents_tool instead.'; + 'Fetch the full content of a specific Mapbox documentation page by URL. Use this after search_mapbox_docs_tool to follow a link from the search results and retrieve the complete page content. For fetching multiple pages at once, use batch_get_documents_tool instead.'; readonly annotations = { readOnlyHint: true, destructiveHint: false, From c0aa1499ad9156a2377d2eda2d9b901220316859 Mon Sep 17 00:00:00 2001 From: Matthew Podwysocki Date: Wed, 9 Sep 2026 10:06:54 -0400 Subject: [PATCH 2/2] fix: add oninitialized to cspell word list Spellcheck has been failing on main since PR #43 merged (client identification) - it uses server.server.oninitialized, which isn't a real word and was never added to the dictionary. Unrelated to this PR's changes but fixing here since it's currently the only thing blocking CI. --- cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/cspell.json b/cspell.json index 226b354..eba1ad9 100644 --- a/cspell.json +++ b/cspell.json @@ -7,6 +7,7 @@ "mapbox", "MAPBOX", "modelcontextprotocol", + "oninitialized", "GHSA", "mxjg", "anthropics",