Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ versions 3.10 through 3.14.
2. Verify the version in `pyproject.toml` is correct:
```bash
grep '^version' pyproject.toml
# Should show: version = "0.1.0"
# Should show: version = "0.1.1"
```

3. Create and push the tag:
```bash
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin v0.1.0
git tag -a v0.1.1 -m "Release v0.1.1"
git push origin v0.1.1
```

4. Monitor the release workflow at:
https://github.com/<owner>/python-docs-mcp-server/actions/workflows/release.yml

5. Verify the package on PyPI:
https://pypi.org/project/mcp-server-python-docs/0.1.0/
https://pypi.org/project/mcp-server-python-docs/0.1.1/

## Post-Release Verification

Expand All @@ -63,14 +63,14 @@ After the package is published:
```bash
# In a fresh environment:
uvx mcp-server-python-docs --version
# Should print: 0.1.0
# Should print: 0.1.1

# Or via pipx:
pipx run mcp-server-python-docs --version
# Should print: 0.1.0
# Should print: 0.1.1
```

## v0.1.0 Release Checklist
## v0.1.1 Release Checklist

Complete these steps in order. Each step has a checkbox -- do not skip ahead.

Expand All @@ -81,7 +81,7 @@ Complete these steps in order. Each step has a checkbox -- do not skip ahead.
```bash
uv run pytest --tb=short -q
```
- [ ] Version in `pyproject.toml` is `0.1.0`:
- [ ] Version in `pyproject.toml` is `0.1.1`:
```bash
grep '^version' pyproject.toml
```
Expand All @@ -105,7 +105,7 @@ Complete these steps in order. Each step has a checkbox -- do not skip ahead.

- [ ] Create the annotated tag:
```bash
git tag -a v0.1.0 -m "Release v0.1.0
git tag -a v0.1.1 -m "Release v0.1.1

First public release of mcp-server-python-docs.

Expand All @@ -116,14 +116,14 @@ Complete these steps in order. Each step has a checkbox -- do not skip ahead.
```
- [ ] Push the tag to trigger the release workflow:
```bash
git push origin v0.1.0
git push origin v0.1.1
```
- [ ] Monitor the workflow run: https://github.com/<owner>/python-docs-mcp-server/actions/workflows/release.yml
- [ ] Verify all three jobs pass: `build` -> `publish` -> `github-release`

### Post-Release Verification (SHIP-06)

- [ ] Package visible on PyPI: https://pypi.org/project/mcp-server-python-docs/0.1.0/
- [ ] Package visible on PyPI: https://pypi.org/project/mcp-server-python-docs/0.1.1/
- [ ] Attestation visible on PyPI package page (look for "Provenance" badge)
- [ ] Fresh install test:
```bash
Expand All @@ -132,13 +132,13 @@ Complete these steps in order. Each step has a checkbox -- do not skip ahead.

# Install and verify version
uvx mcp-server-python-docs --version
# Expected output: 0.1.0
# Expected output: 0.1.1
```
- [ ] Full README flow test (from a clean environment):
```bash
# Step 1: Install
uvx mcp-server-python-docs --version
# Should print 0.1.0
# Should print 0.1.1

# Step 2: Build index
uvx mcp-server-python-docs build-index --versions 3.10,3.11,3.12,3.13,3.14
Expand All @@ -161,10 +161,10 @@ Complete these steps in order. Each step has a checkbox -- do not skip ahead.
### Release Complete

- [ ] GitHub Release exists with attached artifacts
- [ ] PyPI page shows 0.1.0 with attestation
- [ ] PyPI page shows 0.1.1 with attestation
- [ ] README install instructions verified end-to-end
- [ ] Slow E2E workflow passed for the release candidate
- [ ] Tag v0.1.0 exists in git
- [ ] Tag v0.1.1 exists in git

**Release date**: _______________
**Released by**: _______________
67 changes: 51 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,33 @@ exposes a small MCP tool surface tuned for high-signal retrieval.
The model gets the exact symbol match and the relevant documentation section
instead of a full-page dump.

## 30-second demo

Ask your MCP client:

> In Python 3.13, how should I use `asyncio.TaskGroup` and what changed from older asyncio patterns?

The agent should use `search_docs` for the exact symbol, then `get_docs` for the
matching section. Instead of generic web results or an entire docs page, it gets
the official stdlib text for the requested Python version, trimmed to the useful
section.

Local source smoke test until the PyPI package is published:

```bash
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git mcp-server-python-docs --version
```

## Install

Run it directly with `uvx`:
Until the first PyPI release is published, run from GitHub:

```bash
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git mcp-server-python-docs --version
```

After PyPI publishing is complete, the package will also run directly with
`uvx`:

Comment on lines +80 to 88
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make command guidance fully consistent with the pre-PyPI state.

This section correctly says to use uvx --from git+... before publishing, but later commands still use plain uvx mcp-server-python-docs ... without a post-PyPI qualifier (for example, Line 264 and Line 274), which can mislead current users into failing commands.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 80 - 88, Update the README so all example invocations
are consistent with the pre-PyPI usage: replace or annotate the later plain
invocations of "uvx mcp-server-python-docs ..." (seen elsewhere in the file) to
include the pre-release qualifier "--from
git+https://github.com/ayhammouda/python-docs-mcp-server.git" (i.e., use "uvx
--from git+https://github.com/ayhammouda/python-docs-mcp-server.git
mcp-server-python-docs ...") or add a short note stating those specific examples
require the PyPI release; update the occurrences that match "uvx
mcp-server-python-docs" so they're either prefixed with "--from git+..." or
clearly marked as post-PyPI only.

```bash
uvx mcp-server-python-docs --version
Expand All @@ -80,9 +104,11 @@ shell or use `python -m uv ...` as a fallback for local contributor commands.
Build the local documentation index:

```bash
uvx mcp-server-python-docs build-index --versions 3.10,3.11,3.12,3.13,3.14
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git mcp-server-python-docs build-index --versions 3.10,3.11,3.12,3.13,3.14
```

After PyPI publishing, `uvx mcp-server-python-docs build-index ...` is enough.

If you installed the package persistently, you can drop the `uvx` prefix:

```bash
Expand Down Expand Up @@ -110,7 +136,11 @@ Add this to your Claude Desktop configuration file:
"mcpServers": {
"python-docs": {
"command": "uvx",
"args": ["mcp-server-python-docs"]
"args": [
"--from",
"git+https://github.com/ayhammouda/python-docs-mcp-server.git",
"mcp-server-python-docs"
]
}
}
}
Expand All @@ -128,7 +158,11 @@ global settings):
"mcpServers": {
"python-docs": {
"command": "uvx",
"args": ["mcp-server-python-docs"]
"args": [
"--from",
"git+https://github.com/ayhammouda/python-docs-mcp-server.git",
"mcp-server-python-docs"
]
}
}
}
Expand All @@ -141,7 +175,7 @@ Add this to `.codex/config.toml`:
```toml
[mcp_servers.python-docs]
command = "uvx"
args = ["mcp-server-python-docs"]
args = ["--from", "git+https://github.com/ayhammouda/python-docs-mcp-server.git", "mcp-server-python-docs"]
```

## How quality is verified
Expand Down Expand Up @@ -174,20 +208,21 @@ The server currently exposes five MCP tools:
| `list_versions` | List all indexed Python versions with metadata. |
| `detect_python_version` | Detect the user's local Python version and report whether it matches an indexed documentation version. |

## When to use this instead of generic docs retrieval

Use this server when you need:
## Why not Context7 or generic docs retrieval?

- exact Python stdlib symbol resolution
- consistent version-aware answers across Python 3.10 through 3.14
- token-efficient section retrieval from official docs
- a local, read-only MCP server with a simple operational story
Use this server when the question is about Python's standard library and you
want the boring answer that is actually correct:

Use a generic fetcher or broader docs MCP when you need:
- official Python docs, not scraped mirrors or mixed-source summaries
- exact symbol resolution from `objects.inv`
- Python-version-aware results across 3.10 through 3.14
- token-efficient section retrieval instead of full-page dumps
- local, read-only runtime behavior with no API keys

- arbitrary third-party package content beyond package-declared PyPI metadata
- arbitrary web pages
- mixed-source research across many frameworks
Use Context7 or a generic docs fetcher when you need broader third-party library
coverage, arbitrary web pages, or cross-framework research. This server is not a
universal docs search engine. It is a precise stdlib retrieval tool for AI
coding agents.

## Retrieved docs cache

Expand Down
67 changes: 67 additions & 0 deletions docs/launch/reddit-posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Reddit launch drafts

Do not post these until the package is published on PyPI and the release smoke
test passes. Until then, use the GitHub `uvx --from git+...` install command.

## r/Python

Title: I built a local MCP server for official Python stdlib docs

I built `mcp-server-python-docs`, a small read-only MCP server that gives AI
coding agents access to the official Python standard library docs.

Why I wanted it:

- exact stdlib symbol lookup via Python `objects.inv`
- version-aware answers for Python 3.10 through 3.14
- section-level retrieval instead of dumping whole pages into context
- local SQLite/FTS index, no runtime web scraping, no API keys
- read-only MCP tools, so the operational/security story is boring

Example use case: ask an agent about `asyncio.TaskGroup` in Python 3.13 and it
can retrieve the exact official docs section instead of guessing from generic web
results.

Repo: https://github.com/ayhammouda/python-docs-mcp-server

Current note: PyPI publishing is still being finalized. For now, test from
source:

```bash
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git mcp-server-python-docs --version
```

Feedback welcome, especially on retrieval quality, MCP client setup, and which
stdlib docs workflows feel clunky in real use.

## r/LocalLLaMA

Title: Local MCP server for official Python docs, built for coding agents

I made a local MCP server for Python standard library documentation. It builds a
local index from the official docs and exposes small read-only tools for search
and section retrieval.

The goal is not to be a universal docs search engine. It is the opposite: a
boring, precise source for Python stdlib questions where version matters and
tokens are limited.

What it does:

- official Python docs only for stdlib retrieval
- Python-version-aware results across 3.10-3.14
- exact symbol lookup from `objects.inv`
- local SQLite + FTS5 index
- no API keys or hosted retrieval dependency at query time

Repo: https://github.com/ayhammouda/python-docs-mcp-server

PyPI publishing is not done yet, so don't use the plain `uvx` package command
until that lands. Source install smoke test:

```bash
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git mcp-server-python-docs --version
```

I'd appreciate practical feedback from people wiring MCP into local coding
workflows.
39 changes: 39 additions & 0 deletions docs/launch/show-hn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Show HN launch draft

Do not submit until PyPI publishing is complete and the release smoke test passes.

## Title

Show HN: Local MCP server for official Python standard library docs

## Post

Hi HN — I built `mcp-server-python-docs`, a read-only MCP server that gives AI
coding agents precise access to the official Python standard library docs.

The motivation: generic docs retrieval is often noisy for stdlib questions.
Python answers are sensitive to exact symbols and versions, and agents do not
need a whole docs page when one section answers the question.

What it does:

- builds a local SQLite/FTS index from official Python docs
- resolves exact symbols from Python `objects.inv`
- retrieves section-level docs with truncation and pagination
- supports version-aware lookup across Python 3.10 through 3.14
- runs locally, read-only, with no API keys

It is intentionally narrow. Use Context7 or generic retrieval for broad
third-party docs and web research. Use this when you want official stdlib docs
with less token waste.

Comment on lines +18 to +29
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add one explicit demo query to the Show HN draft.

The post explains the approach well, but it still misses a concrete demo query (requested in the launch objective), which weakens the “show” part of Show HN.

Suggested addition
 What it does:
@@
 - runs locally, read-only, with no API keys
+
+Demo query:
+- "In Python 3.13, what does asyncio.TaskGroup change compared to older asyncio patterns?"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
What it does:
- builds a local SQLite/FTS index from official Python docs
- resolves exact symbols from Python `objects.inv`
- retrieves section-level docs with truncation and pagination
- supports version-aware lookup across Python 3.10 through 3.14
- runs locally, read-only, with no API keys
It is intentionally narrow. Use Context7 or generic retrieval for broad
third-party docs and web research. Use this when you want official stdlib docs
with less token waste.
What it does:
- builds a local SQLite/FTS index from official Python docs
- resolves exact symbols from Python `objects.inv`
- retrieves section-level docs with truncation and pagination
- supports version-aware lookup across Python 3.10 through 3.14
- runs locally, read-only, with no API keys
Demo query:
- "In Python 3.13, what does asyncio.TaskGroup change compared to older asyncio patterns?"
It is intentionally narrow. Use Context7 or generic retrieval for broad
third-party docs and web research. Use this when you want official stdlib docs
with less token waste.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/launch/show-hn.md` around lines 18 - 29, Add a concrete demo query to
the Show HN draft to satisfy the launch objective: insert a short “Demo query”
paragraph into docs/launch/show-hn.md (e.g., right after the bulleted “What it
does:” list or before “It is intentionally narrow.”) that shows a real user
query and expected behavior—for example, a query asking for a specific stdlib
symbol and version like “Show the asyncio.create_task docs for Python 3.11, with
the section summary and first paragraph,” and describe that the system will
resolve the exact symbol, fetch the section-level docs with
truncation/pagination, and indicate the returned version. Ensure the demo is
explicit, mentions a Python version (3.10–3.14), and uses plain text so readers
can copy-paste it.

Repo: https://github.com/ayhammouda/python-docs-mcp-server

PyPI publishing is still pending. Until that is finished, test from GitHub:

```bash
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git mcp-server-python-docs --version
```

I'd love feedback on the MCP interface, retrieval output, and whether the local
indexing flow is clear enough.
30 changes: 30 additions & 0 deletions server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.ayhammouda/python-docs-mcp-server",
"description": "Local, read-only MCP retrieval over official Python standard library docs.",
"title": "Python Docs MCP Server",
"websiteUrl": "https://github.com/ayhammouda/python-docs-mcp-server",
"repository": {
"url": "https://github.com/ayhammouda/python-docs-mcp-server",
"source": "github"
},
"version": "0.1.1",
"packages": [
{
"registryType": "pypi",
"registryBaseUrl": "https://pypi.org",
"identifier": "mcp-server-python-docs",
"version": "0.1.1",
"runtimeHint": "uvx",
"transport": {
"type": "stdio"
}
}
],
"_meta": {
"io.modelcontextprotocol.registry/publisher-provided": {
"status": "ready-for-validation-after-pypi-publish",
"notes": "PyPI package metadata is included for the official MCP Registry, but package publication is tracked separately."
}
}
}
2 changes: 1 addition & 1 deletion src/mcp_server_python_docs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""MCP server for Python standard library documentation."""

__version__ = "0.1.0"
__version__ = "0.1.1"
Loading
Loading