You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This downloads Python's `objects.inv` files, clones CPython docs sources, runs
147
-
`sphinx-build -b json`, and writes an SQLite index to your local cache. Expect
148
-
the first build to take several minutes.
145
+
The first build downloads Python's `objects.inv` files, clones CPython docs
146
+
sources, runs `sphinx-build -b json`, and writes an SQLite index to your local
147
+
cache. It can take several minutes.
149
148
150
149
## Configure your MCP client
151
150
@@ -246,20 +245,17 @@ command = "uvx"
246
245
args = ["python-docs-mcp-server"]
247
246
```
248
247
249
-
## How quality is verified
250
-
251
-
The repo makes quality visible with reproducible checks instead of relying on
252
-
marketing claims.
248
+
## Quality checks
253
249
254
250
- CI runs `ruff`, `pyright`, and `pytest` on macOS and Linux for Python 3.12
255
251
and 3.13
256
-
- subprocess-based stdio hygiene and smoke tests protect the MCP protocol pipe
257
-
- packaging tests verify the wheel contents and CLI entry points
258
-
-curated retrieval regression tests cover exact symbol hits, version behavior,
252
+
- subprocess-based stdio and smoke tests cover the MCP protocol pipe
253
+
- packaging tests check the wheel contents and CLI entry points
254
+
- retrieval regression tests cover exact symbol hits, version behavior,
259
255
missing symbols, truncation, and local-version defaults
260
-
- manual MCP QA is documented in
256
+
- manual MCP QA lives in
261
257
[`.github/INTEGRATION-TEST.md`](.github/INTEGRATION-TEST.md), with MCP
262
-
Inspector as the fast-feedback loop and Claude/Cursor as real-client checks
258
+
Inspector for local checks and Claude/Cursor for real-client checks
263
259
264
260
Contributor commands and validation steps live in
265
261
[`CONTRIBUTING.md`](CONTRIBUTING.md).
@@ -274,25 +270,23 @@ The server currently exposes five MCP tools:
274
270
|`get_docs`| Retrieve a specific documentation page or section by slug and optional anchor. Returns markdown content with budget-enforced truncation and pagination. Retrieved results are cached on disk by Python docs version and request identity. |
275
271
|`lookup_package_docs`| Look up official PyPI package metadata and return package-declared documentation/homepage/source URLs. This is a controlled PyPI metadata lookup, not generic web search. |
276
272
|`list_versions`| List all indexed Python versions with metadata. |
277
-
|`detect_python_version`| Detect the user's local Python version and report whether it matches an indexed documentation version. |
273
+
|`detect_python_version`| Detect the user's local Python version and report whether that version has been indexed. |
278
274
279
275
## Why not Context7 or generic docs retrieval?
280
276
281
277
Use this server when you want precise local Python docs retrieval rather than
282
278
broad web search:
283
279
284
-
- official Python docs, not scraped mirrors or mixed-source summaries
280
+
- official Python docs, not scraped mirrors or summaries
285
281
- exact symbol resolution from `objects.inv`
286
-
- Python-version-aware results across 3.10 through 3.14
287
-
- token-efficient section retrieval instead of full-page dumps
288
-
- package-declared PyPI metadata lookup via `lookup_package_docs` for
289
-
documentation, homepage, and source URLs
290
-
- local, read-only runtime behavior with no API keys
282
+
- version-aware results for Python 3.10 through 3.14
283
+
- section retrieval instead of full-page dumps
284
+
- PyPI-declared docs, homepage, and source links through `lookup_package_docs`
285
+
- local read-only runtime with no API keys
291
286
292
-
Use Context7 or a generic docs fetcher when you need broader third-party library
293
-
coverage, arbitrary web pages, or cross-framework research. This server is not a
294
-
universal docs search engine. It is a precise stdlib retrieval tool for AI
295
-
coding agents.
287
+
Use Context7 or a generic docs fetcher for third-party libraries, arbitrary web
288
+
pages, or framework research. This server is not a universal docs search engine;
289
+
it is a focused stdlib retrieval tool for AI coding agents.
The cache stores completed `get_docs` results, including page/section content,
307
-
for the resolved Python docs version plus request identity (`slug`, optional
308
-
`anchor`, `max_chars`, and `start_index`). Cache misses fall back to the normal
309
-
local index retrieval path and then write the retrieved result.
300
+
The cache stores completed `get_docs` results for the resolved Python docs
301
+
version plus request identity (`slug`, optional`anchor`, `max_chars`, and
302
+
`start_index`). Cache misses use the normal local index retrieval path and then
303
+
write the result.
310
304
311
305
Cache entries are also scoped to a fingerprint of the local `index.db` file
312
306
(path, size, and modification timestamp). If you rebuild or replace the local
313
-
docs index, older entries are ignored automatically instead of being returned
314
-
for the new index generation. Deleting `retrieved-docs-cache.sqlite3` is safe;
315
-
it only removes cached retrieval results, not the docs index.
307
+
docs index, older entries are ignored automatically. Deleting
308
+
`retrieved-docs-cache.sqlite3` is safe; it removes cached retrieval results, not
309
+
the docs index.
316
310
317
311
## PyPI package docs lookup
318
312
@@ -345,8 +339,7 @@ uvx python-docs-mcp-server doctor
345
339
```
346
340
347
341
This checks the runtime Python version, SQLite FTS5, cache/index paths, disk
348
-
space, and whether the current interpreter has the `venv`/`ensurepip` support
349
-
needed by `build-index`.
342
+
space, and the `venv`/`ensurepip` support needed by `build-index`.
350
343
351
344
<!-- PRE-PYPI: remove the GitHub-source validate-corpus invocation and "After PyPI publishing:" lead-in after the first PyPI publish; the post-PyPI code fence below survives -->
352
345
Before PyPI publishing, validate an existing index from the GitHub source
0 commit comments