>>> import membership Talk Python Membership is here Become a member

Connecting Agents to Data via MCP, CLI, and More

Episode #569, published Mon, Nov 16, 2026, recorded Thu, Oct 15, 2026
0:00
01:02:44
Should your agent call an MCP server or just run a CLI? Pamela Fox joins us to share how she thinks about connecting AI and her data. She’s taught MCP workshops from PyCon to WeAreDevelopers. And, every week, an agent combs her Gmail, Outlook, and X history to build her news roundup. She uses MCP all day. Yet, there are still times you when to skip it. You'll hear how her colleague pitted the GitHub CLI against the GitHub MCP server on a real bug fix. The CLI used fewer tokens. It succeeded more often. So do we choose CLIs, MCPs, or even just APIs for connecting our agents to our data and services? Let's find out.

Watch this episode on YouTube
Play on YouTube
Watch the live stream version

Episode Deep Dive

Guest Introduction and Background

Pamela Fox is a principal cloud advocate at Microsoft and GitHub ("whichever company you prefer more," as she puts it). Her job is to use the company's developer tools and show developers how to get the most out of them, with a long-running focus on Python. She spent four years on Microsoft's dedicated Python advocacy team and has watched the company go from begging for Python SDKs to Python becoming the default language for new SDKs. Before Microsoft, she worked at Khan Academy and Google, where colleagues would ask her to search for things because she was that good at it. She was competing in web search events for Science Olympiad back in high school. She was also an avid builder of Web 2.0 "mashups" around 2006, combining the Flickr and Google Maps APIs into hundreds of little apps. Today she teaches MCP and agent workshops at conferences like PyCon (a three-hour workshop in Long Beach), WeAreDevelopers in San Jose, PyAI, and PyBay. She also writes in depth about MCP server design, tool filtering, and agent tooling on her blog.

What to Know If You're New to Python

This episode is mostly about how AI agents reach outside data and services, so it helps to know a little about APIs, the command line, and how an agent decides which "tool" to call. You don't need deep Python knowledge. A rough mental model of each of these pieces will make the MCP vs. CLI vs. API discussion much easier to follow.

  • APIs and JSON: An API is a programmatic way for one piece of software to ask another for data or actions, usually over HTTP with JSON responses. MCP is built on these same ideas (specifically JSON-RPC), so knowing what an API call looks like explains most of what an MCP server does.
  • Command line interfaces (CLIs): A CLI is a program you run in a terminal with commands and flags, like gh for GitHub or ruff for linting. Coding agents run CLIs the same way you would, which is why the episode compares them so directly with MCP servers.
  • Tools in an agent: Modern LLM agents are given a list of named "tools" (functions with descriptions and typed arguments) and decide when to call them. MCP servers are a standardized way to hand an agent a bundle of these tools.
  • Python packages and wheels: A wheel is the installable, pre-built format for a Python package. Michael's story about handing his agent a custom wheel shows how a small package can serve as a safe, limited tool for an agent.
  • Deterministic vs. non-deterministic code: Regular scripts do the same thing every time, while LLMs can produce different results on each run. A lot of the advice in this episode comes down to keeping the predictable parts in plain code and using the LLM only where you really need judgment.

Key Points and Takeaways

1. MCP, CLI, or API? Offer all of them and test with real agents

The central question of the episode is how to connect agents to your data and services, and Pamela's answer is that it's rarely either/or. Her colleague built an open source evaluation project that runs agents through realistic scenarios. In one test he compared the GitHub CLI (gh), the GitHub MCP server, and no tool at all on fixing a real bug in one of Pamela's repos. The CLI won: fewer tokens and more successful runs. Pamela explains why. The GitHub CLI is "deep, deep in the weights," while models know very little about the GitHub MCP server, which keeps changing. Her conclusion is that services should ideally ship a traditional API, an SDK, a CLI, and an MCP server optimized for agents, then measure how well agents succeed with each across a range of scenarios. Locally, use whatever works for you. But when agents are deployed to the cloud and talk to other services in production, "everyone's using MCP there," especially for enterprise agent interconnectedness.

2. What MCP actually is and how it works under the hood

The Model Context Protocol is a standard that lets AI applications connect to external systems. Pamela calls it the "extensibility story for agents." What makes it remarkable is that it was the first standard every major AI company actually agreed on. It came from Anthropic, and it's now supported in ChatGPT, GitHub Copilot, VS Code, and many consumer-facing tools. Under the hood, an agent connects to a server (often an HTTP endpoint like /mcp), does a handshake, and sends a JSON-RPC tools/list request to discover available tools. Those tool definitions go to the LLM with each request. When the model picks one, such as a hypothetical book_hotel, the agent sends tools/call with the arguments and gets JSON back. Michael pointed out that there's also negotiation over features like streaming and protocol version, which makes it a bit higher level than a plain HTTP API. Vendors don't always say "MCP" in their UIs: Claude calls them connectors, and ChatGPT wraps them as plugins with extra metadata.

3. MCP is bringing mashups back

Pamela was "absolutely addicted" to building Web 2.0 mashups around 2006, when APIs like Flickr and Google Maps let coders combine services in new ways. MCP brings that combinatorial power back, and this time it reaches non-coders too, because you can connect several MCP servers to one agent and ask in plain language. Her example: connect a conference's MCP server (the AI Engineer conference published one for its data) alongside your calendar server and ask which talks you can actually attend, then have the agent put them on your calendar. She ties this to a bigger shift she discussed with CS teachers: the stack of programming languages has climbed from machine code to assembly to C++ to Python, and now to natural human language. Michael shared that his daughter discovered Codex, built a website, and asked to stay up all night because she couldn't put it down.

4. Real MCP servers in daily use

Both Pamela and Michael shared the servers they actually rely on. Pamela uses the X (Twitter) MCP server to search the tweets she has liked and bookmarked as research, an unofficial Gmail MCP server a friend "vibed" (while she waits for an official Google Workspace one), the Microsoft Work IQ server for Outlook, Teams, and Calendar, the Microsoft Learn docs server, and the GitHub MCP server built into Copilot. She ties them together with an agent skill that runs every Tuesday at 9 a.m., combs her email, Outlook, and X activity from the past seven days, and produces the news roundup for her weekly generative AI office hours. She also noted that Linear has shared that its MCP usage shot way up. Michael uses the Talk Python MCP server to check whether a topic has been covered before, and the Sentry MCP server, which he used over three or four days to have Claude work through years of accumulated errors in his Flutter mobile app.

5. Bring your own smarter model to someone else's data

Michael tried the built-in AI assistant at Boldin, a DIY retirement planning service. It answered so fast that he didn't trust it ("This is like a haiku model at best"). He complained, the developer offered to build an MCP server, and a few weeks later Michael connected it to Claude with a frontier model and got answers he could trust. Pamela explained the dynamic: an app's built-in agent has to optimize for cost and may not use the best model, while the user may have access to something much stronger, like Opus 5.5, her "new bestie." That's also why she doesn't love MCP servers that wrap their own agent. She'd rather servers focus on returning data and "leave the agentic processing to people's agents."

6. MCP can reduce load on your site, and shopping sites should want agents

