PLAY PODCASTS
Dangers of Automatically Converting a REST API to MCP
Episode 266

Dangers of Automatically Converting a REST API to MCP

The Real Python Podcast · Real Python

September 19, 20251h 24m

Audio is streamed directly from the publisher (dts.podtrac.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.

Show Notes

<p>When converting an existing REST API to the Model Context Protocol, what should you consider? What anti-patterns should you avoid to keep an AI agent’s context clean? This week on the show, Kyle Stratis returns to discuss his upcoming book, &ldquo;AI Agents with MCP&rdquo;.</p> <p>Kyle has been busy since he last appeared on the show in 2020. He&rsquo;s taken his experience working in machine learning startups and started his own consultancy, Stratis Data Labs. He&rsquo;s been documenting his explorations working with LLMs and MCP on his blog, <em>The Signal Path</em>. </p> <p>Kyle is also writing a book about building MCP clients, services, and end-to-end agents. We discuss a recent article he wrote about the hazards of using an automated tool to convert a REST API into an MCP server. He shares his personal experiences with building MCP tools and provides additional resources for you to learn more about the topic.</p> <p>This episode is sponsored by InfluxData.</p> <div class="alert alert-primary" role="alert"> <p><strong>Spotlight:</strong> <a href="https://realpython.com/workshops/python-for-beginners/">Python for Beginners: Code With Confidence – Real Python</a></p> <p>Learn Programming Fundamentals and Pythonic Coding in Eight Weeks&mdash;With a Structured Course</p> </div> <p>Topics:</p> <ul> <li>00:00:00 &ndash; Introduction</li> <li>00:02:41 &ndash; Updates on career</li> <li>00:04:36 &ndash; The Signal Path - newsletter</li> <li>00:07:15 &ndash; Moving into consulting</li> <li>00:12:35 &ndash; Recent projects</li> <li>00:14:51 &ndash; Need for data skills with MCP</li> <li>00:16:49 &ndash; Describing the differences between REST APIs and MCP</li> <li>00:19:59 &ndash; Interaction model differences</li> <li>00:27:29 &ndash; Sponsor: InfluxData</li> <li>00:28:21 &ndash; Agent stories</li> <li>00:32:58 &ndash; Going through a simple example of MCP server</li> <li>00:37:50 &ndash; Defining client and server</li> <li>00:40:19 &ndash; Examples of servers currently</li> <li>00:51:44 &ndash; Announcement: Python for Beginners: Code with Confidence</li> <li>01:02:07 &ndash; Resources for further study</li> <li>01:05:07 &ndash; Breaking down advice on moving an API to MCP</li> <li>01:08:04 &ndash; What are you excited about in the world of Python?</li> <li>01:18:20 &ndash; What do you want to learn next?</li> <li>01:21:35 &ndash; How can people follow your work online?</li> <li>01:22:46 &ndash; Thanks and goodbye</li> </ul> <p>Show Links:</p> <ul> <li><a href="https://www.oreilly.com/library/view/ai-agents-with/9798341639546/">AI Agents with MCP - Book</a></li> <li><a href="https://realpython.com/podcasts/rpp/10/">Episode #10: Python Job Hunting in a Pandemic</a></li> <li><a href="https://www.jlowin.dev/blog/stop-converting-rest-apis-to-mcp?ref=thesignalpath.xyz">Stop Converting Your REST APIs to MCP</a></li> <li><a href="https://thesignalpath.xyz/stop-generating-mcp-servers-from-rest-apis/">Stop Generating MCP Servers from REST APIs!</a></li> <li><a href="https://context7.com/">Context7 - Up-to-date documentation for LLMs and AI code editors</a></li> <li><a href="https://www.anthropic.com/">Anthropic</a></li> <li><a href="https://modelcontextprotocol.io/docs/getting-started/intro">What is the Model Context Protocol (MCP)? - Model Context Protocol</a></li> <li><a href="https://github.com/github/github-mcp-server">github-mcp-server: GitHub&rsquo;s official MCP Server</a></li> <li><a href="https://www.reddit.com/r/mcp/">Model Context Protocol (/MCP) - Reddit</a></li> <li><a href="https://github.com/modelcontextprotocol/servers">modelcontextprotocol/servers: Model Context Protocol Servers</a></li> <li><a href="https://mcpmarket.com/server">Browse All MCP Servers - MCP Market</a></li> <li><a href="https://gofastmcp.com/getting-started/welcome">Welcome to FastMCP 2.0! - FastMCP</a></li> <li><a href="https://www.letta.com/blog/agent-memory">Agent Memory: How to Build Agents that Learn and Remember - Letta</a></li> <li><a href="https://kylestratis.com/">Kyle Stratis Personal Blog - The Edge Cases</a></li> <li><a href="https://thesignalpath.xyz/">The Signal Path</a></li> <li><a href="https://stratisdatalabs.com/">Stratis Data Labs</a></li> <li><a href="https://www.linkedin.com/in/kylestratis/">Kyle Stratis - LinkedIn</a></li> <li><a href="https://bsky.app/profile/kylestratis.com">Kyle (@kylestratis.com) — Bluesky</a></li> </ul> <p>Level up your Python skills with our expert-led courses:</p> <ul> <li><a href="https://realpython.com/courses/pydantic-simplify-data-validation/">Using Pydantic to Simplify Python Data Validation</a></li> <li><a href="https://realpython.com/courses/history-python-versions-features/">A History of Python Versions and Features</a></li> <li><a href="https://realpython.com/courses/interacting-rest-apis-python/">Interacting With REST APIs and Python</a></li> </ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast &amp; join our community of Pythonistas</a></p>