Skip to content

fix(mcp): correct install docs, URL encoding, docstring, and test coverage#4

Open
lwsinclair wants to merge 1 commit into
mainfrom
fix/mcp-usability
Open

fix(mcp): correct install docs, URL encoding, docstring, and test coverage#4
lwsinclair wants to merge 1 commit into
mainfrom
fix/mcp-usability

Conversation

@lwsinclair

Copy link
Copy Markdown
Member

Summary

  • README install instructions were broken: The quickstart said uvx jenner-sas-mcp and pip install jenner-sas-mcp, both of which fail because the package isn't on PyPI. Replaced with the working --from git+... form throughout, including the Claude Desktop JSON config and the Claude Code claude mcp add example. Also added JENNER_API_KEY to the .mcp.json example which previously omitted it.
  • URL encoding missing: get_run and dataset_preview built URL paths with raw run_id/dataset values — names containing spaces or / would produce invalid URLs. Fixed with urllib.parse.quote(..., safe='').
  • validate_sas docstring had wrong type syntax: {"severity", "message"} (a Python set literal) instead of {"severity": str, "message": str} (a dict). LLMs reading the tool description got the wrong schema.
  • dataset_preview had zero test coverage: Added test_dataset_preview and test_get_run_url_encodes_run_id to pin the URL encoding behaviour. 14/14 tests pass.

Test plan

  • pytest tests/ — 14/14 pass (was 12)
  • URL encoding verified in test_dataset_preview (my datasetmy%20dataset)
  • URL encoding verified in test_get_run_url_encodes_run_id (r/1r%2F1)

🤖 Generated with Claude Code

…erage

README: replace the not-yet-published PyPI quickstart (uvx/pip commands
that fail) with the working git-install form. Clarify the Claude Code
config section: add JENNER_API_KEY to the .mcp.json example and spell
out the --from git+ form consistently across all snippets.

server.py: encode run_id and dataset path segments with urllib.parse.quote
so names containing spaces or special characters reach the API correctly.
Fix validate_sas docstring — diagnostics list items are dicts
{"severity": str, "message": str}, not bare sets.

tests: add test_dataset_preview (was the only tool with zero coverage)
and test_get_run_url_encodes_run_id to pin the URL encoding behaviour.
14/14 pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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