Skip to content

fix: bump mcp to 1.28.1 and fix read_resource - #10

Merged
Uzair-Ahmed-Dahraj merged 5 commits into
devkindhq:mainfrom
Uzair-Ahmed-Dahraj:chore/open-source-ready
Nov 9, 2026
Merged

Uzair-Ahmed-Dahraj merged 5 commits into
devkindhq:mainfrom
Uzair-Ahmed-Dahraj:chore/open-source-ready

Conversation

@Uzair-Ahmed-Dahraj

@Uzair-Ahmed-Dahraj Uzair-Ahmed-Dahraj commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Fix

  • Bump mcp to 1.28.1. This is the lowest version that clears the high advisories. The 4 advisories left are moderate, and they affect HTTP and client code. This server uses stdio.
  • read_resource converts uri to str.
  • New test tests/test_resource.py. It reads whatweb://results/missing through the registered handler.
  • Remove smithery.yaml and the Smithery entry in the README Roadmap. Smithery shut down its hosted service on 31 Oct 2026.

Example

resources/read for whatweb://results/missing:

  • Before: AttributeError: 'AnyUrl' object has no attribute 'startswith'
  • After: {"error": "Resource not found"}

Verification

  • python -m pytest -q on Python 3.12.16 with mcp==1.28.1: "20 passed".
  • Without the fix, the new test fails with the AttributeError above.

Review Notes

  • server.json stays at 1.0.1, so a v1.0.1 tag releases this fix through release.yml.

Bump mcp to 1.28.1 to clear the High advisories against 1.6.0. Fix read_resource: the SDK passes an AnyUrl, not a str.
@Uzair-Ahmed-Dahraj
Uzair-Ahmed-Dahraj marked this pull request as draft November 2, 2026 10:51
Revert the optional changes. Keep mcp 1.28.1 (High advisories), the read_resource fix and its test.
mcp 1.6.0 has five High advisories. The SDK passes an AnyUrl, not a str, to read_resource.
@Uzair-Ahmed-Dahraj Uzair-Ahmed-Dahraj changed the title feat: prepare 1.1.0 for open source fix: bump mcp to 1.28.1 and fix read_resource Nov 2, 2026

@superkindhq superkindhq Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

devkind-code-review: whatweb-mcp #10 — first review

Mode: comment-only · Checks: tests ✓ (20/20 at head 653830a9, python3.12 venv matching the runtime; 2 pre-existing asyncio teardown warnings)

Verified at the head SHA, not from the PR body.

What this PR does (verified)

  • mcp==1.6.0 → 1.28.1 — same SDK signature change as the sibling repos: read_resource(uri: str) → (uri: AnyUrl) with str() normalization (server.py:352-353). Correct.
  • New tests/test_resource.py exercises the handler through the registered request_handlers[ReadResourceRequest] and asserts the not-found payload — a different seam from the client-level test used in theharvester-mcp#6; good coverage diversity across the family.

Findings

low

  • requirements.txt:1 — same as sibling repos: on Python ≥3.14, mcp==1.28.1 demands pydantic>=2.12.0 while this pin holds pydantic==2.11.5 → ResolutionImpossible on pip install (reproduced on 3.14.7; passes on 3.12). Runtime/Docker unaffected; floor bump or README note would save contributors on new Pythons.

note

  • server.py (not-found return shape) — pre-existing design, unchanged by this PR; same note as siblings.

Verdict

✅ Ship it — small, correct, tested.

Comment thread requirements.txt
@@ -1,3 +1,3 @@
mcp==1.6.0
mcp==1.28.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[compat] On Python ≥3.14 mcp==1.28.1 requires pydantic>=2.12.0, conflicting with this file's pydantic==2.11.5 pin (reproduced ResolutionImpossible on 3.14.7). Fine on 3.12/3.13 — consider a floor bump or README note.

@superkindhq superkindhq Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

devkind-code-review: devkindhq/whatweb-mcp #10

Mode: comment-only · Head: 653830a9

Checks (at head, fresh venv): pytest 20/20 green on Python 3.12 + mcp 1.28.1 — matches the PR body's claim exactly. Dependency set resolves cleanly on 3.12.

Verified

  • The AnyUrl → str fix is correct and the new test exercises the real registered handler (app.request_handlers[ReadResourceRequest]), not a mock — good.
  • mcp 1.28.1 clears the 5 high advisories named in the body; remaining 4 are moderate/HTTP-client-side, and this server is stdio-only — acceptable.
  • release.yml gate (tag == server.json version == package ref) means the v1.0.1 tag will ship this without a version bump — consistent with the review note.

Findings

🟡 low-medium — requirements.txt is now uninstallable on Python 3.13+

mcp==1.28.1 requires pydantic>=2.12 on python_version >= "3.14" (and similar for 3.13 wheels), while this PR keeps pydantic==2.11.5 pinned. On Python 3.14, pip install -r requirements.txt dies with ResolutionImpossible (verified locally). The Dockerfile is python3-from-image (check its base tag — if it's 3.12 you're fine today), but anyone on a newer interpreter gets a broken install. Suggest: bump pydantic to >=2.12,<3 alongside the mcp bump, or pin the Docker base image explicitly to 3.12 in the same PR.

low — deprecated return shape

read_resource returning str triggers: "Returning str or bytes from read_resource is deprecated. Use Iterable[ReadResourceContents] instead." on every read under 1.28.1. Works today, but the handler will break at some future mcp major — a one-line ReadResourceContents(uri=..., mimeType="application/json", text=...) return keeps this PR from needing a sequel.

note — Smithery removal

Correct call; also worth deleting the now-orphaned smithery.yaml from the repo in a follow-up so nobody mistakes it for a live distribution channel.

Verdict: green on the fix itself; resolve the pydantic/3.14 install conflict (even just the explicit Docker base pin) before merge.

Smithery shut down its hosted services on 31 Oct 2026.
@Uzair-Ahmed-Dahraj
Uzair-Ahmed-Dahraj merged commit bfd2f9c into devkindhq:main Nov 9, 2026
1 check passed
@superkindhq

superkindhq Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

post-merge verify-fixes audit (merged 2026-11-09, merge 0d7da50fbf — reviewed at this exact SHA)

Re-checked both bot reviews' findings against the merge commit:

Finding Verdict Evidence at 0d7da50f
🟡 requirements.txt uninstallable on Python ≥3.13 (mcp==1.28.1 needs pydantic>=2.12, pin holds 2.11.5) ❌ shipped unfixed requirements.txt:2 still pydantic==2.11.5
low — deprecated str return from read_resource ❌ unchanged server.py still async def read_resource(uri: AnyUrl) -> str: returning json.dumps(...)
note — delete orphaned smithery.yaml ✅ fixed file absent from the tree

Two ameliorations verified: the Dockerfile is a ruby:3.4.12-alpine3.23 base that installs Python from Alpine 3.23 (3.12-era), so the shipped image is unaffected — the pydantic pin only breaks contributor installs on new interpreters. And tag v1.0.1 exists now, so the release gate shipped this as predicted.

Version surfaces still disagree (plugin.json 1.1.1 vs server.json 1.0.1 vs tag v1.0.1) — carried, non-blocking.

Suggested one-line follow-up: pydantic>=2.12,<3 (or an explicit Docker/README interpreter note) + the ReadResourceContents return — both trivial, both future-proofing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant