Repository navigation
Context7: always-on library documentation (8.3.0) - #18
Merged
Merged
Conversation
The bridge has spoken MCP in both directions since 8.2.0. The one server it should never have to be asked about is the one that knows what the libraries on this machine look like today, so `context7` becomes a preset, the only preset that opens itself, and the agent is told to use it rather than merely allowed to. - registry: `Preset.hosted` (no local process can be missing) and `Preset.auto_connect`; Context7 preset at `https://mcp.context7.com/mcp` over Streamable HTTP, no token, no install. `probe()` no longer reports a `server` blocker for hosted presets. - mcpservice: `always_on()`, `ensure_always_on()` (opens on first use, reports failures instead of raising), `docs()`, `always_on` in the status payload, and an `mcp.reconnect` audit line when a dropped session is reopened. - routes: `GET /api/mcp` opens the always-on server; `GET /api/mcp/docs` and `POST /api/mcp/docs/call` reach it without a prior listing. - mcpserver: a ninth tool `docs` that discovers Context7's tool name *and* argument names from `inputSchema`, so `get-library-docs`/`query-docs` and `context7CompatibleLibraryID`/`libraryId` both work without either being in the code. - system: `/llms.txt`, `/api/docs` and `/api/agent-prompt` tell the agent to look up library documentation before writing code against a third-party API. - docs: TOOLKIT, ARCHITECTURE, AGENTS, README, generated API reference and the Russian mirrors; CHANGELOG 8.3.0 in both languages. 1687 tests pass, ruff clean, check_docs and gen_api_doc --check clean. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The bridge has spoken MCP in both directions since 8.2.0. This makes the one server it should never have to be asked about on by default:
context7, current documentation for libraries and frameworks, over HTTP, with no token and no install.Native support, not a manual setup
context7is a shipped preset (https://mcp.context7.com/mcp, Streamable HTTP), so there is nothing to configure and no key to paste. Two new fields carry what makes it different from the other twelve:Preset.hosted— it points at somebody else's HTTPS endpoint, soprobe()has noserverblocker to report and no runtime to look for.Preset.auto_connect— it is opened without a click, on the first read of the MCP state, and failures come back in the payload instead of raising (a bridge with no internet is a normal state).The agent uses it by default, in three places
/llms.txt,/api/docsand/api/agent-promptsay library documentation is looked up before code depending on a third-party API is written — on every such task, not after a failure.GET /api/mcp/docslists the server's tools and connects it;POST /api/mcp/docs/callcalls one without a prior listing, which is the request an agent makes after a reconnect when its cache is empty.docs. It discovers Context7's tool name and its argument names frominputSchema, soget-library-docs/query-docsandcontext7CompatibleLibraryID/libraryIdall work without either being hard-coded — those names have moved between releases, and a name in this repository would be a bug waiting for someone else's release.A free key from
context7.com/dashboardraises the rate limits and stays optional; if configured it travels as anAuthorizationheader and is redacted in the audit log like every other secret.Docs and counts
TOOLKIT, ARCHITECTURE, AGENTS, README, the generated API reference and every Russian mirror; CHANGELOG 8.3.0 in both languages; presets 12 → 13, the bridge's MCP tools 8 → 9, routes 61 → 63, tests 1660 → 1680.
Verification
python3 -m unittest discover -s tests— 1687 tests, OK (skipped=1)ruff check .— cleanscripts/check_docs.py— 19 EN/RU pairs agreescripts/gen_api_doc.py --check,scripts/bump_version.py --check— cleanensure_always_on()returns{"ok": false, "error": "cannot connect…"}and the rest of the API keeps working, as intended.