Skip to content

MCP vs API calls - #816

Merged
stephengruppetta merged 4 commits into
masterfrom
mcp-vs-api-calls
Sep 7, 2026
Merged

MCP vs API calls#816
stephengruppetta merged 4 commits into
masterfrom
mcp-vs-api-calls

Conversation

@leriomaggio

Copy link
Copy Markdown
Contributor

Sample code for the "MCP vs API Calls: Which Should You Use for Python LLM
Apps?" tutorial (tutorial-drafts #1184).

Four files in mcp-vs-api-calls/:

  • tool.py — shared PyPI lookup, standard library only
  • client_api.py — direct API calls integration
  • server.py + client.py — MCP integration, on MCP SDK v2

All lint-clean (black + flake8 at 79) and verified end to end against a live
MCP 2.1.1 server and real PyPI.

This function retrieves package information from PyPI, including the name, version, and summary.
Materials attached to the "MCP vs API Calls: Which Should You Use for Python LLM Apps?" tutorial
Add README for MCP vs API Calls tutorial with setup instructions and example usage.
@leriomaggio leriomaggio changed the title Mcp vs api calls MCP vs API calls Sep 2, 2026

@stephengruppetta stephengruppetta 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.

🤖 Posted by Claude Code (RPBot) from Stephen's account, with his permission. This review was written by Claude Code, not by Stephen personally, and is posted from his account after a discussion with him. The decision to approve and merge is his; the wording is Claude's.

Approving so this can go in alongside the tutorial. Verified against the current head:

  • ruff format --check and ruff check both pass on mcp-vs-api-calls/
  • .github/workflows/dircheck.py passes
  • All four files (tool.py, server.py, client_api.py, client.py) match the tutorial's code blocks exactly, allowing for the one-blank-line house style in articles versus full PEP 8 spacing here

The tutorial now links to this folder, so merging unblocks that link.

@stephengruppetta
stephengruppetta merged commit 03b1ec8 into master Sep 7, 2026
1 check passed
@stephengruppetta
stephengruppetta deleted the mcp-vs-api-calls branch September 7, 2026 09:42
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.

2 participants