python-docs-mcp-server 0.1.3__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_docs_mcp_server-0.1.5/.github/dependabot.yml +19 -0
- python_docs_mcp_server-0.1.5/.github/workflows/codeql.yml +34 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.github/workflows/release.yml +39 -1
- python_docs_mcp_server-0.1.5/.github/workflows/scorecard.yml +38 -0
- python_docs_mcp_server-0.1.5/.github/workflows/security.yml +46 -0
- python_docs_mcp_server-0.1.5/.planning/POSITIONING.md +20 -0
- python_docs_mcp_server-0.1.5/.planning/ROADMAP.md +20 -0
- python_docs_mcp_server-0.1.5/.planning/phases/09-compare-versions/09-CONTEXT.md +40 -0
- python_docs_mcp_server-0.1.5/.planning/phases/10-whatsnew/10-CONTEXT.md +40 -0
- python_docs_mcp_server-0.1.5/.planning/phases/11-detect-venv/11-CONTEXT.md +43 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/AGENTS.md +12 -12
- python_docs_mcp_server-0.1.5/CHANGELOG.md +37 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/PKG-INFO +68 -195
- python_docs_mcp_server-0.1.5/README.md +373 -0
- python_docs_mcp_server-0.1.5/SECURITY.md +28 -0
- python_docs_mcp_server-0.1.5/glama.json +7 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/pyproject.toml +2 -2
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/server.json +3 -3
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/__main__.py +2 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/detection.py +2 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/ingestion/sphinx_json.py +1 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/server.py +2 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/package_docs.py +8 -3
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_package_docs.py +2 -4
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_persistent_docs_cache.py +1 -1
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_stdio_smoke.py +1 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/uv.lock +74 -74
- python_docs_mcp_server-0.1.3/README.md +0 -500
- python_docs_mcp_server-0.1.3/glama.json +0 -6
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.cursorignore +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.github/INTEGRATION-TEST.md +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.github/RELEASE.md +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.github/workflows/ci.yml +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.github/workflows/e2e.yml +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/.gitignore +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/CLAUDE.md +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/CONTRIBUTING.md +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/LICENSE +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/__init__.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/app_context.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/data/synonyms.yaml +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/diagnostics.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/errors.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/ingestion/__init__.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/ingestion/cpython_versions.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/ingestion/inventory.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/ingestion/publish.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/models.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/py.typed +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/retrieval/__init__.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/retrieval/budget.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/retrieval/query.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/retrieval/ranker.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/__init__.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/cache.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/content.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/observability.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/persistent_cache.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/search.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/version.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/services/version_resolution.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/storage/__init__.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/storage/db.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/src/mcp_server_python_docs/storage/schema.sql +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/__init__.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/conftest.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/retrieval_regression_cases.json +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/sample_broken.fjson +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/sample_library.fjson +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/schema-get_docs-input.json +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/schema-get_docs-output.json +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/schema-list_versions-output.json +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/schema-search_docs-input.json +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/fixtures/schema-search_docs-output.json +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_ci_workflows.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_doctor.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_ingestion.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_mcp_get_docs_cache_smoke.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_multi_version.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_packaging.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_phase1_integration.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_publish.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_retrieval.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_retrieval_regression.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_schema.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_schema_snapshot.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_services.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_stability.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_stdio_hygiene.py +0 -0
- {python_docs_mcp_server-0.1.3 → python_docs_mcp_server-0.1.5}/tests/test_synonyms.py +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "uv"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
day: "monday"
|
|
8
|
+
time: "06:00"
|
|
9
|
+
timezone: "Etc/UTC"
|
|
10
|
+
open-pull-requests-limit: 5
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
day: "monday"
|
|
17
|
+
time: "06:30"
|
|
18
|
+
timezone: "Etc/UTC"
|
|
19
|
+
open-pull-requests-limit: 5
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "20 6 * * 1"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
actions: read
|
|
14
|
+
contents: read
|
|
15
|
+
security-events: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
analyze:
|
|
19
|
+
name: Analyze
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
timeout-minutes: 15
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout repository
|
|
25
|
+
uses: actions/checkout@v6
|
|
26
|
+
|
|
27
|
+
- name: Initialize CodeQL
|
|
28
|
+
uses: github/codeql-action/init@v4
|
|
29
|
+
with:
|
|
30
|
+
languages: python
|
|
31
|
+
queries: security-extended,security-and-quality
|
|
32
|
+
|
|
33
|
+
- name: Perform CodeQL Analysis
|
|
34
|
+
uses: github/codeql-action/analyze@v4
|
|
@@ -35,6 +35,16 @@ jobs:
|
|
|
35
35
|
echo "::error::Tag ${GITHUB_REF_NAME} does not match pyproject.toml version ${PKG_VERSION}"
|
|
36
36
|
exit 1
|
|
37
37
|
fi
|
|
38
|
+
SERVER_VERSION=$(uv run python -c "import json; print(json.load(open('server.json'))['version'])")
|
|
39
|
+
PACKAGE_VERSION=$(uv run python -c "import json; print(json.load(open('server.json'))['packages'][0]['version'])")
|
|
40
|
+
if [ "$TAG_VERSION" != "$SERVER_VERSION" ]; then
|
|
41
|
+
echo "::error::Tag ${GITHUB_REF_NAME} does not match server.json version ${SERVER_VERSION}"
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
|
|
45
|
+
echo "::error::Tag ${GITHUB_REF_NAME} does not match server.json package version ${PACKAGE_VERSION}"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
38
48
|
echo "Version check passed: ${PKG_VERSION}"
|
|
39
49
|
|
|
40
50
|
- name: Run linter
|
|
@@ -97,9 +107,37 @@ jobs:
|
|
|
97
107
|
- name: Publish to PyPI
|
|
98
108
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
publish-mcp-registry:
|
|
101
111
|
needs: publish
|
|
102
112
|
runs-on: ubuntu-latest
|
|
113
|
+
name: Publish to MCP Registry
|
|
114
|
+
timeout-minutes: 10
|
|
115
|
+
permissions:
|
|
116
|
+
id-token: write
|
|
117
|
+
contents: read
|
|
118
|
+
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@v6
|
|
121
|
+
|
|
122
|
+
- name: Install mcp-publisher
|
|
123
|
+
run: |
|
|
124
|
+
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" \
|
|
125
|
+
| tar xz mcp-publisher
|
|
126
|
+
|
|
127
|
+
- name: Validate server.json
|
|
128
|
+
run: ./mcp-publisher validate server.json
|
|
129
|
+
|
|
130
|
+
- name: Authenticate to MCP Registry
|
|
131
|
+
run: ./mcp-publisher login github-oidc
|
|
132
|
+
|
|
133
|
+
- name: Publish to MCP Registry
|
|
134
|
+
run: ./mcp-publisher publish
|
|
135
|
+
|
|
136
|
+
github-release:
|
|
137
|
+
needs:
|
|
138
|
+
- publish
|
|
139
|
+
- publish-mcp-registry
|
|
140
|
+
runs-on: ubuntu-latest
|
|
103
141
|
name: Create GitHub Release
|
|
104
142
|
timeout-minutes: 10
|
|
105
143
|
permissions:
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: OpenSSF Scorecard
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "40 6 * * 1"
|
|
8
|
+
|
|
9
|
+
permissions: read-all
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
analysis:
|
|
13
|
+
name: Scorecard analysis
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
permissions:
|
|
17
|
+
actions: read
|
|
18
|
+
contents: read
|
|
19
|
+
id-token: write
|
|
20
|
+
security-events: write
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v6
|
|
25
|
+
with:
|
|
26
|
+
persist-credentials: false
|
|
27
|
+
|
|
28
|
+
- name: Run OpenSSF Scorecard
|
|
29
|
+
uses: ossf/scorecard-action@v2.4.3
|
|
30
|
+
with:
|
|
31
|
+
results_file: results.sarif
|
|
32
|
+
results_format: sarif
|
|
33
|
+
publish_results: true
|
|
34
|
+
|
|
35
|
+
- name: Upload SARIF results
|
|
36
|
+
uses: github/codeql-action/upload-sarif@v4
|
|
37
|
+
with:
|
|
38
|
+
sarif_file: results.sarif
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Security Audit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 6 * * 1"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
dependency-audit:
|
|
17
|
+
name: Dependency audit
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 10
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v6
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v8.1.0
|
|
27
|
+
|
|
28
|
+
- name: Export locked dependencies
|
|
29
|
+
run: |
|
|
30
|
+
uv export \
|
|
31
|
+
--locked \
|
|
32
|
+
--format requirements-txt \
|
|
33
|
+
--all-groups \
|
|
34
|
+
--all-extras \
|
|
35
|
+
--no-emit-project \
|
|
36
|
+
--no-hashes \
|
|
37
|
+
--output-file requirements-audit.txt \
|
|
38
|
+
>/dev/null
|
|
39
|
+
|
|
40
|
+
- name: Audit dependencies
|
|
41
|
+
run: |
|
|
42
|
+
uvx pip-audit \
|
|
43
|
+
--requirement requirements-audit.txt \
|
|
44
|
+
--no-deps \
|
|
45
|
+
--disable-pip \
|
|
46
|
+
--progress-spinner off
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Locked positioning (decision 9.1, locked 2026-05-14)
|
|
2
|
+
|
|
3
|
+
**Sentence (verbatim):**
|
|
4
|
+
|
|
5
|
+
> For AI coding agents writing Python, python-docs-mcp-server is the canonical Python stdlib oracle: exact symbols, exact sections, exact versions — offline, **always free, always MIT**, token-frugal.
|
|
6
|
+
|
|
7
|
+
**Use verbatim (no rewording) in:**
|
|
8
|
+
|
|
9
|
+
- `README.md` hero
|
|
10
|
+
- GitHub repo `About` text
|
|
11
|
+
- `LAUNCH-POST.md` lede
|
|
12
|
+
- Talk bio
|
|
13
|
+
|
|
14
|
+
**Adapt for length and grammar in (preserve key phrases: `canonical Python stdlib oracle`, `always free, always MIT`, `token-frugal`):**
|
|
15
|
+
|
|
16
|
+
- `glama.json` `description` — long marketing form (Glama directory display)
|
|
17
|
+
- `server.json` `description` — medium form (MCP Registry display)
|
|
18
|
+
- `pyproject.toml` `description` — short form (PyPI summary, ≤512 chars)
|
|
19
|
+
|
|
20
|
+
The locked sentence is the anchor; adapted forms must keep the three key phrases and the wedge claim (canonical / version-aware / offline). They may drop "exact symbols, exact sections, exact versions" for brevity if needed, but never the three anchors above.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
## Current
|
|
4
|
+
|
|
5
|
+
- **v0.1.4** — shipped (pre-PyPI; installed via `uvx --from git+…`)
|
|
6
|
+
- **v0.1.5** — in progress. Four coordinated workstreams: positioning lockdown ("canonical Python stdlib oracle for AI coding agents — always free, always MIT, token-frugal"); first PyPI publish via Trusted Publishing; benchmark harness against competing docs MCPs; coordinated launch post on a personal blog, dev.to, and Show HN. (Note: the GitHub repo rename to `python-stdlib-mcp` originally planned for v0.1.5 was dropped on 2026-05-14 — the repo and PyPI package keep the `python-docs-mcp-server` name.)
|
|
7
|
+
|
|
8
|
+
## Backlog (post-v0.1.5)
|
|
9
|
+
|
|
10
|
+
| Phase | Title | Tool surface | Issue |
|
|
11
|
+
|-------|-------|--------------|-------|
|
|
12
|
+
| 09 | `compare_versions(symbol, v1, v2)` | New MCP tool | #TBD-link-after-PR-merges |
|
|
13
|
+
| 10 | `whatsnew_for_version(version)` | New MCP tool | #TBD-link-after-PR-merges |
|
|
14
|
+
| 11 | `detect_python_version` v2 (venv-aware) | Existing tool enhancement | #TBD-link-after-PR-merges |
|
|
15
|
+
|
|
16
|
+
These are planned, not committed. Phase CONTEXTs at [`phases/09-compare-versions/`](phases/09-compare-versions/09-CONTEXT.md), [`phases/10-whatsnew/`](phases/10-whatsnew/10-CONTEXT.md), [`phases/11-detect-venv/`](phases/11-detect-venv/11-CONTEXT.md). Implementation kickoff requires `/gsd-plan-phase 0X`.
|
|
17
|
+
|
|
18
|
+
## Historical
|
|
19
|
+
|
|
20
|
+
Pre-2026-05-14 GSD workflow artifacts (phases 1–8 for v0.1.0) live in maintainers' local worktrees and are intentionally not tracked in this repo — they remain accessible to those who ran the original GSD workflow locally but are not load-bearing for current implementation work. With v0.1.5 the `.planning/` directory becomes a tracked, forward-facing surface for new phase CONTEXTs and roadmap entries.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Phase 09 — compare_versions(symbol, v1, v2)
|
|
2
|
+
|
|
3
|
+
**Status:** Backlog (post-v0.1.5)
|
|
4
|
+
**Type:** New MCP tool
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
|
|
8
|
+
Add an MCP tool `compare_versions(symbol, v1, v2)` that returns a structured diff of a stdlib symbol's signature, behavior, and docstring between two Python versions.
|
|
9
|
+
|
|
10
|
+
## Depends on
|
|
11
|
+
|
|
12
|
+
- v0.1.5 ships (PyPI debut + repo rename complete).
|
|
13
|
+
- Index supports the two versions being compared (handled by `build-index`).
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- CMPR-01: Tool accepts `(symbol: str, v1: str, v2: str)`. Returns a structured diff: signature change, docstring delta, deprecation flag, see-also additions/removals.
|
|
18
|
+
- CMPR-02: Both versions must already be indexed; if not, tool returns an actionable error pointing at `build-index`.
|
|
19
|
+
- CMPR-03: Diff format is JSON-serializable and token-frugal — no full re-printing of unchanged paragraphs.
|
|
20
|
+
|
|
21
|
+
## Success criteria
|
|
22
|
+
|
|
23
|
+
1. `compare_versions("asyncio.TaskGroup", "3.10", "3.11")` returns a clear, machine-readable diff showing the symbol was newly introduced in 3.11 (e.g. an `added` or `new_in` marker, not just a delta of existing fields).
|
|
24
|
+
2. Comparing identical versions returns an empty diff with an explicit "no change" marker.
|
|
25
|
+
3. Missing-version cases return an actionable error with the indexed-version list.
|
|
26
|
+
4. Token cost of a typical diff is under 300 tokens (vs ~1500 for fetching both full doc pages).
|
|
27
|
+
5. Integration test in `tests/test_compare_versions.py` exercises 3 representative symbols (one changed, one unchanged, one missing).
|
|
28
|
+
|
|
29
|
+
## Plans
|
|
30
|
+
|
|
31
|
+
TBD — run `/gsd-plan-phase 09` after this issue is prioritized.
|
|
32
|
+
|
|
33
|
+
## UI hint
|
|
34
|
+
|
|
35
|
+
No UI surface; pure MCP tool.
|
|
36
|
+
|
|
37
|
+
## Out of scope
|
|
38
|
+
|
|
39
|
+
- Cross-language diffs (Python stdlib only).
|
|
40
|
+
- Non-symbol diffs (module-level changes belong in phase 10).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Phase 10 — whatsnew_for_version(version)
|
|
2
|
+
|
|
3
|
+
**Status:** Backlog (post-v0.1.5)
|
|
4
|
+
**Type:** New MCP tool
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
|
|
8
|
+
Return the official "What's New in Python `<version>`" content as structured sections, scoped by topic — new modules, deprecations, removals, performance, syntax. The current alternative is for the agent to fetch a full HTML page; this tool returns just the requested sections.
|
|
9
|
+
|
|
10
|
+
## Depends on
|
|
11
|
+
|
|
12
|
+
- v0.1.5 ships.
|
|
13
|
+
- Ingestion already covers `whatsnew/<version>.html` (verify during phase planning).
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- WNEW-01: Tool signature: `whatsnew_for_version(version: str, kind: str | None = None, start_index: int = 0, max_sections: int = 20)`. `kind` filters to a single `kind` value (see WNEW-02); `start_index` + `max_sections` paginate the response. Returns `{ "sections": [{title, anchor, body, kind}], "next_start_index": int | None }`.
|
|
18
|
+
- WNEW-02: `kind` enum: `new_module | new_feature | deprecation | removal | performance | syntax | other`.
|
|
19
|
+
- WNEW-03: Each section's `body` is capped at ~2k tokens. If a single section exceeds the cap, truncate with a clear marker and a `get_docs` hint. Pagination via `start_index` / `next_start_index` round-trips.
|
|
20
|
+
|
|
21
|
+
## Success criteria
|
|
22
|
+
|
|
23
|
+
1. `whatsnew_for_version("3.12")` returns ≥10 sections, each with a non-empty body.
|
|
24
|
+
2. Each section has a stable anchor matching docs.python.org.
|
|
25
|
+
3. Filtering by `kind` is supported (`whatsnew_for_version("3.12", kind="deprecation")`).
|
|
26
|
+
4. Missing version returns the same actionable error pattern as `compare_versions`.
|
|
27
|
+
5. Integration test in `tests/test_whatsnew.py` covers two representative versions.
|
|
28
|
+
|
|
29
|
+
## Plans
|
|
30
|
+
|
|
31
|
+
TBD.
|
|
32
|
+
|
|
33
|
+
## UI hint
|
|
34
|
+
|
|
35
|
+
No UI surface; pure MCP tool.
|
|
36
|
+
|
|
37
|
+
## Out of scope
|
|
38
|
+
|
|
39
|
+
- Third-party "what's new" guides.
|
|
40
|
+
- Cross-version aggregation (use `compare_versions` instead).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Phase 11 — detect_python_version v2 (venv-aware)
|
|
2
|
+
|
|
3
|
+
**Status:** Backlog (post-v0.1.5)
|
|
4
|
+
**Type:** Enhancement of existing MCP tool
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
|
|
8
|
+
Make `detect_python_version` venv-aware: report the Python version of the *active virtual environment* in the user's project, not just the value from `.python-version` or `python3 --version` on PATH.
|
|
9
|
+
|
|
10
|
+
## Depends on
|
|
11
|
+
|
|
12
|
+
- v0.1.5 ships.
|
|
13
|
+
- v1 implementation at `src/mcp_server_python_docs/detection.py` (current 3-step detection order: `.python-version` → `python3 --version` → `sys.version_info`).
|
|
14
|
+
- v1 has NO dedicated unit test file — backfill `tests/test_detection.py` as part of this phase.
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- DETV2-01: Detect active venv via the `VIRTUAL_ENV` env var; if present, read `$VIRTUAL_ENV/pyvenv.cfg` and parse the `version = X.Y[.Z]` key (the standard key written by `python -m venv`). Fall back to `version_info` only if `version` is absent — some tools write that variant.
|
|
19
|
+
- DETV2-02: Detect `.venv/` or `venv/` directories in cwd or its ancestors (up to project root).
|
|
20
|
+
- DETV2-03: Detect `uv`'s `.venv` and `poetry`'s `.venv` patterns.
|
|
21
|
+
- DETV2-04: Preserve v1 fallback chain unchanged below the new venv checks.
|
|
22
|
+
- DETV2-05: Return `(major_minor, source)` tuple. **New v2 sources:** `"venv:VIRTUAL_ENV"`, `"venv:.venv"`. **Existing v1 sources (preserved unchanged, see `src/mcp_server_python_docs/detection.py`):** `".python-version file"`, `"python3 in PATH"`, `"server runtime"`. Total: 5 distinct source strings.
|
|
23
|
+
|
|
24
|
+
## Success criteria
|
|
25
|
+
|
|
26
|
+
1. Inside an activated venv (3.12) on a 3.13 host: returns `("3.12", "venv:VIRTUAL_ENV")`.
|
|
27
|
+
2. With no venv but `.python-version` present: returns `("X.Y", ".python-version file")` — v1 behavior preserved verbatim.
|
|
28
|
+
3. With nothing else available: returns `(sys-version, "server runtime")` — v1 fallback preserved verbatim.
|
|
29
|
+
4. Backfill: `tests/test_detection.py` covers all five `source` cases (2 new + 3 preserved).
|
|
30
|
+
5. No regression in v1 callers (`server.py` MCP tool wrapper signature unchanged; existing source strings unchanged).
|
|
31
|
+
|
|
32
|
+
## Plans
|
|
33
|
+
|
|
34
|
+
TBD.
|
|
35
|
+
|
|
36
|
+
## UI hint
|
|
37
|
+
|
|
38
|
+
No UI surface; pure MCP tool.
|
|
39
|
+
|
|
40
|
+
## Out of scope
|
|
41
|
+
|
|
42
|
+
- conda / mamba environments (separate phase if demand surfaces).
|
|
43
|
+
- Cross-platform venv path quirks beyond Unix + Windows (both must be tested).
|
|
@@ -83,15 +83,15 @@ Before calling work complete:
|
|
|
83
83
|
|
|
84
84
|
## Context Hygiene
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
`.planning/` mixes archival history with forward-facing phase CONTEXTs.
|
|
87
|
+
|
|
88
|
+
- `.planning/ROADMAP.md` and `.planning/phases/0X-…/0X-CONTEXT.md` are live,
|
|
89
|
+
forward-looking specs — read these first when starting a new phase.
|
|
90
|
+
- Anything else in `.planning/` (especially content dated 2026-04 or earlier)
|
|
91
|
+
is archival history. It may help maintainers reconstruct prior context but
|
|
92
|
+
should not drive routine implementation decisions.
|
|
93
|
+
- For the source of truth about *what the code does today*, start with:
|
|
94
|
+
- `README.md`
|
|
95
|
+
- `CONTRIBUTING.md`
|
|
96
|
+
- `.github/INTEGRATION-TEST.md`
|
|
97
|
+
- `tests/`
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `python-docs-mcp-server` are documented here.
|
|
4
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
|
|
5
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.1.5] — 2026-05-14
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **PyPI debut.** Install via `uvx python-docs-mcp-server` (no `--from` flag needed). The previous `uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git` path keeps working via the existing GitHub source, but the published wheel is now the canonical install route.
|
|
12
|
+
- `CHANGELOG.md` (this file).
|
|
13
|
+
- Locked positioning anchor: *"For AI coding agents writing Python, `python-docs-mcp-server` is the canonical Python stdlib oracle: exact symbols, exact sections, exact versions — offline, **always free, always MIT**, token-frugal."* See `.planning/POSITIONING.md` for the verbatim copy and per-surface adaptation rules.
|
|
14
|
+
- Forward-facing `.planning/phases/` directory. Three post-v0.1.5 backlog items have on-disk specs:
|
|
15
|
+
- `09-compare-versions` — new MCP tool: `compare_versions(symbol, v1, v2)` structured diff.
|
|
16
|
+
- `10-whatsnew` — new MCP tool: `whatsnew_for_version(version)` section-sliced "What's New" page.
|
|
17
|
+
- `11-detect-venv` — venv-aware `detect_python_version` v2 (reads `VIRTUAL_ENV`, `.venv/`, `pyvenv.cfg`).
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- README hero rewritten around the canonical-source positioning. The positioning sentence now sits between the package title and the badge row, with a wedge-forward "Built for the moment your agent needs…" descriptive paragraph below the badges.
|
|
22
|
+
- `glama.json` `description`, `server.json` `description`, and `pyproject.toml` `description` aligned with the locked positioning. Each surface keeps the three required anchor phrases (canonical Python stdlib oracle / always free, always MIT / token-frugal) while adapting the wording for its display length.
|
|
23
|
+
- `AGENTS.md` "Context Hygiene" section now distinguishes `.planning/ROADMAP.md` and `.planning/phases/0X-…/0X-CONTEXT.md` (live, forward-looking specs) from older `.planning/` content (archival history).
|
|
24
|
+
- README install instructions, MCP-client config snippets, and validation commands now lead with the PyPI install (`uvx python-docs-mcp-server`). The pre-PyPI `--from git+…` blocks have been removed.
|
|
25
|
+
|
|
26
|
+
### Removed
|
|
27
|
+
|
|
28
|
+
- All `<!-- PRE-PYPI -->` fenced regions from `README.md` (11 blocks, 18 GitHub-source install URLs). They were scaffolding for the pre-v0.1.5 window where the only install path was a GitHub source URL.
|
|
29
|
+
|
|
30
|
+
### Notes
|
|
31
|
+
|
|
32
|
+
- The PyPI package name and the GitHub repository name both remain `python-docs-mcp-server`. A rename to `python-stdlib-mcp` was planned in the v0.1.5 scope (CR §9.2) but was dropped on 2026-05-14; the historical note is preserved in `.planning/ROADMAP.md`.
|
|
33
|
+
- Trusted Publishing on PyPI is wired with Sigstore attestations on every release artifact. The release workflow lives at `.github/workflows/release.yml` and runs on annotated tags matching `v*`.
|
|
34
|
+
|
|
35
|
+
## [0.1.4] — 2026-05-13
|
|
36
|
+
|
|
37
|
+
Pre-PyPI release. Installable only via `uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git`. Last release before the PyPI publish.
|