Universal Docs MCP
Fetches version-pinned README documentation from GitHub repositories for supported package sources, with a caveat that a GitHub ref alone is not proof of published-package identity.
Fetches version-aware npm package metadata and README documentation from the npm registry, resolving stable releases and exact versions with cache and version-binding metadata.
Fetches version-aware Python package metadata and README documentation from PyPI, resolving stable releases and exact versions with cache and version-binding metadata.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Universal Docs MCP Fetch the README for requests 2.32.3 from PyPI"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Universal Docs MCP
A local, read-only MCP server for version-aware package READMEs and registry descriptions from PyPI, npm, and crates.io/GitHub. It helps coding agents use project-relevant documentation rather than assume their training data matches an installed dependency.
This source tree is 0.4.0rc2, a local release candidate. Acceptance is recorded against the exact commit and artifact, not inferred from this version label. The previously reviewed/deployed build remains 0.3.0rc2. Do not assume the public repository or PyPI contains this revision. It is not a full API-documentation crawler or symbol-search service.
Cross-harness work is tracked in the implementation spec. The freshness-aware universal-docs-preflight CLI is implemented as a source candidate; opt-in per-harness context adapters are implemented. Exact-object delivery evidence is separate from activation into user profiles. July-2026 server conformance is not claimed.
What it does
Resolves stable releases, excluding prereleases and known yanked releases. A package with no eligible stable release is reported explicitly.
Fetches an exact version when supplied. Never silently replaces it with default-branch documentation.
Caches raw documentation separately from compact output. Exact-version, TTL-valid cache hits do not require a registry connection.
Returns source URL, acquisition timestamp, cache status, and a version-binding caveat. A GitHub ref is not proof of published-package identity.
Provides paginated section outlines and bounded, code-preserving compact content.
Optionally reads supported manifests inside one explicitly configured project root. URL/Git/path references are omitted wholesale instead of exposing embedded credentials.
Bounds network bodies, cache storage, concurrent tool work, and tool response payloads; errors remain machine-readable.
Related MCP server: voyager
Install this checkout
Requires Python 3.10 or newer. Use a dedicated environment; no service or HTTP port is required.
python3 -m venv .venv
.venv/bin/python -m pip install .The installed entry point is .venv/bin/universal-docs-mcp. Use its absolute path in your MCP client configuration; it does not need the repository as its working directory.
For an audited/reproducible development installation, install the hash-locked dependencies before the local source:
.venv/bin/python -m pip install --require-hashes -r requirements-dev.lock
.venv/bin/python -m pip install --no-deps --no-build-isolation .The package supports MCP SDK >=1.26,<2. The SDK v2 API is not compatible with this server. Runtime dependencies have compatibility upper bounds; the standard installation still resolves within those ranges rather than reproducing the lock. The lockfile records the tested dependency set; it is not a promise that dependencies never need security updates.
Connect a client
Use your client's documented MCP configuration location. A conventional stdio configuration is:
{
"mcpServers": {
"universal-docs": {
"command": "/absolute/path/to/.venv/bin/universal-docs-mcp"
}
}
}Registry tools work without filesystem access. To enable manifest reading, add an explicitly trusted project directory to that server's environment:
{
"UNIVERSAL_DOCS_PROJECT_ROOT": "/absolute/path/to/project",
"UNIVERSAL_DOCS_CACHE_DIR": "/absolute/path/to/cache"
}Do not point the root at your home directory. Root-relative manifest paths are supported. On POSIX, descriptor-relative opens reject symlinks, escapes, directories, and special files. The manifest tool fails closed on platforms without the required secure open primitives; that currently excludes Windows. Registry tools do not require POSIX file access.
Tools
Tool | Purpose |
| Public registry metadata, including |
| Versioned section map; |
| Compact documentation, one |
| Cataloged versioned official docs and |
| Supported manifest/lockfile declarations under |
| Entry counts and |
Fresh preflight CLI
The package also installs .venv/bin/universal-docs-preflight. It reads one
strict JSON request from stdin and writes exactly one JSON object to stdout; it
does not read a project manifest or execute a package manager. The canonical
request shape is:
{
"package": "requests",
"ecosystem": "python",
"selection": "requested",
"requested_version": "2.32.3",
"query": "timeouts and retries",
"section_ids": ["usage"],
"context_max_bytes": 12000,
"freshness_mode": "require_check"
}Use selection: "latest" without a version, and choose one explicit
freshness_mode: require_check bypasses document cache, allow_cache may
reuse a valid exact document (but latest still checks registry metadata), and
allow_stale may return a retained exact record after an upstream check
fails, explicitly labeled stale even when its cache TTL has not elapsed. Fallback
is bounded to seven days of source age; quotas/pruning mean retention is not
guaranteed. A response's receipt keeps target_version, requested_version,
installed_version: null/installed_resolution: "unknown", and
latest_observed separate. It also reports fetched_at, successful
checked_at/latest_checked_at, cache/stale/unknown state, age, SHA-256,
source URL, and version binding. context is query/section-selected,
UTF-8-byte bounded, and labeled untrusted; selection.no_match is explicit
instead of silently dumping the document. Missing meaningful query/sections
returns an outline and no context. Exit status is 0 for usable context,
1 for a retrieval miss/unavailable response, and 2 for invalid input.
Package tools accept ecosystem aliases: Python (python, pypi, pip), JavaScript/TypeScript (javascript, typescript, npm, js, ts), Rust (rust, cargo, crate). Omit it to try applicable registries in that order; specify it when a package name exists in multiple ecosystems.
Recommended workflow
Read the project's supported manifest, if that access is enabled.
Use a returned
pinnedvalue only whenregistry_lookupis true. A range is not the installed version, and latest may be outside that range. Consult the actual lockfile/package manager when no exact pin is available.Call
get_docs_outline, for example with{"package":"requests","ecosystem":"python","version":"2.32.3"}.Follow
next_offsetfor another outline page, or request a returned section slug usingget_package_docswith the same package/version.Inspect
version_binding,fetched_at, andtruncated. Never execute a clipped example as if it were complete.
Manifest support and limits
Python: PEP 508 requirement lines in
requirements*.txt/constraints*.txt;[project].dependenciesinpyproject.toml; exact pins inuv.lock,poetry.lock, and read-only.venv/venv*.dist-info/METADATA.JavaScript/TypeScript:
dependenciesanddevDependenciesinpackage.json; exact pins inpackage-lock.json,pnpm-lock.yaml, and read-onlynode_modules/*/package.json.Rust: top-level
dependenciesanddev-dependenciesinCargo.toml; package records inCargo.lock.Proactive hooks:
universal-docs-command-hook --harness {claude,codex} --dynamicand the Hermes preflight plugin (pre_llm_call+post_tool_callerror hook) resolve exact installed/locked versions across Python, JS/TS, and Rust, fetch up to 3 relevant packages usingallow_cache+ HTTPETag/304revalidation, and fall back to read-only local.pyi/.d.tstype stubs when upstream READMEs miss requested symbols.This is not a package manager: no installation, resolution, recursive requirements includes, shell execution, Poetry groups, or workspace traversal. Unsupported requirements syntax returns an error instead of incomplete success. Unlisted manifest sections are not enumerated.
Cargo bare versions are ranges. Git/path/workspace/private-registry declarations are not public-registry pins. Python extras and environment markers are preserved but not evaluated.
Non-version references are returned as
[redacted]withspec_redacted: trueandregistry_lookup: false. URL/Git/path-like dependency names are rejected rather than returned as identities. This is a supported-name syntax check, not general-purpose secret detection in otherwise valid names or prose; only grant access to trusted manifests.
Versioned official-source candidate
The preflight CLI also accepts one fixed catalog entry: mcp-tools at
2026-07-28, fetched as Markdown from the canonical MCP specification site.
The official request is intentionally narrower than a package request:
{
"source_id": "mcp-tools",
"selection": "requested",
"requested_version": "2026-07-28",
"query": "tools/list",
"context_max_bytes": 12000,
"freshness_mode": "require_check"
}source_id and the exact requested version are resolved through the immutable
catalog; arbitrary URLs, latest, and package/ecosystem aliases are rejected.
The request uses the shared selector and emits the same bounded JSON preflight
shape. Its receipt keeps package and ecosystem null, records source_id,
uses installed_resolution: "not_applicable", and records the exact .md URL,
official_markdown source, versioned_url binding, full-source SHA-256, and
acquisition/freshness timestamps. allow_cache may reuse only the exact
snapshot; allow_stale may return a bounded seven-day snapshot after an
upstream failure, explicitly labeled stale. Missing or irrelevant source
content returns empty context and a nonzero CLI status; no version is guessed.
fetch_official_source remains a library-level catalog fetcher and never
expands the generic registry URL allowlist.
Guarantees and limits
Documentation coverage: READMEs/registry descriptions, not full API sites, symbol signatures, or all programming languages. Rust exact docs.rs retrieval is not implemented.
Version binding:
registry_versionmeans a version-specific registry endpoint;unverified_git_refmeans a GitHub README at that version string. Git refs can move, tags may bev-prefixed, and monorepos may not match. A miss does not trigger default-branch fallback.Freshness:
fetched_atis local acquisition time, not upstream publication time. Cache TTL is 24 hours.metadata_refreshed: falsemeans an exact cache hit did not contact the registry. A previous latest lookup also establishes an exact-version alias. Auto-detection reuses only an established namespace association; it never guesses a registry from unrelated cached packages. Omitted versions are resolved anew before raw-cache lookup.force_refresh: truebypasses the relevant cache; it cannot certify upstream accuracy.Budgets:
max_tokensis a four-characters-per-token content estimate, not model-token accounting. Outlines have at most 100 entries per page; compact maps/omitted-section lists expose totals when capped. Long display headings are marked truncated. The serialized MCPCallToolResulthas a separate 128 KiB cap, including both text and structured representations and JSON escaping; the transport envelope/request ID is outside that cap. Oversized results returnresponse_too_large; request fewer outline entries or a smaller content budget.Resource limits: four simultaneous tools, 45-second tool deadline, 20-second per-request deadline, 8 MiB upstream body limit, 1 MiB document/manifest limits, at most 1,000 heading sections per document. Network redirects, inherited proxies, and unsolicited compressed responses are refused. Package tools fetch only the fixed public registry/GitHub API hosts; the separate official-source catalog permits only its exact reviewed URL.
Cache limits: 256 entries, 2 MiB per encoded value, 32 MiB total logical value bytes. Writes prune expired/oldest entries. These are logical quotas, not a byte-perfect SQLite-file/RSS guarantee; existing database pages can be reused without shrinking the file. Cache failure degrades to uncached retrieval, not false success.
Trust: fetched content is untrusted data, not agent instructions. Tool availability does not guarantee an agent uses it. This is a single-user local stdio service, not an authenticated multi-tenant network service.
Each tool advertises a strict outputSchema for successful results and errors. Outbound payloads are validated before SDK handling; invalid results become invalid_tool_result without reflecting their contents.
Tool failures set MCP isError: true and return the same JSON object in text and structured content. Examples include invalid_arguments, manifest_access_disabled, manifest_error, package_not_found, documentation_not_found, no_stable_release, upstream_unavailable, upstream_invalid, server_busy, and tool_timeout. found: null denotes unknown/unavailable, not proven absence. Repeatedly retrying a permanent validation error will not help.
Development and verification
.venv/bin/python -m pytest -q
.venv/bin/python -m ruff check src tests scripts
.venv/bin/python -m ruff format --check src tests scripts
.venv/bin/python -m build --no-isolationThe default suite blocks network sockets and includes a real subprocess/stdio client test. Public-registry tests are explicitly opt-in:
UNIVERSAL_DOCS_LIVE_TESTS=1 .venv/bin/python -m pytest -m live -q
.venv/bin/python scripts/smoke.py --live --output smoke.jsonRun the smoke script with a fresh wheel-installed interpreter from outside the repository before release. CI builds and installs a wheel and runs the offline suite across Python 3.10–3.14; remote CI results are not implied by a local pass. See hardening acceptance checks, security boundaries, and changelog.
License
MIT.
Available Tools
6 toolscache_statsARead-onlyIdempotent
Inspect cache entry counts and availability.
Inputs: no named parameters. Returns: object
get_docs_outlineARead-onlyIdempotent
Inspect untrusted versioned README sections with offset/limit pagination; use a returned slug with get_package_docs.
Inputs: package (required), limit, offset, version, +2 more. Returns: object
get_official_docsBRead-onlyIdempotent
Fetch cataloged, versioned official documentation as untrusted data, optionally searching relevant sections.
Inputs: version (required), source_id (required), query, section, +2 more. Returns: object
get_package_docsBRead-onlyIdempotent
Fetch untrusted README/registry descriptions at an exact version or latest stable; query searches relevant sections. Check version_binding and truncation before using examples.
Inputs: package (required), query, section, version, +3 more. Returns: object
get_package_infoBRead-onlyIdempotent
Get public PyPI/npm/crates.io package metadata and latest stable version (null if none).
Inputs: package (required), ecosystem, force_refresh. Returns: object
get_project_dependenciesBRead-onlyIdempotent
Read a supported manifest under the configured root or an MCP workspace root. Nonregistry references are redacted; ranges are not installed pins.
Inputs: manifest_path (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct targets: package metadata (get_package_info), package README (get_package_docs), manifest reading (get_project_dependencies), and cache introspection (cache_stats). The only potential confusion is get_official_docs vs get_package_docs, since both return documentation, but descriptions distinguish cataloged official docs from registry/README content. get_docs_outline is clearly framed as a pagination helper for get_package_docs.
Five of six tools follow a consistent snake_case get_<resource> pattern (get_official_docs, get_package_info, get_package_docs, get_docs_outline, get_project_dependencies). cache_stats is the sole deviation, using a noun-only form with no verb, but the overall convention remains predictable and readable.
Six tools is well-scoped for a documentation-retrieval server. Each tool earns its place: docs fetching, metadata, README content, outline pagination, dependency reading, and cache inspection cover distinct needs without redundancy.
The read-only documentation domain is well covered: metadata, versioned docs, README outlines, dependencies, and cache status. Minor gap: there is no discovery tool to list which packages/docs are cataloged or available, which an agent would need before calling the getters, but this is workable if the agent already knows the package name.
Maintenance
Related MCP Connectors
Live npm/PyPI/crates facts + README fetch for agents. Settle-proven 2026-11-02 (SELF-PROOF).
Real-time package and vulnerability data (Python, npm, Cargo, Go, and more) for AI coding agents.
Live npm and UNPKG data for AI agents: resolution, audits, import maps, malware/CVE checks.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Related MCP Servers
- AlicenseAqualityBmaintenanceA local MCP server that fetches official library documentation (llms.txt-first), caches it to disk, and serves relevant sections to coding agents offline with deterministic retrieval.37 npmMIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables coding agents to safely verify npm/PyPI packages, retrieve cited briefs, discover GitHub repos, and fetch canonical docs, with fail-closed OSV vulnerability checks and injection-hardened output.Apache 2.0
- AlicenseAqualityBmaintenanceA Model Context Protocol server that provides AI coding agents with real, live, source-cited documentation for npm, PyPI, and Cargo packages, including READMEs, metadata, vulnerability checks, and package search.577 npmMIT
- AlicenseAqualityDmaintenanceA local-first MCP server for web search and documentation fetching, providing free DuckDuckGo search, URL-to-markdown conversion, and library docs from npm, PyPI, crates.io, Go, and GitHub with caching.5MIT