Many site owners see AI as something that swamps their servers. Michael argues that MCP can do the opposite. MCP tools are just functions in your code, so you can back them with caching and database indexes and point agents straight at optimized queries instead of letting them crawl pages. His logs showed recent MCP calls to talkpython.fm responding in about two milliseconds. Pamela added that we should assume people will use agents to interact with the sites they use. She was blocked from Etsy while having an agent shop for parts of a Link from Zelda costume (a character she's never played) and says she would have bought more if Etsy had an MCP server. DoorDash added one, which makes bulk office orders easy, and Shopify announced an MCP integration. The flip side is free-text social platforms, where automated reply bots make the experience worse. And advertising is the business model most threatened.

7. When not to use MCP: script the deterministic parts, use the LLM only for decisions

Playwright was one of the first popular MCP servers, and it introduced many people to browser automation. Pamela first built a LinkedIn connection-request triage agent with Pydantic AI and the Playwright MCP server. It worked eventually, but it was slow, flaky, and burned tokens as the model clicked around figuring out the page. Since the task was the same every day, she rewrote it with the Python Playwright SDK: the script restores her auth cookies in a headless browser, opens the requests, and only then calls an LLM with structured outputs that return accept, ignore, reject, or undecided along with a reason. Her prompt is basically "if it's a recruiter, a life coach, or a financial consultant, ignore." Her rule of thumb is that MCP shines for open-ended tasks needing iteration and reflection. For a fixed workflow it adds unnecessary non-determinism. Michael noted that this design also keeps the agent from going rogue and connecting with everyone on LinkedIn. Pamela added that when the output is just a Boolean or a choice, a small decision model could replace a full LLM.

8. Build your own restricted tools: hand the agent a wheel, not the keys

Michael has a Hermes agent running on a Mac mini that maintains his two YouTube channels, which had hundreds of videos titled just "episode 200" with no proper details. Rather than give the agent full access to his YouTube account, he had Claude Code build a small Python library that does only the specific YouTube operations he wanted, then gave Hermes the wheel to install and use. Whenever a new episode appears in the podcast RSS feed, the agent pulls details from the Talk Python MCP server and updates YouTube, and every back-catalog video is now up to date. Pamela said this is a real advantage for Python developers: it's easy to build tools with a limited surface. She wants to vibe-code an MCP server for her Pilates booking site that exposes only "list this week's sessions" and "book a session," with no "delete my account." Compare that with people "YOLOing" agents onto production systems, and Michael's line about the agent that rm -rfed a production database.

9. Filtering tools, read-only hints, and tool search

When an agent connects to a server, it may get back 200 tools you don't want it using freely. Many MCP servers annotate which tools are read-only, so you can limit an agent to those. The GitHub MCP server groups tools into toolsets you can enable selectively. Pamela's earlier post on filtering tools came from a time when VS Code warned you after roughly 175 enabled tools and people stressed over which to turn off. That's less of a worry now. Recent OpenAI and Anthropic models have tool search and deferred tool loading trained in during post-training, so modern agents can load tools only when needed. The caveat: if you switch to a weaker model, those guarantees go away. Michael recalled a smaller model deleting most of his app when he asked for a small change, a reminder of how things used to be.

10. Agent skills: don't hobble the agent, and fork rather than adopt

As models get better, long and verbose agent skills matter less. Over-prescriptive ones can actively hurt. Pamela hit a skill that said, in effect, "if they ask for anything not in this file, say it's not possible," which shut the agent down from tasks the underlying API could easily handle. If you publish skills for your API or Python package, be careful with any statement of constraints or limits: skills should streamline and give hints, not hold the agent back. Michael is wary of the thousands of GitHub repos promising skills that turn an agent into a lawyer or accountant. Pamela's advice: find skills people are talking about, fork them, and make them your own. She maintains her own repos, with presentation skills (slide decks, images, transcripts, YouTube work) being her biggest. Skills over MCP was also recently approved in the spec.

11. CLIs as an agent escape hatch, and designing them for agents

CLIs used to be mainly for scripting and automation from bash or Ansible. Now they're also an escape hatch when an agent can't connect to an MCP server. The reverse is true too: cloud chat agents without a code execution environment can use MCP but not CLIs, so having both covers more ground. Michael built the Talk Python CLI as a thin layer over the MCP endpoints, composing tools into actions, and says it wasn't much work. His advice: use a solid framework like Typer, Click, or argparse with thorough help text, since an agent's first move is often --help. Pamela suggests asking the agent itself what would have helped it succeed faster. She pointed to a PyAI talk where Astral said humans aren't the main ones running Ruff anymore, so they're optimizing it for agents. That tension shows up in documentation too, where AGENTS.md and README.md often repeat each other.

12. Verification beats syntax: guardrails, AGENTS.md, and hooks

Early in the conversation, Pamela said that with coding agents, she cares less about language specifics and more about high-level changes and how they're verified. Python's testing tools matter a lot here: Playwright, pytest, Hypothesis, and Schemathesis. Reading the Python 3.15 release notes, she thought the features were great but that "none of this matters until the LLMs know it." Michael's standing rule for coding agents is that they aren't done until ruff format, ruff check, and ty check all pass cleanly. Pamela keeps rules like that in her AGENTS.md and notes you can enforce them with agent hooks in VS Code, which fire far more often than a git pre-commit hook. Her favorite hook plays her kid's giggle every time the agent stops, and giggles harder and announces the session name if she's been away for more than a minute.

13. Checking MCP client support across tools and frameworks

The MCP spec keeps evolving. The most recent big release was July 28th, and clients often lag behind new features. Pamela pointed to a "Can I Use" style site, made by the MCPJam team, that shows which MCP features each client supports. MCPJam itself is like Postman for MCP servers: you can send requests, try features, and watch your OAuth flow succeed. Michael noted that support varies widely, for example Codex supporting more features than Claude Code. Pamela has asked for columns for Python agent frameworks like Microsoft Agent Framework, Pydantic AI, and LangChain. Skills over MCP shows why: no current client supports it yet, but some agent frameworks already do.

14. Getting started: build an MCP server in Python with FastMCP

Pamela's closing advice for Python developers is to never hand-write an MCP server from scratch. She recently saw a colleague do exactly that. Start with the official Python MCP SDK, which follows the specification, or with FastMCP from Prefect, which builds on the SDK and adds many useful integrations. FastMCP is what she always uses. You can point your coding agent at the FastMCP docs and have it build a server on the latest protocol version, which is now stateless and therefore more scalable and production-ready. If you do roll your own, run the MCP conformance suite to check it against the spec. Both hosts agreed that they didn't truly understand MCP until they built a server. In Pamela's case, it took building one, putting it in production, and then hitting an error with it.

15. Agents make information findable, sometimes surprisingly so

Michael once had Claude bring up a GitHub issue he'd filed three years earlier, without being asked. It turned out he was logged into the GitHub CLI and the agent had used it to explore the project. It freaked him out, but in the end it was useful. Pamela had a similar moment preparing for this episode. Her Copilot agent connected to her email and events, found the Google Doc of topics Michael had attached (which she had missed), and produced a full Markdown prep document from it. Her take is that even read-only search tools are hugely valuable because an agent "is not going to get bored after the first page" of results. As someone who was the go-to Googler even at Google, she's happy that everyone can now search that well, which makes information more universally accessible and useful.

16. Does the programming language still matter?

Pamela opened with a provocative observation: Microsoft no longer has a dedicated Python advocacy team, partly because coding agents make language less central, since "all that matters is the output." Python became the default for new SDKs, everyone uses JavaScript front ends now, and even her computer scientist dad had React on a slide, which she's sure is because of coding agents. Michael agreed but argued that programming skills still matter a great deal, just at a different level: design patterns, storage choices, and durability if a data center goes down. Pamela said syntax was only one way we expressed programming knowledge. Now we express architecture and the protocols for connecting systems, which is the thread that ties into MCP.

Interesting Quotes and Stories

"It's like the first standard that everybody jumped on board with. It is so hard to get all these companies to agree right now." -- Pamela Fox

"MCP enables us to make mashups really easily." -- Pamela Fox

"We're putting the power of this programmatic combinatorial power. We're giving it to everyone now." -- Pamela Fox

"I'd rather that they focus on returning the data and leave the agentic processing to people's agents." -- Pamela Fox

"Oh no, I don't trust this at all. This should have taken a little bit of thinking. This is like a haiku model at best." -- Michael Kennedy, on Boldin's built-in AI before they shipped an MCP server

"If they'd had an MCP server, then I would have bought a lot more on Etsy." -- Pamela Fox

"If there's any sort of open-endedness where it may have to do iteration and reflection and decide what it's going to do next, then an MCP server makes sense. But if you're doing the same thing every single time... it's just not necessary." -- Pamela Fox

"The GitHub CLI is deep, deep in the weights." -- Pamela Fox

"Humans aren't the ones running Ruff anymore. Agents are running Ruff." -- Pamela Fox, recounting a PyAI talk from the Astral team

"Find a skill you like and then fork it, make it your own." -- Pamela Fox

"Syntax was just one way that we expressed our programming knowledge." -- Pamela Fox

"I was reading the Python 3.15 release notes and I was like, oh, all of this is great... But none of this matters until the LLMs know it." -- Pamela Fox

"It RMRFed our production database. Why did you give it access to your production database?" -- Michael Kennedy

"I didn't really understand how they worked until I built one, put it in production and then had an error with it." -- Pamela Fox

The weekly news roundup agent: Every Tuesday at 9 a.m., an agent skill uses Pamela's Gmail, Work IQ (Outlook), and X MCP servers to gather everything she engaged with over the past seven days and build the news roundup for her generative AI office hours.

Fixing years of Sentry errors: Michael connected the Sentry MCP server to Claude in VS Code and worked through the backlog of errors in his Flutter mobile app one by one over three or four days, closing some and turning others into GitHub issues.

The Hermes YouTube janitor: Hundreds of YouTube videos titled just "episode 200" were fixed by a Hermes agent on a Mac mini that uses a purpose-built Python wheel and the Talk Python MCP server, and now updates YouTube within about 15 minutes of a site change.

The LinkedIn triage bot: Pamela's first attempt with the Playwright MCP server was slow and token-hungry. The rewrite scripts everything with the Playwright SDK and calls the LLM only for an accept/ignore/reject/undecided decision.

The giggle hook: Pamela's VS Code agent hook plays her kid's giggle every time the agent stops, and giggles harder and announces the session name if she's been away for more than a minute, so she can do laundry while the agent works.

Search champion: Pamela competed in web search events for Science Olympiad around 2001 (on Yahoo) and was the person colleagues asked to search for things even at Google.

Key Definitions and Terms

  • MCP (Model Context Protocol): An open standard, originally from Anthropic, that lets AI agents discover and call tools exposed by external servers.
  • MCP server: A service (often an HTTP endpoint) that exposes tools to agents via MCP. Examples from the episode include the GitHub, Sentry, X, Talk Python, and Boldin servers.
  • Connectors / plugins: Vendor-specific names (Claude's connectors, ChatGPT's plugins) for MCP-based integrations, sometimes with extra metadata added on top.
  • JSON-RPC: The remote procedure call format MCP uses for messages like tools/list and tools/call.
  • Tool: A named function with a description and typed arguments that an LLM can choose to call.
  • Tool filtering / toolsets: Limiting which of a server's tools an agent can use, such as only read-only tools or specific GitHub MCP toolsets.
  • Read-only annotation: Metadata on MCP tools marking them as safe, non-mutating operations.
  • Tool search / deferred tool loading: A capability trained into recent frontier models that lets agents look up and load tools on demand instead of loading every tool up front.
  • Agent skill: A packaged set of instructions (and sometimes scripts) that teaches an agent a workflow. Skills over MCP was recently approved in the spec.
  • AGENTS.md: A Markdown file in a repo with instructions for coding agents, the agent counterpart to README.md.
  • Agent hook: A script a coding agent runs automatically at certain events, such as when it stops, which fires far more often than a git pre-commit hook.
  • Structured outputs: Asking an LLM to return JSON matching a schema, as in Pamela's accept/ignore/reject/undecided LinkedIn decisions.
  • Mashup: A Web 2.0-era app that combined multiple public APIs, like Flickr plus Google Maps. Pamela sees MCP as the modern equivalent.
  • Conformance suite: A test suite that checks whether an MCP implementation matches the specification.
  • Stateless MCP: The latest protocol version's stateless design, which makes servers easier to scale for production.

Learning Resources

If this episode has you thinking about building tools, servers, and CLIs for your own agents, these courses will help you go deeper.

  • Agentic AI Programming for Python: Learn to work with tool-using coding agents like Claude and Cursor, including guardrails, roadmaps, and building a complete CLI tool, which fits right alongside this episode's discussion of agents, CLIs, and verification.
  • LLM Building Blocks for Python: Integrate LLMs into your Python code and turn prompts into structured data, the same technique Pamela uses to have her LinkedIn bot return clean accept/ignore decisions.
  • Python for Absolute Beginners: If you're new to programming, start here to build the foundation you need to write your own scripts, tools, and eventually MCP servers.

Overall Takeaway

The real question isn't MCP versus CLI versus API. It's which interface gives your agent the right amount of power for the job. Pamela Fox's experience points to a clear pattern: use MCP for open-ended, multi-service work and production agent-to-agent integration, lean on CLIs that already live in the model's weights, and script the deterministic parts so the LLM only makes the decisions that need judgment. For services, the best move is to offer all of them and test how real agents perform. For Python developers, there's a bigger opportunity. With FastMCP, Typer, and a coding agent, building a small, safe, purpose-built tool takes an afternoon. That's how Michael tamed hundreds of YouTube videos and how Pamela triages LinkedIn. Like the mashups of 2006, this is a moment where anyone can combine services in new ways. The best way to understand it is the way both hosts did: build an MCP server, ship it, and learn from what breaks.

Guest
Pamela Fox: pamelafox.org

Meetup: SQLite Might *Actually* Be All You Need: talkpython.fm

MCP: modelcontextprotocol.io
WeAreDevelopers workshop: pamelafox.github.io
slide 16: pamelafox.github.io
To MCP or not to MCP: blog.pamelafox.org
MCP: Bringing mashups back: blog.pamelafox.org
MCP auth session: www.youtube.com
Pydantic AI \+ Playwright: blog.pamelafox.org
post: blog.pamelafox.org
PyAI talk: www.youtube.com
post: blog.pamelafox.org
POSETTE talk: www.youtube.com
post: blog.pamelafox.org
Can MCP choose my outfit: blog.pamelafox.org
Talk Python now has a CLI: talkpython.fm
FastMCP: gofastmcp.com
Typer: typer.tiangolo.com
Click CLI: click.palletsprojects.com
Boldin: www.boldin.com
Sentry MCP: mcp.sentry.dev
X.com MCP: docs.x.com

Watch this episode on YouTube: youtube.com
Episode #569 deep-dive: talkpython.fm/569
Episode transcripts: talkpython.fm

Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong

---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython

Bluesky: @talkpython.fm
Mastodon: @talkpython@fosstodon.org
X.com: @talkpython

Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @mkennedy@fosstodon.org
Michael on X.com: @mkennedy

Episode Transcript

Collapse transcript

00:00 Should your agent call an MCP server or just run a CLI?

00:04 Pamela Fox joins us to share how she thinks about connecting AIs and her data.

00:09 She's taught MCP workshops from PyCon to VR developers, and every week an agent combs her Gmail,

00:16 Outlook, and X history to build her news roundup.

00:20 She uses MCP all day, yet there are still times when you should skip it.

00:24 You'll hear how her colleague pitted the GitHub CLI against the GitHub MCP server on a real bug.

00:30 The CLI used fewer tokens.

00:32 It succeeded more often.

00:33 So do we choose CLIs, MCPs, or even just APIs for connecting our agents to our data and services?

00:41 Let's find out.

00:42 This is Talk Python To Me, episode 569, recorded October 15th, 2026.

01:04 Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.

01:09 This is your host, Michael Kennedy.

01:11 I'm a PSF fellow who's been coding for over 25 years.

01:15 Let's connect on social media.

01:16 You'll find me and Talk Python on Mastodon, Bluesky, and X.

01:20 The social links are all in your show notes.

01:22 You can find over 10 years of past episodes at talkpython.fm.

01:26 And if you want to be part of the show, you can join our recording live streams.

01:30 That's right. We live stream the raw uncut version of each episode on YouTube.

01:34 Just visit talkpython.fm/youtube to see the schedule of upcoming events.

01:39 Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.

01:43 Before we dive into the show, I want to tell you about an upcoming members meetup here at Talk Python.

01:49 The title, SQLite Might Actually Be All You Need.

01:54 This talk dives into running SQLite in production and why, surprisingly,

01:58 it might be one of the best production databases you can choose.

02:03 Here's something I haven't really talked about yet.

02:05 Talk Python doesn't run on MongoDB anymore.

02:08 After years on Mongo, I've moved almost all of our sites to SQLite, the database that you might file under.

02:14 Fine for prototypes and phone apps.

02:16 I knew an in-process database would have some speed advantages, but what I didn't expect is that it's 40 to 300 times faster on our data.

02:26 Now, looking up a guest takes 1.5 microseconds.

02:29 That's 1 1,000th of a millisecond, or over 600,000 calls a second from plain Python.

02:36 And a write?

02:37 Well, that's 1 1 100th of a millisecond.

02:40 But then there's that question that scares people off.

02:42 What happens when the server dies?

02:44 This is where the surprises live.

02:47 So I hope you join me for the members tech meetup.

02:49 It's on December 2nd at 10 a.m.

02:52 U.S. Pacific time.

02:53 Find all the details at Talk Python.

02:55 Just click membership and go to the tech talks.

02:58 Add it to your calendar right there.

03:00 I hope to see you at the meetup and share some SQLite surprises with you.

03:04 Pamela, welcome to Talk Python To Me.

03:06 It is long past time I had you on the show.

03:08 Really glad you're here.

03:10 Awesome.

03:10 It's so fun to be here.

03:11 We're going to talk about some of the craziness of 2026 and choices.

03:18 Should we MCP to MCP or not?

03:21 Was that the Shakespeare question? I think that was it.

03:23 Yeah, exactly.

03:24 Or the CLI or APIs, or basically I've got some data and services and I want to connect them to my code, to my agents.

03:32 How do we do that, right?

03:33 I know you've written a whole lot about this and people should absolutely check out your blog, but especially conference talks.

03:40 You're an awesome technologist and I really loved all of your presentations,

03:43 you know, including the one just at PyBay where we were.

03:45 How was PyBay? What do you think?

03:48 I thought PyBay was really fun.

03:51 I love the Python conferences, getting to meet the local community and you had a great talk at it as well.

03:58 Oh, yeah.

03:58 Thanks. That was really fun about Talk Python in production.

04:00 that will come out eventually.

04:02 I'm sure the videos of those will come out. They were recorded, so they wouldn't record them for no reason.

04:07 Yes.

04:08 So really, really cool. Now, before we dive in, as per usual, just give people a quick background on you.

04:13 Yeah, sure.

04:14 So I am Pamela Fox. I am currently at Microsoft and or GitHub, whichever company you prefer more.

04:24 And I am a principal cloud advocate.

04:26 So that means that generally, like I'm using all of our developer tools and showing developers how to use them.

04:33 I tend to focus on Python.

04:35 We had like an official Python advocacy team for four years and we don't anymore,

04:42 which is sad.

04:43 And that's kind of part of the change due to coding agents where like languages are not as much of a thing anymore

04:50 because the coding agents can just code and whatever and all that matters is the output.

04:55 So now, you know, I guess there's just this big question as to how much does your language even matter anymore.

05:02 So I'm glad on that note with PyBay, I currently think it's great that we still have these Python-specific conferences.

05:09 It will be interesting to see how long language is the theme that holds together a community.

05:15 What an interesting idea.

05:16 I've been thinking about this a lot too, and I fright.

05:19 I was, before we go down this AI thing, when you were talking about not specifically having a Python team,

05:26 one of the thoughts I had, well, like Python is just so popular, just it's expected.

05:30 It's not this niche thing where we brought in a few people that know this weird no curly braces language.

05:35 You know what I mean?

05:36 But like just the advocates know about Python.

05:39 And so maybe you don't need a specific Python team.

05:41 Yeah, I guess two things happen is one is that more and more the advocates from the other language teams

05:47 found themselves using Python because you almost have to now because that's like it became the default language for new SDKs, right?

05:54 When I first joined Marksoft, it was the opposite, right?

05:56 where we had to like kind of beg for a Python SDK.

05:59 And then people had to beg for like SDKs in C#, which is a crazy thing for Microsoft

06:04 because Microsoft is like a huge, you know, C# user.

06:07 Like they may have created the language.

06:09 Right, that thing.

06:10 Yes, yes, that's true.

06:12 So yeah, so I think part of it is that just basically all advocates, you know,

06:17 they're, you know, we're all there.

06:18 Everyone's using Python now, all using JavaScript now.

06:21 Everyone's using every, you know, because it's just so easy to add on, you know, a React front end.

06:25 I saw a talk from my dad the other day.

06:27 He's a computer scientist.

06:29 And on his slide, he had like React front end.

06:31 I was like, what?

06:32 Dad, you're doing React?

06:34 Like what has happened, right?

06:35 That's only due to coding agents.

06:38 I guarantee it.

06:39 Because there's no way that my dad would be just like suddenly like, well, I'm like seven

06:44 years old.

06:44 I think it's time that I learned React, right?

06:47 Exactly.

06:47 It's like, Pamela, what are you using Node for?

06:49 We all use Bun now.

06:51 Come on.

06:52 What?

06:53 Who are you?

06:54 Yeah.

06:54 I need to call him up so we can talk JavaScript now.

06:57 Funny.

06:57 Yeah, you're right.

06:58 And I honestly don't even know if I want to talk about it because it makes me a little bit sad.

07:03 But I do think that there is also something to the second half of the reason that you gave.

07:07 And that's we don't necessarily have to read the code.

07:10 Should we read the code?

07:11 I don't know.

07:12 I'm very conflicted.

07:13 I actually was thinking today about building a little GUI application, plug into an LLM,

07:19 maybe an MCP, who knows, that would basically go to a code base and go from this git commit to that one i need i need a tour

07:27 of what has happened will you explain this to me because git history is not there's a thousand

07:32 change files what is significant what do i you know what i mean something like that would be cool

07:36 yeah yeah we care more about the high level changes and also just how they're being verified

07:41 so i think like in terms of python you know what i am most interested in is you know the verifiability

07:48 We do have great testing frameworks in Python.

07:50 So I think we can continue, you know, talking about those testing frameworks,

07:54 like how you could encourage your agents to use PlayWrite and use pytest and use hypothesis and schema

08:00 thesis and all of that stuff.

08:02 And, you know, at least guide it to using like an async FastAPI, you know, versus a

08:08 sync framework.

08:10 But the specifics of Python, you know, not as useful.

08:15 I was reading the Python 315 release notes and I was like, oh, all of this is great.

08:19 I'm glad.

08:19 I know.

08:20 I'm glad they added this.

08:21 But none of this matters until the LLMs know it.

08:26 I see.

08:27 Until they've been pointed at the release notes and until I'm using 315 in production.

08:32 We're going to see what the world brings.

08:34 But it is trending this way and it is weird.

08:36 I don't think that means that people without programming skills are not needed or don't

08:40 have value.

08:41 I think there's tons.

08:42 It's just not in the structure level.

08:45 It's like, okay, we need this kind of design pattern.

08:47 We need this kind of storage.

08:49 What are we going to do about, you know, durability if this data center goes down and we got our data there?

08:54 That kind of questions, yeah?

08:55 Yeah, and that's all things we've learned.

08:57 You know, syntax was just one way that we expressed our programming knowledge.

09:01 Now, you know, we're really going to express the architecture side of it because that's where,

09:06 you know, we still need to think a lot about how we're going to architecture things,

09:09 what the protocols are that we're going to use in order to interface across systems,

09:13 which that's like a good lead in for today's topic, because, you know, that I think the protocols are increasingly the important

09:20 part.

09:20 Absolutely.

09:21 All right. Well, let's go ahead and dive into it. I think, as I said, I kind of

09:24 want to structure this around MCP because that's maybe the most obvious choice. Somebody says,

09:29 I want to connect this thing to my AI. Well, MCP were obviously right.

09:34 However, there's a lot of options, as we'll see.

09:36 And there's times you do and don't use MCPs. But let's start with that story.

09:41 So I had a Den Bilomarski on the show a while ago to talk about MCP protocol.

09:47 But honestly, it's like a year ago and in AI world, you know, how crazy, how long ago was that?

09:53 So maybe we should just start from the beginning.

09:56 You know, what is an MCP?

09:58 What is MCP? And what is an MCP server?

10:00 Like, why do we care about this stuff?

10:01 Right.

10:01 So MCP is, you know, it's the standard for helping AI applications to discover context,

10:09 or here it says to connect to external systems.

10:13 We basically wanted a standard way where we could extend our agents with access to additional tools,

10:20 right?

10:20 So it's extensibility story for agents, and it's a standard.

10:23 And it's like, the cool thing is, it's like the first standard that everybody jumped on board with, right?

10:28 It is so hard to get all these companies to agree right now, And they're like fighting on Twitter.

10:35 It's like, come on, can't we all get along?

10:37 And finally with MCP, you know, we can all get along.

10:39 So this is, you know, originally came from Anthropic with Claude.

10:43 But now there's great support in ChatGVT.

10:45 You know, at Microsoft, we've got GitHub Copilot and VS Code.

10:49 But there's also like consumer facing tools that have support for it.

10:53 My business friends talk to me about MCP.

10:56 Really?

10:57 Okay.

10:57 Yeah, yeah.

10:59 Their messaging made me like, oh, I just pitched this, you know, like extra using MCP.

11:04 So yeah, because it's, you know, it's a standard that works across agents

11:10 and agents are both developer facing and user agent.

11:14 There's, you know, in the last few weeks, we've had GrokBot and Muse and there's so many new ones that pop out every week.

11:22 And a lot of those are connecting behind the scenes using MCP.

11:26 They don't always call it MCP.

11:27 Chachapi calls it plugins, right?

11:30 Like on their opening iDev day, They talked about ChattoBee plugins behind the scenes.

11:34 Those are very much based off the MCP standard, right?

11:38 So, you know, you're not always going to see MCP prominently displayed in the UI for these user-facing agents.

11:47 Yeah, I think if I go to Claude and I try to connect to it, it tells me what you need to do is add a connection,

11:54 not an MCP server, right?

11:55 I'm like, this is where the MCP goes?

11:57 You know what I mean?

11:58 Yeah, yeah.

11:58 So I think they call it like connectors or connections.

12:01 I'd be happy if they all call them MCP, but a lot of times they do wrap some additional things on top.

12:06 Like ChatGPT, they wrap plugins in some additional metadata that helps them plug into the UI certain ways.

12:14 So I think that's why they're calling it, they're coming up with their own name for it,

12:21 just so they can add additional things on it.

12:23 Yeah, that makes a lot of sense.

12:25 And I guess it's like an API, right?

12:28 Right.

12:28 Okay. So here's how it actually, like, I'll just tell you the actual, I mean, this is a developer,

12:32 right? So what actually happens is first there's a handshake, right?

12:37 So you register an MCP server and a lot of times your server is what's called an HTTP server. So there'll be actually like a URL for it.

12:44 So it's like, you know, hpcoolserver.com slash MCP.

12:48 And then the agent will connect to that server.

12:52 So it'll send a handshake to that server.

12:54 And during that handshake, it's going to ask the server what tools it has.

12:58 because tools are like the there's other things that servers can expose but tools are like the

13:02 really really important thing um so it'll say uh tools slash list so it sends this is a json rpc

13:09 so it sends this json rpc uh you know hp requests to the server say hey what tools do you have

13:15 and any other sort of discoverability it wants to do at that point mcp servers will support skills

13:20 soon as well that's exciting um so it could discover those too so it discovers the tools

13:25 the tools will come back.

13:26 And once it has the tools, now the agent can populate its tools list with all the list of tools.

13:32 And then it can decide to send those tool names to the LLM every time it's processing a user request.

13:39 And if the LLM, the user request and says, oh, I've got a great tool for that, like book hotel,

13:44 right? Maybe that's a tool and they want to book hotels.

13:47 Then it's going to send a request to the MSP server that says it's like tools slash calls.

13:53 And then it sends in arguments and says, OK, hotel in city, San Francisco,

13:57 start date, October 15th, end date, October 17th.

14:01 And so that sends, you know, basically like a remote procedure call like to the,

14:05 you know, to that MSP server and the server processes it and responds back with,

14:10 you know, JSON or, you know, however it wants to respond.

14:12 Yeah, it's a little bit like an HTTP endpoint, but it's a little bit where the tools are, the individual functions that you might or the endpoints you might call with an API client.

14:25 But there's kind of a negotiation as well.

14:26 Like, do you support streaming?

14:29 What version of MCP are you?

14:31 So it's a little bit more high level than the HTTP APIs, right?

14:35 Like maybe GraphQL or one of those types of something built on top of it, right?

14:40 But it's still very approachable for Python people.

14:42 It's more opinionated because it's saying like, you know, it's saying this is specifically for agents.

14:47 Agents want to know about tools.

14:49 That's what they need.

14:50 And they also want to know about, you know, in the future about skills.

14:53 Right.

14:54 But, you know, it's using mechanisms that we understand behind the scenes like JSON RPC.

15:00 Nice.

15:01 Yeah, I just last year, I can't remember exactly when it was.

15:04 I built a MCP server for the podcast.

15:07 So you can ask it like, what did Talk Python cover on this?

15:11 And instead of having to go and do a full search of all the pages of the website,

15:16 the thing could just connect and run database index backed super fast queries,

15:21 right?

15:21 So it gets really quick answers and answers.

15:23 I'm seeing now a lot of conferences.

15:26 Well, not maybe a lot, but the nerdiest conferences will actually have MCP servers to interact with their data, right?

15:32 So AI engineer did that and that was really fun.

15:34 That's awesome.

15:35 example for the talk's schedule and stuff.

15:39 Like, hey, I'm interested in this.

15:41 What talk should I go see next?

15:42 Right.

15:43 That kind of question would be awesome to answer right away.

15:45 Yeah.

15:45 And then, so here's what's nice about MSP is that then you can connect multiple MSP servers

15:50 to your agent, right?

15:51 So example, you could connect the, you know, like the AI engineer MSP server for that conference.

15:57 And you could also connect like the Google Calendar, like, you know, or in my case, I

16:02 use the Microsoft WorkIQ MCP server for access to my Outlook.

16:06 And so then in theory, you can be like, hey, which of these talks am I even like available to attend?

16:11 Could you also just like put it on my calendar?

16:14 Right.

16:15 So this is what excites me about MCP is that MCP enables like us to make mashups really easily.

16:22 Right.

16:23 Like, you know, I don't know how people know the term mashups but back with like web 2.0 i love it yeah it was like 2006 like we're you know we had this

16:33 huge boom of the hdgp web 2.0 apis that were very you know fun to use like the flicker api and google

16:41 maps and all that stuff and i was making like hundreds of mashups i was absolutely addicted

16:46 um but it was it was so fun but like i was able to do that because i was you know i was a coder

16:50 now the difference is you know obviously yes as coders we can make these mashups but we can

16:55 enable anyone to make these mashups, right? Like we're putting the power of this,

17:01 you know, this, this programmatic combinatorial power, we're giving it to everyone now.

17:07 Yeah. For all the trouble that AI is causing trouble, I don't know, disruption,

17:11 I guess, in our industry and others, you know, I do think there's something very special about being able

17:17 to give people this power to speak in regular English or whatever language you speak to a

17:22 computer and it's almost like programming.

17:24 Yeah.

17:24 Yeah. I mean, I think that's also just generally true, not just with MCP,

17:28 but, you know, I gave a talk last week to CS teachers talking about, you know, the stack of programming languages.

17:34 And we went up from, you know, assembly, machine, assembly, you know, C++,

17:39 higher level like Python.

17:40 And now, you know, we're at natural human language, right? Like we have lowered the barrier so that anyone spoken language can basically code something,

17:50 Right.

17:50 So, yeah.

17:51 Yeah. My daughter just discovered Codex and she wanted to build a website.

17:55 And after a few hours, she goes, Dad, is it OK if I stay up all night?

17:58 I can't put this down.

17:59 Like, you're going to run out of credits before you stay up all night.

18:02 But don't do that.

18:03 But that's kind of how the excitement is, you know.

18:06 That reminds me of discovering the web like in like sixth grade.

18:09 I definitely stayed up all.

18:10 The first time you discover that you can make, you know, like a web app or a piece of software,

18:15 it's a long night.

18:17 It's an amazing night.

18:18 But the next day, oh, boy, what have I done?

18:20 What have I done?

18:21 So make this a little bit concrete.

18:23 Give us some specific MCP servers that you use.

18:27 And I'll share a couple of mine as well, but I'm going to let you go first on this.

18:30 Yeah.

18:31 So the ones that I use the most often, there's the Twitter X MCP server.

18:37 So I have that installed.

18:39 And that, you know, can search through all the tweets, especially the tweets I've liked and bookmarked because I use that basically as like research,

18:45 right?

18:45 because I obviously am using Twitter purely for educational purposes and, you know, not just for procrastinating.

18:52 So every week it actually like goes through and, you know, looks at stuff.

18:55 And it also is like helps me like manage bookmarks, right?

18:58 So I can put all my bookmarks in one place.

19:00 So yeah, there's the XMCP server.

19:02 I didn't know this existed.

19:04 This is, this could be a problem if I learn about this.

19:06 Yeah.

19:07 Yeah, yeah.

19:08 They've been improving it over time.

19:10 You still, there's still a fair bit of setup for it.

19:12 It's not the most, you know, most user friendly.

19:15 um but uh you know it's it's working decently well uh let's say i also have the um a gmail mcp server

19:25 which is not quite an official one but it's working well enough for now we're still waiting for it i

19:29 think they're about to come out with this like google workspace mcp server so i'm excited for

19:33 that oh that is exciting yeah yeah i basically my friend like vibed an unofficial this is the thing

19:39 is you can make your own mcp servers that wrap things if you need it so right now i'm using like

19:43 an official vibe Gmail MCP server.

19:46 I use the WorkIQ MCP server.

19:48 That gives me access to my work, Microsoft stuff, like Teams, Outlook, that sort of thing, Calendar.

19:54 And yeah, and then I have some documentation servers.

19:57 Like we have a documentation server just for Microsoft Learn, and that's where all of our documentation is.

20:01 So I'm not even using that many MCP servers, but the ones I am using are just absolutely essential,

20:10 right?

20:10 So like every week I hold an office hours where we talk about what's going on in generative AI.

20:15 And I have a skill for that, an agent skill that specifically uses all those MCP servers to go to research.

20:21 So it goes and looks through my Gmail, it looks through my Outlook, it looks through my Twitter history and says,

20:26 okay, these are everything that's happened in the last seven days, right?

20:30 And it can just do that every Tuesday at 9 a.m., automatically run, and then boom,

20:35 got my news roundup.

20:37 And it's based off the last week of what I have been engaging with myself personally,

20:43 right?

20:44 Yeah, and for your role, it's really important to kind of stay on top of the news

20:47 and what's happening in tech and all that, right?

20:49 So being able to ask that as a question.

20:51 Right, yeah, that's true.

20:52 Like for every role, there's different MCP servers that are really shy.

20:55 Like for other people, they're, you know, like the linear MCP server, they've had a huge,

20:59 I think they get more traffic from MCP than via like their UI now or something.

21:04 And they shared some chart where they're like, MCP usage is just, you know,

21:08 shot way up, right?

21:10 And that makes a ton of sense, right?

21:11 Like if you're tracking all your issues in linear, you know, then you're going to have a lot of use.

21:17 I also obviously use, I'm sorry, I didn't even think about the GitHub MSP server

21:20 because it's like built in GoPilot, but you know that, you know, because my issues are stored in GitHub.

21:25 There's Azure DevOps that I'll use sometimes if I'm working on a project that is there.

21:29 So depending on what your role is, you know, what your job is, you know, there's going to be different MSP servers

21:34 that are going to like really enhance your productivity and other ones that you just don't need.

21:38 Yeah, very cool.

21:39 So for me, I make a lot of use of the Talk Python one because it lets me ask questions like,

21:45 have we talked about this before?

21:46 What have we covered?

21:47 Is it going to be just a repeat or that kind of stuff really nicely?

21:51 One, just to give a bit of an outside-of-the-box angle, is I found this place.

21:59 Also, Century MCP.

22:00 Century MCP is awesome because I have Century plugged into all my apps, and I love it for my web apps, but I'm a good web developer.

22:07 I can do this, but you know what?

22:08 I'm not a good developer of mobile apps.

22:10 I'm barely hanging on to the edge to keep my mobile app going because I didn't write it.

22:16 I don't know it.

22:17 Like, it's just like, but okay, sort of.

22:19 And I had Sentry connected to it for years and it just built up this huge backlog of errors.

22:25 And I'm like, you know what?

22:25 I'm tired of these errors.

22:27 I think one week and I said, I bet Claude and I, given all that Sentry data with all the errors,

22:32 I bet we can go fix almost all of them.

22:34 And so I just connected the MCP server and I opened up VS Code with Flutter and I said,

22:38 all right, Claude, I want you to look here.

22:40 We're going to go there one at a time until these are gone.

22:43 And it took three or four days, but I completely refreshed the app with all the details from the MCP server.

22:49 And I would just say, okay, what's next?

22:51 Yeah, go ahead and close that one.

22:52 Let's make a GitHub issue for that.

22:53 You know what I mean?

22:53 And just, I kind of was just guiding it.

22:56 And it completely, I think this is an amazing thing.

22:59 These error-based systems that catch all the errors and you can just say,

23:03 go to the Claude or Codex, go, there's an error in Sentry, fix it.

23:06 You know what I mean?

23:07 That's all it needs.

23:08 Yeah, that's amazing.

23:09 I can remember using Centurate Khan Academy and having those errors just build up over time.

23:13 And you're like, one day, one day I'm going to fix them.

23:15 But it is so hard to prioritize bugs when you're always like features.

23:20 But now we can paralyze a bit more and you get the help of being able to sort through logs.

23:26 At this point, I'm never going to look through an error traceback myself,

23:29 especially with Python async.

23:30 Man, Python async tangent.

23:32 But Python async errors, the tracebacks are so hard to parse through, right?

23:37 So these days I'm just always going to paste a trace back into an agent and be like, okay, what's the actual error here,

23:44 right?

23:44 Yeah.

23:44 This is wrong.

23:46 There's something wrong.

23:47 I know this is wrong.

23:48 We're fixing this, right?

23:50 And then another one that I think we'll see if you would see this coming.

23:54 So there's this place.

23:55 So I was thinking about like retirement planning, right?

23:57 Eventually I'm going to retire someday.

23:59 And I'm like, I ran across this place called Bolden.

24:02 It's not an advertisement.

24:03 Just thought it was interesting.

24:04 And it says, it's the DIY retirement.

24:07 Like you can run any what if on their AI.

24:10 If you put your sort of financial situation into it, you can ask, like, if I put more in 401k now,

24:16 will that save?

24:17 You know, like what's this going to have an effect on, right?

24:19 And if the market does this, what would that do?

24:20 You know, like these kinds of things.

24:22 And I asked it a question and I was like, I'll try this AI thing.

24:25 So I asked it a question.

24:26 It came back like that with an answer.

24:27 I'm like, oh, no, I don't trust this at all.

24:29 This should have taken a little bit of thinking.

24:31 This is like a haiku model at best.

24:34 You know what I mean?

24:35 There's no way there's a good AI here.

24:36 So I complained to them.

24:38 And the developer wrote back and said, well, what if we build an MCP server?

24:41 I said, yes.

24:42 And then a few weeks later, like, here's the MCP server.

24:44 So I connected it to Claude on like Fable or Opus or something.

24:48 And then I'm like, okay, now I can ask questions I trust the answers to.

24:52 Yeah, that's a good point.

24:53 Because when you, right, that's a good point.

24:54 Because a lot of these applications have, you know, this has like an agent.

24:58 You can see it on this, the front web page.

25:00 It says like AI planner assistant.

25:02 But they need to optimize for cost, so they're not necessarily going to use the most expensive model there.

25:06 They may not have access to the best model.

25:09 You might, for whatever reason, you've got Fable.

25:12 I don't even have Fable, but I've got Opus 5.5, which is my new bestie, right?

25:16 I love 5.5.

25:17 Yeah, I love Opus 5.5.

25:18 It's so good.

25:19 So I can.55, and I can trust that.

25:24 And we should be using the EPSP server for the data.

25:29 There are some MSP servers that do also basically wrap an agent.

25:32 I don't love that as a design choice, but it is certainly a choice that some MSP servers are using.

25:41 But yeah, I'd rather that they focus on returning the data and leave the agentic processing to people's agents.

25:47 Right.

25:48 Your job is to get the data to the smart agent that I'm running, not do your own thing on top of it.

25:53 Exactly.

25:54 I want to throw one more thing out there really quick, and maybe you can give us your thoughts if you have any.

25:59 I know a lot of people when they think about AI and their website or their app,

26:03 they're like, here's a thing that is swamping my app.

26:05 It's making it slow.

26:07 It's overwhelming the bandwidth.

26:08 And I hate it.

26:09 So MCP probably just makes this worse.

26:11 I don't think that's true.

26:13 I think that a lot of people might have this sort of thought process, right?

26:16 Like it's just going to mean it's going to talk to my site more and so on.

26:20 But when you build these MCP tools, as you pointed out, you build the tools.

26:24 Those are basically function calls on your code.

26:27 And you can do whatever you want there.

26:29 You can use caching.

26:30 You can use database indexes.

26:31 You can make them incredibly fast.

26:33 So instead of having an AI crawl all over your stuff, it can just go right to an optimized spot and go,

26:38 this is what I'm actually looking for.

26:39 All right, here's a super fast response.

26:42 Harkening back to the PyCon, PyBay talk.

26:44 Pulled up my logs in the last couple of MCP calls on my site were like two millisecond response time.

26:50 That doesn't hurt my site.

26:51 I don't care.

26:51 They can ask questions like that.

26:53 This is the way to, I think, lessen the work on your server and your app, not increase it.

26:58 Yeah, that's really true.

26:59 I think at this point, we should assume that people are going to use agents to try to automate

27:05 interaction with the websites they're using, right?

27:07 So for example, I was trying to programmatically browse Etsy the other day to help with my

27:13 costume shopping because I wanted to be Link from Zelda and I needed to put together lots

27:18 of different parts.

27:19 And I actually have never played Zelda.

27:21 So I was like, assuming the coding agent knows more about Link than I do,

27:25 you know, because it's in the weights.

27:28 It's not in my weights, right?

27:29 But I was immediately blocked from Etsy.

27:32 And Etsy does not have like a shopping MCP server.

27:36 So if they'd had an MCP server, then I would have bought a lot more on Etsy.

27:41 Yeah, isn't that surprising?

27:43 They're like, no, it's going to block it.

27:44 These are terrible.

27:45 Like, I was trying to buy five different things for an outfit.

27:48 You wouldn't let me, basically.

27:49 Right, because if you, yeah.

27:50 So it certainly does depend on what people.

27:52 So because on the flip side, you know, when people use MCP servers to automate interaction

27:57 with like a social media network or, you know, like, you know, like a website where people are

28:02 posting text, they can make a worse experience, right? We see this on Twitter right now with all

28:07 the reply bots.

28:09 You know, they're, they're, it's a horrible experience.

28:12 Like everything you tweet, you get back this reply that's very well written and says it's not X, but Y.

28:17 And you're like, oh, why?

28:18 Why did you, you know, like fill my brain with something that I should never have to read

28:23 because, you know, there's no human out there that wrote it.

28:26 Right.

28:26 So, you know, there, you know, there, there's some design that goes into this,

28:31 but there's definitely many services where if you build an MSP server, you are enabling people to use your app in,

28:39 in more ways, right? So, especially for shopping, right? So DoorDash, they did add an MSP server and that makes so much

28:44 sense, right?

28:45 For people who's doing, you know, maybe they use DoorDash to cater to their office

28:48 every single day.

28:49 By having an MSP server, DoorDash is making it that much easier to do bulk orders

28:53 on DoorDash, right?

28:54 So if you are a shopping website, I think Shopify just announced like an MCP sort of integration.

29:00 So if you are a shopping website, it makes so much sense to have an MCP server,

29:04 right?

29:04 Because you want that, you know, sweet, sweet consumerism, right?

29:07 Exactly.

29:08 Let them come purchase.

29:09 Let their agents come.

29:10 They'll put their credit card in.

29:11 I guess the thing that it threatens the most is advertising, right?

29:14 And that's always what's been threatened by, you know, ad block and programmatic scraping

29:18 and all that stuff.

29:19 So we'll have to figure that out.

29:20 Yeah, that is a different, I think that is an absolutely significant area and totally different though than like etsy letting you buy or not buy

29:27 so you gave a talk exploring mcp servers with GitHub copilot was this last year

29:32 um this particular one was quite uh recent but basically like i keep doing these workshops to

29:37 show people mcp uh the first one i gave was at pycon so that was you know pycon back down in long

29:43 beach and that was you know like a three-hour workshop and so i've just been giving variants

29:47 on this workshop for the last whatever seven months i think this might have been pi ai is that right

29:53 remember uh maybe not no no no that was your um that was your one where you made an mcp server

29:58 pick your outfit that was a different deal yeah you know i just talk about mcp everywhere so this

30:03 was at we are developers in san jose a few weeks ago gotcha okay the reason is i want to talk about

30:08 just like support for mcp servers across some of your common things like copilot codex code vs code

30:15 etc it's like a can i use but can i use dot ai instead of an air.com whatever it is i know i don't

30:21 even think don't please don't go there i don't know what's there but no the actual website is

30:25 can i use.dev uh i told them they should get canimcp.com because i thought that would you know

30:30 flow better but this is from so the people who made this is mcp jam it's this really nice uh

30:36 basically like think of it as postman but for mcp servers right so really nice way of just testing

30:40 out your mcp servers with all the different features and you know sending requests back and

30:44 forth and being able to see your oaf flow and see it succeed so they decided to make this can i use.dev

30:49 And it's supposed to be like caniuse.com, but for MSP servers, because people are always asking like, hey,

30:55 you know, this new MSP feature, is it supporting these clients?

30:58 Because this MSP spec is evolving all the time.

31:00 They did the most recent big drop was July 28th, continually adding, you know, more stuff to it over time.

31:07 But the problem is many clients don't necessarily immediately add support for these features.

31:12 So as somebody, if you're building a server, you know, you might be really excited about a new feature,

31:17 but you want to check and see like, hey, you know, what is the support like that,

31:21 you know, for this feature across the clients?

31:23 What is the user experience going to be like?

31:26 Yeah.

31:26 And just doesn't support it at all.

31:28 You know, I know for a while, like ChatGPT, Codex supported, but I think ChatGPT wouldn't take MCP or something.

31:35 Why won't you accept it?

31:36 You're the most popular thing.

31:38 You know what I mean?

31:39 I think MCP came out of Anthropic.

31:41 I can't remember exactly.

31:42 But actually Codex has more support than log code, for example.

31:47 So this is kind of a can I use for all the different features.

31:51 Yeah, and I actually, relevant to this audience, I just asked them if they will add columns for Python agent frameworks,

31:58 right?

31:58 Because, for example, skills over MCP, that just got approved like a month ago.

32:02 Like the spec for it got approved in merge.

32:05 And so now they're, you know, making it official.

32:07 And if you look for skills on can I use.dev right now, you'll see none of the current clients support it,

32:14 but it is supported in a lot of the agent frameworks.

32:17 So if you use like we've got like Microsoft agent framework, I happen to just know that that one supports it.

32:22 But I bet you Pydantic AI does, too, because they're always quick to pick these things up.

32:26 Right.

32:26 So I did ask them to add columns for the agent framework.

32:30 So hopefully in the near future, you'll see like, you know, does Pydantic AI,

32:35 LangChain, right?

32:37 You know, which of your favorite Python agent framework support it?

32:39 Because that's the thing is like there's both, you know, using MCP from,

32:44 you know, almost say like a user facing tool.

32:45 Because in some ways, like GitHub Copilot is it's like a kind of a user facing tool, even if the users are developers.

32:51 Versus using MCP as the integration layer for agents that you're writing in Python.

32:57 And that's actually where we see a huge amount of uses of MCP, right?

33:02 Because there's always this debate about MCP versus CLI.

33:05 And yeah, locally, you can do whatever the heck you want, whatever works for you.

33:09 But when it comes to putting agents into production and having them do communication with other servers when they're actually deployed to the cloud,

33:19 everyone's using MCP there, right?

33:21 Like for enterprise agent interconnectedness, it's all MCP.

33:25 So what I tend to care most about is actually like, hey, can I write a Python agent framework that integrates with a Python agent that integrates with this MCP server?

33:34 And is it going to work as expected?

33:36 So people are excited about MCP probably like, oh, we're going to add this MCP thing to our topic.

33:43 But I think a good question.

33:44 And this one, everything we talk about, we've got to give it a little bit of a caveat of like, well,

33:49 was it like last century effectively for this technology like last year?

33:53 But you wrote about to MCP or not to MCP, you know, my weird joke.

33:58 But there are reasons to not use it or not completely just leave it wide open,

34:02 like create maybe more focus tools and then give those to your AI or to you.

34:06 Yeah.

34:07 Yeah. And so here, this was an example for this was Playwright, right?

34:12 So Playwright is a browser automation library and there's a Python package for it.

34:18 It's fantastic.

34:20 And I was already using Playwright quite heavily to write my end-to-end tests for web apps, right?

34:25 And so you could actually, and there's a pytest-Playwright plugin.

34:28 So it's very easy to, you know, write these end-to-end tests with Playwright.

34:32 And they'll, like, automatically open a headless Chromium browser or Firefox browser.

34:36 And they'll click around.

34:37 They'll do something.

34:38 And they'll verify it all works, right?

34:40 Now, Playwright was one of the first MCP servers that came out.

34:44 And people loved it because suddenly people discovered browser animation.

34:48 Like a lot of people, I think, had never, never knew that you could like programmatically control a browser.

34:53 And so the Playwright MCP, like, you know, it lowered the barrier for that where people were just like adding Playwright MCP server to their coding agents and,

35:01 you know, having fun, you know, automatically shopping and all that stuff.

35:05 So, you know, so I that that was, you know, one of the first big servers that you would hear a lot about.

35:11 So I wanted to make an agent that would automatically triage my LinkedIn request to connect.

35:18 So you go to a conference, you go back and you see your LinkedIn and all these people

35:22 want to connect and they're all great people.

35:25 But I find it like really boring to accept, accept.

35:27 And every now and then it's careful, only connect with people you actually know.

35:31 It's like, nope, accept, accept, accept.

35:33 What am I going to be rude and tell them no?

35:35 I don't know.

35:36 Well, every so often you get kind of like a life coach in there.

35:41 Yes.

35:41 No, you do want to, yeah, like a recruiter.

35:45 A recruiter.

35:46 Yes, exactly.

35:47 A book publisher, like, hey, would you like to write a book on this?

35:51 No, if I want to write a book on it, we've already written a book on it.

35:54 Yeah, I have this fantasy that one day I'll write a book, so I accept those.

35:59 But yeah, so I wanted to automate that.

36:01 So my first experiment was doing a pedantic AI agent with the player and MCP server.

36:07 And it was like incredibly inefficient because it would like go to the LinkedIn page.

36:12 It would kind of click around, try to figure out what to do.

36:14 Like it was like continually reading lots and lots of tokens because it wasn't sure exactly what to do.

36:19 And it did like eventually succeed.

36:21 But it wasn't a good experience because one, I had like a limited token budget at that time.

36:26 And two, it was just like taking a really long time and it was sometimes working,

36:29 sometimes not.

36:29 And I was like, well, you know what?

36:31 I'm trying to do the tasks, the same task every single time, every single day.

36:35 why don't I just script this using the Python Playwright SDK, right?

36:39 So I just, you know, I then, you know, scripted it using SDK.

36:43 You know, at that point, I hand wrote it myself.

36:45 These days, I just have Copilot open up the browser and figure it out.

36:49 But then, so then it becomes like much more deterministic.

36:51 And I only brought the LLM in to make the decision, right?

36:54 So I have like the Python Playwright SDK code is like opening my LinkedIn,

36:59 restoring my auth cookies so that I'm like logged in and that had this browser.

37:02 And then, you know, logging in, checking the requests.

37:04 it gets a request. Okay. Then that's when it sends the information to an LLM only then. And it uses

37:09 structured outputs and says, Hey, LLM, send me back some Jason that says,

37:13 you know, accept, ignore, reject or undecided and give me the reason for it. Right. And I gave it a prompt that said,

37:19 if it's a recruiter, a life coach or a financial consultant, that's basically the ignore,

37:26 ignore.

37:26 Yeah.

37:27 Um, you know, it's very effective.

37:29 So, right. So that was, you know, that's, that's, you know that's something considered right like the re like mcp enables these uh you know you to

37:38 create new mashups new permutations combinations new workflows um that you know you didn't already

37:46 have in your head so it makes a lot of sense if you are deploying any sort of agent that has more

37:51 open-ended tasks or that like a user is ultimately going to be used in order to do their uh you know

37:57 their end tasks, right?

37:58 So if there's any sort of open-endedness where it may have to do iteration

38:02 and or shouldn't decide, you know, what it's going to do next, then an MSP server makes sense.

38:07 But if you're doing the same thing every single time, and there's, you know,

38:11 even like, you know, in the case of mine, where it's like all you're doing

38:14 is tracing network requests, it's just not necessary to use MSP server and it can add more non-determinism

38:21 to a workflow.

38:22 Yeah, and if you're worried about it going crazy and just instead of connecting,

38:25 Oh, she wants to connect with people.

38:27 Let me find everyone on LinkedIn and add them as a connection.

38:30 You know what I mean?

38:30 Like something like that.

38:31 You could think, oh, the AI went crazy.

38:33 What you've given it is a much more constrained and deterministic deal, right?

38:37 Like it can only look at yes, no.

38:40 I mean, today almost would be a Jev sort of thing.

38:42 Yeah, I could totally sub in a Jev model point, right?

38:45 Like it would be a good scenario for a Jev model.

38:48 Generally, like that's a whole other discussion.

38:49 But yeah, generally, if anywhere we're using structured outputs where the result is a Boolean

38:53 or a choice, you can go ahead and sub in JAP model, decisions API, Microsoft, we just launched decision one,

39:00 you know, a decision model.

39:02 And yeah, so then you don't even need a full LLM.

39:05 Yeah, exactly.

39:06 But I do think a lot of times just giving an LLM a chance to like, I got it close,

39:10 but let's go there.

39:11 I'll give you an example from my world that I found really helpful is I have Hermes chilling on my Mac mini

39:18 just doing a bunch of stuff and two YouTube channels and they really are just sort of replications of the podcast.

39:25 So like the description is, it's a structured thing, but it comes from a whole bunch of different pieces of data

39:31 out of the podcast and so on.

39:32 But especially when I was live streaming more, it would be the stuff will go up.

39:36 And then eventually when the results, like all the details of the episode are together,

39:40 I got to go find all of that, the transcript, the description, the guest, the links,

39:43 and then go and put them back.

39:45 And I just sort of, I don't know, I lost track of that.

39:47 And I had like two or 300 videos on each channel that were just episode seven,

39:53 episode 200.

39:53 You know what I mean?

39:54 Like, oh no, I can't, I cannot navigate the YouTube studio.

39:57 It's so slow on every little step.

40:00 I can't go and do like 400 edits of this.

40:03 And so I wanted my Hermes to just, anytime that sees something appear in the RSS feed

40:07 for the podcast to instantly use the MCP server, find the details and rewrite the YouTube channel.

40:13 Well, I don't want to just give it full access to my YouTube.

40:15 So what I did is I used Claude Code to build a Python library that does the specific things I want it to do to YouTube.

40:23 And I just gave Hermes the wheel.

40:24 I said, here's the wheel.

40:25 You install this if you need to.

40:27 Then you manage the YouTube channel through it.

40:29 And it does.

40:30 And it's gone through all my hundreds of videos are all up to date.

40:33 It's perfect.

40:34 And if I change it on the website, it automatically changes on YouTube like 15 minutes later.

40:38 Crazy.

40:38 I think that's something that we can take advantage as Python developers is that it's easy for us

40:43 to make our own tools that have a more restricted surface.

40:46 For example, I keep meaning to VibeCode MSP server for my Pilates booking website,

40:52 right?

40:52 And I would just expose only the tools that I want, right?

40:55 Like I wouldn't have, you know, I wouldn't have like my account.

40:59 I would just have a, you know, like list this week sessions and book a session,

41:03 right?

41:03 So, you know, for, you know, especially for us as Python developers, this should be really

41:07 easy.

41:08 We just, you know, prompt and be like, hey, you know, make this MSP server that does this

41:12 and this, you know, and the hardest part is like auth, but there's, you know, there's

41:16 ways to set that up.

41:18 And then we can like feel confident pointing our agents at these tools, these servers or CLIs or however you've done them,

41:25 and not worry about something bad happening, right?

41:31 I know like many people are just kind of YOLOing with the current rage of Muse and Grok Pot and that.

41:36 But then, of course, every day we see this like, you know, horrible thing that happened to someone because of that.

41:41 It RMRF'd our production database.

41:44 Why did you give it access to your production database?

41:46 What are you doing?

41:48 So, you know, we we're still in an advantage as developers where, you know, if we don't have already access to tools that allow us to do restriction,

41:58 then we can, you know, we can buy our own tools for that.

42:02 Many of these tools, like, you know, with MCP servers, a lot of them will have a bunch of tools and you could decide to give your agent access to just some of them and not others.

42:09 Right.

42:10 So, you know, MCP servers will actually like annotate which of the tools are read only.

42:14 And you might say, hey, you know, you can only access the read only tools.

42:19 And with like the GitHub MCP server, it has this notion of tool sets.

42:22 And you can say you can say like, hey, you can you're only allowed to, you know,

42:25 use such and such tool set.

42:26 A little bit like restricting the job that you give them.

42:29 Because when they come back, it goes to the MCP and it says, what can I do?

42:32 And it's like, oh, well, here's 200 things you can do.

42:35 You don't necessarily want it to do those 200 things just randomly.

42:38 It might be like, like you said, list schedules, check my free time, book me this thing.

42:43 You get three or four tools, you know what I mean?

42:45 And so, yeah, you have a talk on just stricter schemas, increased reliability,

42:49 and then also on directing them to the, like, oh, the filter of the tools one.

42:53 That's it.

42:53 Filtering tools from MCP servers.

42:56 Basically how you can save tokens, make it safer.

42:59 There's some tools in Copilot, and this might also apply if you run Codex or Claude

43:06 in the chat window in VS Code.

43:07 I can't remember.

43:08 Yeah.

43:08 So when I wrote this blog post here about filtering tools, this was, what, five?

43:15 Ancient.

43:15 It's ancient.

43:16 Ancient.

43:16 So at that time, like in early days, VS Code, actually if you selected more than I think it was like 175 tools,

43:22 you'd like get this warning that's like, you have more than, you know, this many tools selected,

43:27 like you may want to reduce them, right? And everyone would get so stressed out, like trying

43:30 to decide which of them to like turn off and turn on.

43:34 Now, a few things have changed since that time.

43:37 One, obviously, our models have gotten, but two, the models have tool search and deferred tool

43:42 loading built in. So both the new OpenAI models and Anthropic models, like from the last six months

43:48 or so, they have a built-in capability that's actually was like trained into them as part

43:54 of their RLHF, their post-training, where they know how to search for a tool and to

44:01 load in a tool, like to use a deferred tool if they don't see a tool fully loaded in,

44:07 right?

44:08 So a lot of the modern agents will, if they're seeing that you're using a model,

44:12 like our OpenAI model, they may choose to use that deferred tool.

44:17 So these days, I don't really worry as much about having too many tools turned on because I know that there's,

44:25 you know, much better handling of many tools.

44:29 However, you know, if you like change your model to like a much worse model or something like, you know, then,

44:35 you know, then you'll differ.

44:37 Yeah, I played around with one of the smaller, more self-hosted like models.

44:41 It wasn't quite that, but it wasn't the frontier ones.

44:44 And I gave it basically this project.

44:45 I want you to change part of this.

44:47 It's like a little bit later, it's like, I've removed all of this from your app.

44:50 I'm like, no, no, no.

44:51 Why did you think you'd delete all?

44:52 I just wanted you to take a little part of it.

44:55 And it just made me remember like, oh, yeah, it used to be like that all the time.

44:59 It would just go crazy and do weird stuff.

45:01 And that doesn't really happen very much with the top tier models these days.

45:05 You're a little bit going to let it figure it out.

45:07 I think that's some of the newer guidance is it's smart enough that you're just going to be in its way.

45:12 Yeah, it means like when you're designing MSP servers and skills, especially skills,

45:17 like a lot of people, we have like these really, you know, long, verbose agent skills.

45:23 And, you know, as the models get better, we, you know, may not need those skills.

45:27 And especially if your skills are like over prescriptive.

45:31 That's the big thing I've seen with agent skills lately is a skill.

45:35 If a skill has too, too absolute of a statement in it.

45:38 Like there was one I was using the other day that was like, oh, if they ask to do anything else besides what's in this file,

45:44 then say it is not possible.

45:46 Right.

45:46 And like that just like shut the agent down entirely.

45:50 We're like I couldn't do things that otherwise I could have done with that API.

45:53 So especially if you're like putting out agent skills to help people use like your API or your Python package,

45:59 like everything needs to be very intentionally in there.

46:02 And you need to be really, really careful about kind of any statements of constraints and limits because you might end up like hobbling the agent that otherwise would have been successful.

46:13 But you accidentally held it back. Right. So don't don't hold back. Right.

46:17 Skills should, you know, streamline things and give some hints and tips and whatnot.

46:22 But usually skills should not be holding an agent back from successfully using an API.

46:27 Yeah.

46:28 There's so many of those projects on GitHub.

46:30 I love GitHub. But there's so many.

46:32 There's thousands of here's my set of skills that will make it a lawyer.

46:36 It'll make it an accountant or whatever.

46:38 And you're like, I really don't want to put this.

46:40 It's just going to pollute it with these ideas.

46:42 I bet it would be better if I just let it be, you know?

46:45 Yeah.

46:45 I mean, I'm happy to use my own skills.

46:48 I think what I encourage people is find skills that people are talking about that you're in shit in.

46:54 Fork them and then make them your own, right?

46:56 Because like there's very few skills that I use from other people because,

47:03 you know, I'm very opinionated.

47:04 I want my workflows to work great for me.

47:06 So I'm very happy with the skills that I maintain.

47:09 Right. So I have presentation skills is my biggest repo of skills.

47:13 And it's all just things related to making presentations like, you know, generating slide decks and images for them,

47:19 making transcripts, lots of stuff with YouTube.

47:21 Right.

47:22 Like transcribing them after.

47:24 And then I have some other skills that have to do with like Azure deployment and stuff.

47:29 So I'm happy with those skills because I have a lot of control over them.

47:32 But it's so hard to use someone else's skill and have it be a great experience for you.

47:37 So find a skill you like and then fork it.

47:40 Make it your own.

47:40 Yeah, that's great advice.

47:42 Absolutely.

47:42 Now, let's talk CLIs for a minute.

47:45 I think having CLIs used to be something that was just cool.

47:49 So you could maybe script it or you could automate it.

47:52 Like, I want to be able to do this thing with something.

47:55 And if I make a CLI, then my Bash or my Ansible script or whatever can run it.

48:00 So that's why we're going to have a CLI.

48:02 And I think, honestly, CLIs these days are a really interesting escape hatch for agents and things like that.

48:08 They're like, for some reason, they don't connect or they can't connect to an MCP.

48:12 Like, maybe it's an app that only would have an MCP when it's running, but you only run it for a moment.

48:17 So maybe give us your thoughts on this CLI story.

48:21 Yes, we have to have the required MCP versus CLI debate.

48:25 We do.

48:26 It wouldn't be complete if we didn't do it.

48:27 It's contractually obliged.

48:29 So, yeah, it's very interesting, actually.

48:32 Like, my colleague has a project that's now called Scope.

48:37 And in this project, they actually will set up scenarios to see how well an agent succeeds at a particular task in a particular environment.

48:45 And the example that he gave in a talk the other day was using the GitHub CLI,

48:50 GH command.

48:51 and the GitHub MCP server and then just nothing at all compared to see like how long would it take?

48:57 How successful would it be? Like would it?

48:59 So in this case, it was actually fixing a bug on one of my repos, which I didn't know he was going to do.

49:04 So I was surprised to see this PR the morning of his talk.

49:07 But yeah, so he's, you know, so it's comparing to see, you know, token efficiency,

49:12 success, number of tool calls, all that stuff.

49:15 Right.

49:15 Now, the results from that particular experiment was that the GitHub CLI was the best, right?

49:21 And I think a lot of people would actually predict that.

49:23 It required less tokens overall and was successful more of the time.

49:30 But why is that?

49:31 Part of that is because the agents, like LLMs, they know the GitHub CLI.

49:36 The GitHub CLI is deep, deep in the weights, right?

49:39 So they're very, very good at using the GitHub CLI.

49:42 they really don't know the GitHub MCP server much at all, especially, you know, it changes over time.

49:46 So it's very, it's really not surprising that they would do particularly well at using that CLI.

49:54 So, you know, so the takeaway from that experiment is like in that particular example,

49:59 yeah, it was more successful with CLI and there were some good kind of just specific learnings

50:02 for the GitHub MCP server about what it struggled with when it was calling that server.

50:07 But generally what you should be doing is like ideally like always offering everything,

50:11 right?

50:11 So you should have a CLI probably.

50:14 You should have an API, like a traditional API.

50:16 Like we're not getting rid of APIs.

50:18 Like APIs for HTTP services, like you still want an API, an SDK, a CLI.

50:24 An MCP server, you know, is something that you've ideally optimized for agents.

50:29 So you should be like running these tests with agents and saying, hey, for this scenario,

50:33 for all these range of scenarios, how successful are the agents when, you know, when using our MCP server?

50:40 And also with agent skills, Like we do the same test with agent skills.

50:43 So these are, you know, think of these as, you know, you're developing tools for agents

50:48 and you really want to see how successful agents.

50:51 You can do the same with CLI.

50:52 Like you could, there are definitely people who are trying to optimize their CLIs more

50:56 for agents.

50:57 Like there was a great talk at PyAI last year from the folks at Astral where they were talking

51:02 about that there was a lot of improvements they were going to make to like rough that

51:05 made it better for humans.

51:07 But now they're like, well, what's the point?

51:08 Humans aren't the ones running rough anymore.

51:10 agents are running rough.

51:12 They have all these ideas now about how they're going to make rough better for agents.

51:16 So they may not even like bother.

51:17 Like, I mean, yes, a couple of humans somewhere are running rough and actually looking at the results.

51:22 But yeah, they're, you know, so now they're like much more focused on like optimizing the experience for agents.

51:27 My agent runs rough a lot.

51:29 I don't know about yours, but I told the standing rule for all of my agents, if they're doing coding,

51:35 that is, is whenever you're done, you're not done until Ruff format, ruff check,

51:40 and ty check.

51:41 All of those run without warnings, without errors.

51:44 You know what I mean?

51:45 Like if you introduce something that breaks those rules, those are easy to fix.

51:49 Right.

51:49 So that, I mean, you can put that in your agents.md.

51:52 I oftentimes have that in my agents.md.

51:54 You can even formalize like a lot of these coding agents have what's called like a hook,

51:59 at least VS Code, we call it a hook.

52:01 So you can have a hook that runs every single time and make sure that it runs.

52:05 But a lot of times if you just put it in your agents.md, then that's enough instruction to,

52:09 you know, to be, to be always taking those actions.

52:12 Yeah. If you want to be super old school, I mean, we're talking like 2024 old school,

52:16 you could put it in a, a get pre-commit hook really.

52:18 Oh yeah, of course.

52:19 That's pre-commit though. Cause we're like, you know, that's even like, like, like later in the process.

52:23 Right. So it depends how often, right. So you've got hooks, you know, you've got hooks for the agent hooks are,

52:28 are much more frequent.

52:29 Right.

52:30 So, you know, we don't know how often you're committing.

52:32 Um, but you know, if you want it to happen every time I have an agent hook that just every time the agent stops,

52:38 my kid giggles, it just plays a sound of her giggling.

52:42 And it's, it's very cute. It just makes, you know, it just fills my life.

52:47 Yeah.

52:47 And then it's programmed so that if I leave the machine for more than a minute,

52:52 then it'll also like kind of giggle harder and tell me the name of the session so that I can

52:59 decide whether to come back my machine.

53:00 Right. So that way I can like do my kids laundry while Yeah, yeah, yeah. That's super cool.

53:04 So we're not complete with the CLI conversation. I think one of the things that I would like to encourage people who are building CLIs for agents,

53:13 a lot of the things that are interesting about this is it's good for people and it's good for agents.

53:17 like because they kind of both use English or natural spoken language, it's optimizing for one sort of helps the other a lot of times.

53:24 Anyway, so my suggestion about this is that use a nice CLI framework like Typer or Click

53:30 or even if you're using ArcPars, one of these built-in ones, make sure there's lots of help documentation and stuff

53:36 because then the first thing the agent might do is your CLI --help.

53:41 Okay, I now understand this tool that I have almost completely.

53:44 Let's go.

53:44 You know what I mean?

53:45 You don't have to do much more to teach it.

53:46 Yeah. And you can even ask the agent like for advice, like, hey, what would help you?

53:51 Like, what would have helped you achieve that?

53:53 Right.

53:53 Like, you know, what were what were the issues with that?

53:56 Yeah. It's interesting because like, you know, on the one hand, you think it's different to optimize something for an agent versus optimize it for a human. I think that is where some of the current tension is, especially with documentation.

54:05 trying to figure out is our documentation you know who is the one actually reading it um you know so

54:11 right now you know we have agents.md and that's definitely targeted agents we have readme.md and

54:16 a lot of times i end up repeating similar things across both um and yeah and i think just right now

54:22 it's just currently um attention i think there's some clis that will have kind of like an agent

54:27 mode that might be like much more verbose for example because agents can actually i think

54:33 there's actually it goes but sometimes they're like lesser rows because it depends if you're

54:36 trying to reduce token count or just increase information right because uh you know lms can

54:41 handle a fair bit of information like they can look through a whole python traceback error right

54:46 and they can understand it whereas me like you know it takes me a while to get to like the right

54:51 point in the error um so it's i think i i do find it like really fascinating to try and figure out

54:56 you know, as the world is moving so much right now, you know, what kind of entity are we

55:04 optimizing our developer experiences for?

55:07 I promised you a GitHub CLI story.

55:10 Oh, yeah. So like a year ago or so, you know, not that long ago, I was doing something with

55:16 Claude and I didn't tell it to go to GitHub. I didn't tell that there was a GitHub.

55:20 It just happened to be in a Git repository and I was working zero intention to go talk to GitHub or

55:26 anything and I said, okay, what if we did it this way?

55:29 And it says to me, I'm not logged into VS code or any of the tools.

55:33 I unknowingly was logged into the GitHub CLI.

55:36 And I ask it a question. It goes, well, three years ago, you added this GitHub issue and it talked about it this way, but I think

55:42 it's changed. Like what, how, how did you get to my GitHub?

55:45 I need to know what is going on here.

55:47 And eventually like, oh, it used, I went back and looked like, oh, it used the GitHub CLI to explore

55:52 the project and I didn't even tell it to him like what is it doing but in the end I was like you know

55:56 what cool it brought something from a long time ago back to the future and like we're we're working

56:00 on it's good but it freaked me out that that actually reminds me of when I was prepping for

56:05 today's podcast I asked you know I was like hey you know it's a podcast it's about like Python and MCP

56:11 and it immediately connected to my emails and my events and it found that you would like attach the

56:16 Google Doc to the because I didn't know you'd made a Google Doc of what topics we were going to talk

56:19 about. I had missed that.

56:21 So it found the Google Doc. I was like, okay, I've made an entire like markdown document prepping you based on the Google Doc. I'm like, what Google Doc?

56:28 What are you talking about?

56:29 So, you know, you know these things.

56:31 Yeah, right.

56:32 So like, it's, you know, these agents can be very powerful.

56:35 They're very good at like, you know, searching through lots of data.

56:39 I, you know, just even if it's just a read only tool, that's just searching through things

56:43 like, you know, really, really helpful there because it's not going to get bored after the

56:47 first page of you know search results right like it can it can keep going um so you know i think it

56:52 is lowering the barrier to finding information um so you know we don't lose we can't we're not

56:59 going to lose information as much in the big mess of things because we can have like these

57:04 really persistent agents that are looking for this so for me from like an information accessibility

57:09 perspective uh i think that's really good because i've always been very good at like searching the

57:13 web to the point where even at google people would ask me to search for things because they knew i

57:17 like really good at googling even at google um and even like in high school i participated in web

57:22 search competitions because i'm an absolute nerd i wait hold on what search engine do you all use

57:27 for that um that wasn't like lycos or anything was it in high school this was for the science

57:32 olympiad um and that would have been in 2001 so i don't even i think it would have been yahoo

57:38 at that point okay yeah yeah yeah i was a big yahoo user yeah those were amazing times yeah

57:44 So, but now, like, you know, now it's fine.

57:46 I don't have to lord my searching skills anymore.

57:49 Like now everyone can, you know, use their agent to really efficiently search and find

57:53 great results, which is good.

57:54 We're making information universally accessible and useful, which is, I think, the mission

57:59 statement of Google.

58:00 But it's, you know, someone's mission.

58:02 Yeah, absolutely.

58:03 So final thought on CLIs.

58:05 They don't have to necessarily be either or.

58:07 I ended up writing a Talk Python podcast and courses CLI, which is kind of weird.

58:12 But if you go, it's open source.

58:13 If you go look at it, all it does is it basically calls the MCP endpoints and the actions are like composition of the tools.

58:20 So it really is just a different interface to the MCP server.

58:24 But I'm like, the things that want to automate this that don't have access to the MCP server,

58:29 like how long would it take to write this?

58:31 It wasn't that much work.

58:32 So anyway, you can make them, they can coexist like cats and dogs living together.

58:36 Mm-hmm, mm-hmm.

58:37 Yeah, I mean, that's the thing, is that there's some agents that can connect to MCP servers

58:43 that can't connect to CLIs, because not all agents have a kind of coding execution environment.

58:48 Especially the cloud ones, right?

58:50 If it's just a chat LLN, they're not on your machine.

58:53 Right, yeah.

58:55 And then there's other agents that can run CLI commands that for some reason they can't,

58:59 MCP servers for whatever reason.

59:01 So it's good to have both.

59:04 And it's easier than it used to be.

59:06 You should be like, all right, well, who's going to be on the CLI team?

59:08 Now it's like, I know who's going to be on the CLI team.

59:12 It's all you.

59:13 It's all me.

59:14 Lod, you're writing CLI today.

59:15 Let's get going.

59:16 Or chat or whatever, you know, co-pilot.

59:19 Well, this has been super fun.

59:20 I mean, let's close it out with some final thoughts.

59:23 What do you think?

59:24 Yeah, so final thoughts.

59:26 We haven't really got into the Python aspect of MCP.

59:29 So things I would tell Python developers is that there is an official Python MCP SDK.

59:36 and that is to get started.

59:38 But there's also a fantastic package called Fast MCP, which builds on top of that MCP SDK.

59:44 And that's from Prefect.

59:45 And that adds all these like really neat integrations.

59:49 So I personally always use Fast MCP, but you shouldn't use one of those,

59:53 right?

59:53 I was actually looking at a colleague's MCP server today and it was just like handwritten from scratch.

59:57 And I was like, that's not necessary, right?

59:59 Like, and if there is an official MCP SDK that passes the specification And then there's Fast MCP, which builds on that.

01:00:07 So it also is conformant, but then adds all these additional features.

01:00:11 So if you're starting today, you can point your agent at the Fast MCP docs and have it

01:00:18 write an MCP server using the latest version of MCP protocol, which is a really nice improved

01:00:23 version.

01:00:23 It's stateless, so it's more scalable and direction ready.

01:00:27 So it is very easy to get started writing your first Python MCP server.

01:00:33 And yeah, and there is also a conformance suite.

01:00:35 So if for some reason you did write your own MCP server, you should at least run the conformance suite

01:00:41 to see that it aligns the spec.

01:00:43 But easiest way is start server and just give it a go and maybe just make one for fun

01:00:49 just so you can understand how this new protocol works and it'll give you more insight

01:00:54 as to when you're using MCP servers with your favorite agent.

01:00:58 Yeah, I don't think I really understood how MCP servers really worked until I built one.

01:01:02 Right.

01:01:02 Yeah.

01:01:03 Which is like, I mean, that's one of the greatest way of, you know, learning how these things work.

01:01:08 I didn't really understand how they worked until I built one, put it in production, and then had an error with it.

01:01:13 Wait, this is not working the way I expected.

01:01:16 Uh-oh.

01:01:16 What's going on?

01:01:17 That's when you really, really understand something, right?

01:01:19 That is for sure.

01:01:21 That is for sure. Cool. All right. Well, Pamela, thanks for taking the time for being on the show.

01:01:24 Always fun to...

01:01:26 All right. Awesome.

01:01:27 See you next time.

01:01:28 See ya.

01:01:30 This has been another episode of Talk Python To Me.

01:01:32 Thank you to our sponsors.

01:01:33 Be sure to check out what they're offering.

01:01:35 It really helps support the show.

01:01:37 If you or your team needs to learn Python, we have over 270 hours of beginner and advanced courses

01:01:43 on topics ranging from complete beginners to async code, Flask, Django, HTMX, and even LLMs.

01:01:49 Best of all, there's no subscription in sight.

01:01:52 Browse the catalog at talkpython.fm.

01:01:55 And if you're not already subscribed to the show on your favorite podcast player,

01:01:58 what are you waiting for?

01:02:00 Just search for Python in your podcast player.

01:02:02 We should be right at the top.

01:02:03 If you enjoyed that geeky rap song, you can download the full track.

01:02:06 The link is actually in your podcast player show notes.

01:02:09 This is your host, Michael Kennedy.

01:02:10 Thank you so much for listening.

01:02:12 I really appreciate it.

01:02:13 I'll see you next time.

Talk Python's Mastodon Michael Kennedy's Mastodon