Skip to content

Commit f7fe49b

Browse files
docs: align PyPI lookup scope
1 parent 5d8e8bc commit f7fe49b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ it only removes cached retrieval results, not the docs index.
215215
`https://docs.pypi.org/api/json/` (`GET /pypi/<project>/json`) and returns only
216216
sources declared in that package's PyPI metadata: the PyPI project URL,
217217
`docs_url`, `home_page`, and allowlisted `project_urls` labels such as
218-
Documentation, Homepage, Source, Repository, Issues, Changelog, and Release
219-
Notes.
218+
Documentation, Homepage, Source, and Repository.
220219

221220
The tool makes the trust boundary explicit with
222221
`trust_boundary="pypi-declared-metadata"`. It does not crawl pages, perform web

src/mcp_server_python_docs/services/package_docs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"repository",
2727
"repo",
2828
}
29-
_BLOCKED = ("mirror", "community", "unofficial", "tutorial", "example")
3029
_PYPI_METADATA_MAX_BYTES = 5 * 1024 * 1024
3130

3231

@@ -135,7 +134,7 @@ def lookup(self, package: str) -> PackageDocsResult:
135134
if isinstance(project_urls, dict):
136135
for label, url in project_urls.items():
137136
lowered = str(label).strip().lower()
138-
if lowered in _ALLOWED and not any(bad in lowered for bad in _BLOCKED):
137+
if lowered in _ALLOWED:
139138
found = _source(str(label), url, lowered.replace(" ", "_"))
140139
if found is not None and found not in sources:
141140
sources.append(found)

0 commit comments

Comments
 (0)