Skip to content

Context7: always-on library documentation (8.3.0) - #18

Merged
foursecondfivefour merged 1 commit into
mainfrom
arena/36a4d756-nerveforge
Dec 2, 2026
Merged

foursecondfivefour merged 1 commit into
mainfrom
arena/36a4d756-nerveforge

Conversation

@foursecondfivefour

Copy link
Copy Markdown
Owner

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

context7 is 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, so probe() has no server blocker 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

  • It is told. /llms.txt, /api/docs and /api/agent-prompt say library documentation is looked up before code depending on a third-party API is written — on every such task, not after a failure.
  • It is one call away. GET /api/mcp/docs lists the server's tools and connects it; POST /api/mcp/docs/call calls one without a prior listing, which is the request an agent makes after a reconnect when its cache is empty.
  • An IDE agent sees it without being told. The bridge's own MCP server gained a ninth tool, docs. It discovers Context7's tool name and its argument names from inputSchema, so get-library-docs / query-docs and context7CompatibleLibraryID / libraryId all 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/dashboard raises the rate limits and stays optional; if configured it travels as an Authorization header 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 . — clean
  • scripts/check_docs.py — 19 EN/RU pairs agree
  • scripts/gen_api_doc.py --check, scripts/bump_version.py --check — clean
  • Offline run of ensure_always_on() returns {"ok": false, "error": "cannot connect…"} and the rest of the API keeps working, as intended.

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>
@foursecondfivefour
foursecondfivefour merged commit 90a3876 into main Dec 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant