Dangers of Automatically Converting a REST API to MCP
<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, “AI Agents with MCP”.</p>
<p>Kyle has been busy since he last appeared on the show in 2020. He’s taken his experience working in machine learning startups and started his own consultancy, Stratis Data Labs. He’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—With a Structured Course</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:02:41 – Updates on career</li>
<li>00:04:36 – The Signal Path - newsletter</li>
<li>00:07:15 – Moving into consulting</li>
<li>00:12:35 – Recent projects</li>
<li>00:14:51 – Need for data skills with MCP</li>
<li>00:16:49 – Describing the differences between REST APIs and MCP</li>
<li>00:19:59 – Interaction model differences</li>
<li>00:27:29 – Sponsor: InfluxData</li>
<li>00:28:21 – Agent stories</li>
<li>00:32:58 – Going through a simple example of MCP server</li>
<li>00:37:50 – Defining client and server</li>
<li>00:40:19 – Examples of servers currently</li>
<li>00:51:44 – Announcement: Python for Beginners: Code with Confidence</li>
<li>01:02:07 – Resources for further study</li>
<li>01:05:07 – Breaking down advice on moving an API to MCP</li>
<li>01:08:04 – What are you excited about in the world of Python?</li>
<li>01:18:20 – What do you want to learn next?</li>
<li>01:21:35 – How can people follow your work online?</li>
<li>01:22:46 – 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’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 & join our community of Pythonistas</a></p>
Sentiment Analysis, Fourier Transforms, and More Python Data Science
<p>Are you interested in learning more about Natural Language Processing? Have you heard of sentiment analysis? This week on the show, Kyle Stratis returns to talk about his new article titled, Use Sentiment Analysis With Python to Classify Movie Reviews. David Amos is also here, and all of us cover another batch of PyCoder’s Weekly articles and projects.</p>
<p>Kyle discusses an article about distance metrics for machine learning. David shares a Real Python article about Python signal processing and Fourier transforms with scipy.fft. We also cover several other articles and projects from the Python community including, simulating real-world processes in Python with SimPy, working with Microsoft Excel using Python and OpenPyXL, why running code during import is a bad idea, what I wish I knew as a junior dev, the Raspberry Pi 400 personal computer, dynamic sky replacement and harmonization in videos with SkyAR.</p>
<div class="alert alert-primary" role="alert">
<p><strong>Course Spotlight:</strong> <a href="https://realpython.com/courses/simulating-processes-simpy/">Simulating Real-World Processes in Python With SimPy</a></p>
<p>In this step-by-step course, you’ll see how you can use the SimPy package to model real-world processes with a high potential for congestion. You’ll create an algorithm to approximate a complex system, and then you’ll design and run a simulation of that system in Python.</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:02:56 – Use Sentiment Analysis With Python to Classify Movie Reviews</li>
<li>00:09:49 – OpenPyXL: Working with Microsoft Excel Using Python</li>
<li>00:12:41 – An Illustration of Why Running Code During Import Is a Bad Idea</li>
<li>00:16:52 – Distance Metrics for Machine Learning</li>
<li>00:22:52 – Sponsor: linode.com</li>
<li>00:22:52 – What I Wish I Knew as a Junior Dev</li>
<li>00:35:29 – Fourier Transforms With scipy.fft: Python Signal Processing</li>
<li>00:39:44 – Simulating Real-World Processes in Python With SimPy</li>
<li>00:43:30 – Video Course Spotlight</li>
<li>00:44:35 – Raspberry Pi 400 Personal Computer Kit Now Available</li>
<li>00:49:55 – SkyAR: Dynamic Sky Replacement and Harmonization in Videos</li>
<li>00:52:04 – Creating an Idea Factory with Roam Research</li>
<li>00:56:02 – Thanks and goodbye</li>
</ul>
<p>Show Links:</p>
<p><a href="https://realpython.com/sentiment-analysis-python/">Use Sentiment Analysis With Python to Classify Movie Reviews</a> – In this tutorial, you’ll learn about sentiment analysis and how it works in Python. You’ll then build your own sentiment analysis classifier with spaCy that can predict whether a movie review is positive or negative.</p>
<p><a href="https://www.blog.pythonlibrary.org/2020/11/03/openpyxl-working-with-microsoft-excel-using-python/">OpenPyXL: Working with Microsoft Excel Using Python</a> – Ah, Excel. Everyone loves to hate it. But let’s face it. Excel is one of the most popular pieces of software ever written. But you love Python, not Excel, which is why you might want to learn OpenPyXL.</p>
<p><a href="https://utcc.utoronto.ca/~cks/space/blog/python/ImportTimeCodeStall">An Illustration of Why Running Code During Import Is a Bad Idea (And How It Happens Anyway)</a> – Code that runs when a module is imported is usually a code smell. But sometimes there’s no way around it.</p>
<p><a href="https://aigents.co/blog/publication/distance-metrics-for-machine-learning">Distance Metrics for Machine Learning</a> – Many machine learning algorithms can be summarized as transforming data to n-dimensional vectors and computing similarity between points by means of some distance metric. This article explores four of these metrics—the Euclidean, Manhattan, Minkowski, and Hamming distances—and how to compute them with Python.</p>
<p><a href="https://www.freecodecamp.org/news/lessons-learned-after-11-years-coding/">What I Wish I Knew as a Junior Dev</a> – Some of these are things even senior devs need to be reminded of sometimes!</p>
<p><a href="https://realpython.com/python-scipy-fft/">Fourier Transforms With scipy.fft: Python Signal Processing</a> – In this tutorial, you’ll learn how to use the Fourier transform, a powerful tool for analyzing signals with applications ranging from audio processing to image compression. You’ll explore several different transforms provided by Python’s scipy.fft module.</p>
<p>Projects:</p>
<ul>
<li><a href="https://realpython.com/courses/simulating-processes-simpy/">Simulating Real-World Processes in Python With SimPy</a></li>
<li><a href="https://www.raspberrypi.org/products/raspberry-pi-400/">Raspberry Pi 400 Personal Computer Kit Now Available</a></li>
<li><a href="https://github.com/jiupinjia/SkyAR">SkyAR: Dynamic Sky Replacement and Harmonization in Videos</a></li>
</ul>
<p>Additional Links:</p>
<ul>
<li><a href="https://realpython.com/podcasts/rpp/10/">Python Job Hunting in a Pandemic: RPP Episode 10</a></li>
<li><a href="https://en.wikipedia.org/wiki/Natural_language_processing">Natural language processing: Wikipedia</a></li>
<li><a href="https://spacy.io/">spaCy: Industrial-Strength Natural Language Processing in Python</a></li>
<li><a href="https://realpython.com/natural-language-processing-spacy-python/">Natural Language Processing With spaCy in Python</a></li>
<li><a href="https://www.nltk.org/">Natural Language Toolkit</a></li>
<li><a href="https://realpython.com/podcasts/rpp/20/">Building PDFs in Python with ReportLab: RPP Episode 20</a></li>
<li><a href="https://www.blog.pythonlibrary.org/">Mouse vs Python: Mike Driscoll Blog</a></li>
<li><a href="https://leanpub.com/py101">Python 101: 2nd Edition</a></li>
<li><a href="https://openpyxl.readthedocs.io/en/stable/">openpyxl - A Python library to read/write Excel 2010 xlsx/xlsm files</a></li>
<li><a href="https://realpython.com/courses/editing-excel-python-openpyxl/">Editing Excel Spreadsheets in Python With openpyxl</a></li>
<li><a href="https://fs.blog/how-to-read-a-book/">How to Read a Book: The Ultimate Guide by Mortimer Adler</a></li>
<li><a href="https://python-history.blogspot.com/2010/06/import-antigravity.html">import antigravity: The History of Python Blog</a></li>
<li><a href="https://durmonski.com/book-summaries/how-to-take-smart-notes/">How to Take Smart Notes by Sönke Ahrens - Summary</a></li>
<li><a href="https://www.youtube.com/channel/UCDM8HSaX0uoGCpUwQbQL58Q">Kyle Stratis’ YouTube Channel</a></li>
<li><a href="https://www.youtube.com/watch?v=kbjltXm64v8&t=12s">Creating an Idea Factory with Roam Research</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="https://realpython.com/courses/simulating-processes-simpy/">Simulating Real-World Processes in Python With SimPy</a></li>
<li><a href="https://realpython.com/courses/python-coding-interviews-tips-best-practices/">Python Coding Interviews: Tips & Best Practices</a></li>
<li><a href="https://realpython.com/courses/editing-excel-python-openpyxl/">Editing Excel Spreadsheets in Python With openpyxl</a></li>
</ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>
Python Job Hunting in a Pandemic
<p>Do you know someone in the Python community who recently was let go from their job due to the pandemic? What does the job landscape currently look like? What are skills and techniques that will help you in your job search? This week we have Kyle Stratis on the show to discuss how he is managing his job search after just being let go from his data engineering job. Kyle is a member of the Real Python team and has written several articles for the site.</p>
<p>We discuss Kyle’s career and the skills that he’s developed, which are currently helping him in his job search. Kyle left academia to work as a data engineer. His background helps him to communicate between teams of scientists and engineers.</p>
<p>We also talk about Kyle’s recent article on combining data in Pandas. Kyle shares a tip on Pandas efficiency, and hints at some lesser known features of Python generators.</p>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:01:27 – Kyle’s background on being let go</li>
<li>00:04:17 – Programming background and building connections</li>
<li>00:10:18 – Becoming a Data Engineer</li>
<li>00:15:59 – Translating between science and data teams</li>
<li>00:20:35 – Every job has different language requirements</li>
<li>00:23:44 – Getting out of your Python language comfort zone </li>
<li>00:27:08 – NASDANQ project - a stockmarket for Memes</li>
<li>00:30:34 – Learning the power of building a network</li>
<li>00:35:13 – Using skills developed in outside projects</li>
<li>00:38:45 – What does the job landscape look like currently?</li>
<li>00:49:52 – Writing for Real Python</li>
<li>00:52:53 – Combining data in Pandas article</li>
<li>00:55:22 – Merging in Pandas</li>
<li>01:03:05 – Feedback and community </li>
<li>01:10:37 – What are you excited ab out in the world of Python?</li>
<li>01:12:12 – What is something you thought you knew about Python but were wrong about it?</li>
<li>01:14:01 – What is a little known Python trick or tip?</li>
<li>01:14:33 – More efficient Pandas </li>
<li>01:15:52 – Using more of the advanced features of generators</li>
<li>01:18:55 – Thanks and Goodbye</li>
</ul>
<p>Show Links:</p>
<ul>
<li><a href="http://kylestratis.com/">Kyle’s Blog</a></li>
<li><a href="https://www.linkedin.com/in/kylestratis/">Kyle’s LinkedIn</a></li>
<li><a href="http://kylestratis.com/2017/10/29/mongodb-aggregation-pipelines/">A MongoDB Optimization: Kyle Stratis’ Blog</a></li>
<li><a href="https://www.cnet.com/news/memes-are-serious-business-with-their-own-stock-exchange/">Memes are serious business with their own stock exchange: CNET</a></li>
<li><a href="https://www.theverge.com/2017/1/10/14223264/meme-economy-reddit-stock-market">How a group of Redditors is creating a fake stock market to figure out the value of memes: The Verge</a></li>
<li><a href="https://news.avclub.com/the-joke-meme-economy-is-a-now-real-thing-called-nasdan-1798256124">The joke Meme Economy is a now real thing called NASDANQ: AV Club</a></li>
<li><a href="https://www.pedestrian.tv/money/forbes-did-a-v-serious-analysis-of-nasdanq-the-stock-market-for-memes/">Forbes Did A V. Serious Analysis Of NASDANQ, The Stock Market For Memes: Pedestrian</a></li>
<li><a href="https://www.domistation.org/">Domi Station in Tallahassee</a></li>
<li><a href="https://realpython.com/pandas-merge-join-and-concat/">Combining Data in Pandas With merge(), .join(), and concat(): Real Python article</a></li>
<li><a href="https://blog.codinghorror.com/a-visual-explanation-of-sql-joins/">A Visual Explanation of SQL Joins: Coding Horror</a></li>
<li><a href="https://github.com/tonybaloney/wily">Wily: A command-line application for tracking, reporting on complexity of Python tests and applications</a></li>
<li><a href="https://realpython.com/python-refactoring/#using-wily-to-capture-and-track-your-projects-complexity">Refactoring Python Applications for Simplicity: Real Python article</a></li>
<li><a href="https://realpython.com/fast-flexible-pandas/#pandas-apply">Fast, Flexible, Easy and Intuitive: How to Speed Up Your Pandas Projects: Real Python article</a></li>
<li><a href="https://realpython.com/introduction-to-python-generators/">How to Use Generators and yield in Python: Real Python article</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="https://realpython.com/courses/python-coding-interviews-tips-best-practices/">Python Coding Interviews: Tips & Best Practices</a></li>
<li><a href="https://realpython.com/courses/python-sorting-data/">Sorting Data With Python</a></li>
<li><a href="https://realpython.com/courses/idiomatic-pandas-tricks-features-you-may-not-know/">Idiomatic pandas: Tricks & Features You May Not Know</a></li>
</ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>