Latest / The Every Podcast / MCP Servers: Teaching AI to Use the Internet Like Humans
Transcript
- 0:00The internet runs on computers talking to each other, but its entire architecture was built for a pre-AI world.
- 0:06Now we're trying to hook AI up to the internet with MCP, Model Context Protocol, which turns any website or web service into a set of tools that an AI can use natively to get work done.
- 0:18And the software companies that learn how to do MCP well are going to win over the next decade.
- 0:23That's why I brought Alex Rattray, the founder and CEO of Stainless, onto the show.
- 0:27Stainless's job is to help computers talk to each other.
- 0:31They make the API and SDKs for all the big companies that you know about, like OpenAI and Anthropic.
- 0:37And they're starting to build MCP servers too.
- 0:39So Alex and I get into the nitty gritty of what the future of MCP looks like.
- 0:44how to design good MCPs, why MCPs are actually really hard to scale and possibly insecure.
- 0:51And we try to figure out together what a better model for allowing AIs to use the internet might look like.
- 0:57This is a great episode.
- 0:58Alex is a good friend of mine.
- 0:59Let's dive in.
- 1:14Alex, welcome to the show.
- 1:15Thanks, Han.
- 1:16It's really exciting to be here.
- 1:18It's good to have you.
- 1:19So for people who don't know, you are the founder and CEO of Stainless, which is the API company.
- 1:24You make APIs for companies like OpenAI and Anthropic and just name your big company that you might use their API.
- 1:31Stainless is probably behind it.
- 1:33Before that, you worked at Stripe doing their API.
- 1:36Surprise.
- 1:37Um, and before that, most importantly, we were very good friends in college and we remained good friends.
- 1:43Uh, and we were both starting companies in college.
- 1:46I'm a tiny investor in stainless, uh, but it's been really, really fun to watch your journey and get to get to hang out together so much over the years.
- 1:55And, uh, I'm just very excited to bring you on to talk about AI and, and what you're doing at stainless.
- 2:01Thanks, Dan.
- 2:02Yeah, it's, um, it's, uh,
- 2:05It's been really fun over the years.
- 2:06I mean, you know, when we were in college, I was working on a startup.
- 2:10You were working on a startup.
- 2:12You had a conference room at a venture capitalist office as your office, and you let me crash there with my co-founder and team.
- 2:21And we were just like on the other side of the conference table, hacking away into the evening.
- 2:27Uh, and, you know, very fond memories of those days.
- 2:30And these days it's, it's not every evening, but you know, on the weekends, whatever, same thing is still happening.
- 2:36Um, and it's, you know, you don't see that every day and it's, it's, it's really a nice feeling.
- 2:39And, um, it's been great to see everything happening with every, um, on the way.
- 2:46Thank you.
- 2:46As I say, I started from the bottom.
- 2:48Now we hear, um, uh, and, uh, yeah, I mean, I, the thing that I always say when people, um, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh
- 2:56When I run into people and they ask me about you, in order to embarrass you, I just talk about how you're the only person that I know of who has consistently run barefoot through the streets of Philadelphia.
- 3:08Because when we first met, you were not a fan of shoes and you were a fan of running.
- 3:13You want to talk about that?
- 3:15Yeah, it wasn't that I didn't like the concept of shoes.
- 3:18It's that I couldn't find a good pair.
- 3:22And at a certain point, you know, it's like I was running through Nikes and they would bust open every few months.
- 3:28I think what was actually going on was that I had really wide feet.
- 3:31And I was buying probably narrow shoes.
- 3:33But shoes would constantly get ruined.
- 3:36And, you know, on a college budget, it's just like, this is no good.
- 3:41And...
- 3:45Eventually I decided, okay, the longer you wear your shoes, the more worn out they get.
- 3:49But the longer you just wear your feet, the tougher they get.
- 3:52So the longer you wear your feet.
- 3:59Try it out.
- 3:59Try this at home.
- 4:01What could go wrong?
- 4:02I actually currently have a really annoying splinter in one of my feet.
- 4:06And so don't actually try this at home.
- 4:10Are you still running barefoot?
- 4:12No, no.
- 4:13This is just from around the house.
- 4:16I see.
- 4:17Dangerous.
- 4:18Yeah.
- 4:19Yeah.
- 4:19But see, that's the thing.
- 4:20If I had been going around on the asphalt without socks on, then my feet would have been tougher and I'd have no splinter.
- 4:30So when you're not running barefoot, you're running stainless.
- 4:39So you're running stainless.
- 4:41And so how many people are you?
- 4:43You know, you're around 50, right?
- 4:45Just about.
- 4:45Yeah.
- 4:47That's pretty wild.
- 4:48And you started stainless in a pre-AI world.
- 4:53And now we're in an AI world.
- 4:54And I think you have some...
- 4:56ideas for what the future of AI is going to be and maybe how APIs fit into that, maybe how MCPs fit into that.
- 5:04Do you want to paint a little bit of a picture for us about where we're going?
- 5:08Yeah, I would love to.
- 5:09So to start, like, what's an API?
- 5:13Not everybody's familiar with that.
- 5:14So it stands for Application Programming Interface.
- 5:19There will not be a quiz, right?
- 5:20Right, Dan?
- 5:21No quizzes?
- 5:22No, no quizzes.
- 5:23Great.
- 5:25But basically, it's how one computer program talks to another computer program.
- 5:30it's how computers talk to computers how apps talk to apps and so APIs are the dendrites of the internet dendrites are where your neurons connect and actually exchange information with each other so if you have like two neurons in your brain but they're not talking to each other you're actually not thinking there is no thought happening in a brain without connections between neurons and if you think about the internet if all these servers in the cloud weren't talking to each other you wouldn't
- 5:59you wouldn't have internet, right?
- 6:00Like there's, there's nothing going on.
- 6:03If you know programs, internet software is doing nothing without APIs, without connections to, to other programs.
- 6:11And so it's really fundamental to the mesh, to the mesh of pretty much all modern software.
- 6:17Everything that we think of when we think about technology at this point, APIs are kind of at the heart and center of that.
- 6:23Just like, you know,
- 6:26Dendrites are the center of the mesh of the brain and how we think.
- 6:31And Stameless's mission from day one was sort of to make it easier for computers to talk to computers.
- 6:44It's the long-running trend of technology to have more automation.
- 6:50Automation is...
- 6:52what we mean when we say, okay, we're going to apply technology to that.
- 6:56We're generally going to be making things more efficient.
- 6:59And APIs are how most business-to-business interactions, in some format or another, become real, become automated.
- 7:09And what we see with the rise of AI is that there is a new...
- 7:16a new computer has entered the chat, right?
- 7:19There's a new kind of system that can talk to other systems, or at least we would like it to be able to.
- 7:26You used to have either, you know,
- 7:28Humans interacting with a computer through a user interface, a UI, or a computer acting with a computer through an API.
- 7:34And now we have LLMs interacting with computers, right?
- 7:38And what's that through?
- 7:40And I'm sure anyone familiar with, you know, with Avery and his regular listeners is going to be familiar with MCP, Model Context Protocol, which is a system for connecting devices.
- 7:51LLMs to computers, broadly speaking.
- 7:56And it's an area that we're investing in at Stainless.
- 7:59It's really, I think, part of our core mission of, like I said, make it easy for computers to talk to computers and...
- 8:08We've invested a lot of time, you know, at Stainless, the core product that we first brought to market is software development kits, SDKs.
- 8:17And so these are ways of saying, OK, Stripe has this great REST API.
- 8:22You know, you can send JSON over HTTP and get back JSON over HTTP.
- 8:29And if you want that to be really convenient, you're going to use the Stripe Python library, the Stripe Python SDK.
- 8:35So you can go, if you're a Python developer, you'll go pip install Stripe.
- 8:39And then in your application code, you'll write stripe.customers.create.
- 8:44And all of a sudden, you have a nice new customer object in sort of your Stripe database.
- 8:49And you're off to the races.
- 8:51Or stripe.charges.create in the old days to charge a credit card.
- 8:58And SDKs are what gives developers that easy way to interface with an API.
- 9:05What's the thing that gives LLMs an easy way to interface with an API?
- 9:09And you might say MCP, and in a sense you'd be right.
- 9:13But what we're seeing so far as MCP is rolling out into the world and people are experimenting with it and trying it out...
- 9:24is that it's not working so great.
- 9:25Like there's, it's, it's difficult to deliver on what I see as the core vision of, of what's so exciting about MCP, which is just like a dashboard and a user interface lets you click around, see a bunch of stuff, and,
- 9:44fill out forms, click buttons, do things.
- 9:47Anything that you would do while you're interacting with the software, you'd do through the user interface generally.
- 9:52But LOMs interacting with through MCP, it tends to be much more restricted.
- 9:56You can only do a few little things.
- 9:58There's usually not a ton of tools that you're going to be exposing to the models.
- 10:04And just to stop you there, so I think what I'm hearing you say is what MCP does is just like a website is built for humans to be used, MCP is sort of the equivalent, and you can think of it in certain ways, of exposing a set of tools for the model that it can use to perform certain functions.
- 10:24Just like you might click a button on a website, the MCP gives to the model specifically.
- 10:29a bunch of things they can click on or use to get work done.
- 10:31So an example might be, you know, and a Gmail MCP has like a send mail tool or like a compose mail tool or a read inbox tool, that kind of thing.
- 10:42And instead of a human going on the Gmail website and doing it, it's the, it's the LLM is like, you know, essentially logging in and using it itself.
- 10:51And it's a native interface for language models.
- 10:53But you're saying that,
- 10:55That's not working that well.
- 10:56Can you tell me more about that?
- 10:58Yeah.
- 10:59So let's start actually with kind of what I see is the big vision of MCP.
- 11:04And in some sense, the big vision of agentic AI in the first place.
- 11:09And I'll start with the most pedestrian example you can imagine.
- 11:11It's going to be funny given some of our context.
- 11:16which is, let's say, you know, Dan walks into my store and buys a pair of stripy socks and maybe a few other things.
- 11:24And then the next day I hear back from Dan that there was something wrong.
- 11:28Unfortunately, it happens, you know, and I turn to someone on my team and I say, hey, can we refund Dan for those stripy socks he bought yesterday?
- 11:37And send him a discount code for the next time he comes in with like a little thank you note.
- 11:41Yeah.
- 11:42because we like to take care of our customers.
- 11:46This is like the most normal thing to do in software, is some little task like this.
- 11:52And what you're gonna do, what the member of my team would be doing, would be opening up
- 11:57Their internal admin and looking around for some things, they might go to the Stripe dashboard and try to look through the list of payments or the list of transactions or orders and try to find one that has someone named Dan, which Dan, I don't know, there might be a bunch of Dans.
- 12:11Try to look through the list of products in the order and see whether there was some Stripey socks in there.
- 12:15That might be a few clicks required, depending on.
- 12:18Find the right one, then go to the screen where you can create a refund, create a refund, make sure it's the right amount, then go and create that discount and then take that discount code and send it.
- 12:29over to some other SaaS app where you log in to send some mail automatically.
- 12:35Right.
- 12:36And of course, if you step away from the consumer version of this to a business to business context, of course, you might be going into Salesforce and sending a Slack message to an account administrator, you know, an account manager, so on and so forth.
- 12:50And in the normal course of work, it's just the most normal thing in the world to be doing having one task
- 12:58involve going through five different apps each time 15 different clicks and scrolls and loading loading spinners just to do sort of like one simple thing.
- 13:08And the promise of agentic AI is to be able to take that same prompt I just said and type it into chat GPT or Claude or whatever and say hey chatty buddy can you help refund my my friend Dan.
- 13:23and just have the ai go off and do that and basically go through these five different apps and the 15 different screens and the various different you know button presses to complete the task and then come back and say great it's done um that in order to do that now that's the
- 13:45There's only so many tool calls you have to make as an AI model to perform that exact linear chain of events.
- 13:52It's somewhat tractable.
- 13:53But if you think about this in the general case, you want the LLM to be able to do, you want your agentic AI to be able to do anything that that human operator would have done.
- 14:05And you would want them to be able to do it.
- 14:08without having to wait for a bunch of JavaScript to load on a website or anything like that.
- 14:15And that means you need not only the Stripe create refund tool and the Stripe list transactions tool and the Stripe list products and look up customer and create discount tool.
- 14:27You need not only those tools, but you need everything that you can do in the Stripe dashboard, which is basically everything that you can do in the Stripe API.
- 14:38And that's actually a lot.
- 14:40There are hundreds of different endpoints that you have access to in the Stripe API.
- 14:48The Stripe dashboard is actually massive.
- 14:51It's a huge application.
- 14:53And if you were to take that list of tools today and go to an LLM and say, hey, here's our MCP definition for all of this.
- 15:02Here's a create refund tool.
- 15:03Here's a create transactions tool, so on and so forth.
- 15:06And you tell it all about those tools.
- 15:07Here's the description.
- 15:08Here's all the different request properties that you can send.
- 15:11Here's the response properties you can get back.
- 15:13Here's all the documentation for each of those things.
- 15:16Everyone listening to this should already know
- 15:19You've just burned through your entire context budget.
- 15:23That's, you know, maybe hundreds of thousands of tokens just there.
- 15:28And pretty much translating the Stripe Open API spec directly over to MCP tools.
- 15:34And today's models not only can't handle that amount of context, it's a poor use of context because you have a lot else going on.
- 15:40Uh, but it's also confusing to the model.
- 15:43It's just, it's just too much to hold in your brain at one time.
- 15:46Um, and that's just the straight part of it, right?
- 15:51Um, because what you're really trying to do is enable your operators to do anything they would normally do.
- 15:57And again, that spans many, many different SaaS tools, right?
- 16:01In the course of one interaction, it might be five.
- 16:03In the next interaction, it might be a different five.
- 16:06And so if you think about every single SaaS tool that your business uses on a daily basis to get your work done.
- 16:14Ideally, you would want every single one of those tools to be exposed to your operators in their AI chat with every single tool available in there, with every single nook and cranny and corner case available so that you can do anything through AI.
- 16:31That's the vision.
- 16:32Now, there's a lot of problems with that.
- 16:34The biggest one that I mentioned is sort of this context window limit.
- 16:40But you also have all sorts of security and permissions problems because...
- 16:44You don't want the AI to color outside the lines and say, OK, in addition to refunding Dan Socks, I also refunded every customer for all transactions ever.
- 16:51You know, and then I sent, you know, a bunch of money to my own AI bank account.
- 16:54Ha ha ha.
- 16:56And so there's more to the challenge.
- 16:57But that's the vision I see.
- 17:01But I think, you know, the place we started there was.
- 17:05You said it's not working.
- 17:08but I don't think that that's the reason why it's not working today, right?
- 17:11Or is that the reason why it's not working today?
- 17:13So what people do with MCP today is sometimes they'll try to expose all parts of their API.
- 17:21The way people build MCP tools is, generally speaking, they have an underlying API, usually a REST API, and they wrap different parts of that, different endpoints, different operations.
- 17:33in MCP tools.
- 17:34And you can kind of do that in a one-to-one mapping, or you can kind of handcraft things for the MCP.
- 17:45have to kind of handcraft it to the MCP, to the LMS.
- 17:48You have to say, okay, I'm making one specialized tool to look up a customer and refund their transaction based on a description.
- 17:57So there's all these like decisions that you have to make where you need to have like the ergonomics of the model and how the model thinks in mind in order to make sure the model does the right thing more often than not.
- 18:09Yeah, it's hard.
- 18:10It's hard.
- 18:11Yeah.
- 18:12Yeah, yeah.
- 18:13So I use this SDK analogy sometimes.
- 18:15So it took a long time for humanity to get to the point where we could make a really good Python SDK for a Python developer wrapping it in API.
- 18:23And I think we've we've we've cracked that nut.
- 18:26Stainless offers really great Python libraries, but we're building on the shoulders of giants here.
- 18:31A lot of people have have done this over time.
- 18:36Um, we haven't figured out how to expose an API ergonomically to an LLM in the same way that we've figured out how to expose it ergonomically to a Python developer.
- 18:45Um, and that's a, a kind of like a new research problem in a sense.
- 18:48Um, and it's harder because I can go learn how to be a Python developer if I want.
- 18:54I can't really learn how to go think or see like an LLM.
- 18:58Um, but, uh, yeah.
- 19:02sure would be powerful if I could.
- 19:06And that makes it tricky.
- 19:09We do have at Stainless, I think, some things that we're cooking up to address some of these problems, including the ones that you also mentioned.
- 19:17LM's have a really hard time with
- 19:19a repeated sustained chain of, of actions.
- 19:23Um, and, you know, even like if you get an API response back around, Hey, like list all the transactions, there's so much data and you might have to go through the next page and the next page and the next page to go through all the transactions to find the one that has Dan with the stripy socks.
- 19:38Um, and that's again, a ton of context with,
- 19:41one or two small needles in the haystack.
- 19:45And LMs are pretty good at that, but they're not perfect.
- 19:49And with too much hay, we all kind of end up throwing up our hands, and that's true for LMs too.
- 19:56So yeah, so there's a lot of challenges today.
- 19:59And so when you look at, I mean, you're building MCP servers for people, but when you build them and just generally when you see people doing it well today, like what are the principles or how do you think about making an MCP server that one, people use, which is actually a big one.
- 20:20And then two, when it is used, actually does the right job.
- 20:23There have been relatively few times that I've seen it done well.
- 20:26I have seen it done well.
- 20:28We're kicking something up that I'm really excited about.
- 20:30But with today's technology, you really have to do a good job of product management.
- 20:37I mean, you have to go out into the market and talk to your customers and see what their actual needs are and look over their shoulders as they use and operate your software and think about what could we unlock today.
- 20:50through AI where people would be doing things that they can't really do with our software today because it just got so much easier.
- 20:58And then you have to do kind of a lot of engineering work usually to wrap it up in a bow that works for the models.
- 21:05And you have to set up a really good system for evals
- 21:09And if you're doing MCP, you have to think about the different clients that people might be using.
- 21:14Are they using cursor?
- 21:15Are they using cloud code?
- 21:16Are they using something else?
- 21:18And the different models underlying all that.
- 21:20So you end up with this pretty crazy matrix of things that you might want to optimize for and ways that you might want to evaluate and make sure that what you're offering is is working well.
- 21:31Um, and it's also kind of a black box to get that feedback, uh, back to your, um, servers so that you can find out, Hey, we, we gave it, we gave a tool call response here.
- 21:42We gave an answer of some kind.
- 21:44Was it actually any good?
- 21:46Um, did, did the user like it?
- 21:47Um, was the LM able to use it?
- 21:50Uh, and, and that's a problem that I think I haven't seen a lot of people solve, um, yet as well.
- 21:56And so, um, yeah.
- 21:58Thinking about that as a first class thing, maybe you have like a send feedback tool.
- 22:02That's something that we've been thinking about doing.
- 22:04Just so if a user like says out loud, you know, in the chat, oh man, that was useless garbage.
- 22:09Like, okay.
- 22:11Now, now, now at least the MCP server is going to find out about that.
- 22:16But is there anything specific you've learned about like how to do it well, other than like, obviously you got to talk to your customers, think about your use cases, but like more concrete, more, more applicable stuff about how to design a good MCP server.
- 22:28You want to keep the number of tools relatively small, relatively low.
- 22:33You want to have the tool name and the description be really precise and specific.
- 22:40Weren't those two things at odds?
- 22:42Yes.
- 22:43Good writing is hard.
- 22:45Yeah.
- 22:47I mean, you can make a great tool of lookup person by name and...
- 22:52product description and then refund them.
- 22:54You can make a great tool that does that.
- 22:57And you also want a small number of properties in the input schema.
- 23:02You want a small number of parameters, and you want them concisely described but sufficiently described.
- 23:10This is also hard.
- 23:12And you want the response data to come back with a very small amount of data, only exactly what the model will need.
- 23:19That's also very hard because you may not know
- 23:21a priori which things the model is really looking for.
- 23:25And, you know, we have a technique that we use in our MCP servers today where we give the model a JQ filter, which is a way of filtering out JSON.
- 23:35And that can work pretty well.
- 23:37But that's kind of a special trick.
- 23:40Doesn't this mean that, like, MCP just needs another level of, like, a search tool function, search tools?
- 23:46Like, find a list of relevant tools given my task?
- 23:49Yeah.
- 23:50The tool browsing problem is definitely one very serious one.
- 23:55And that is one approach.
- 23:56And so we actually do this at Stainless today, where you can get an MCP server for your API that just has, like I was saying earlier, the very simple thing of every endpoint is exposed as a tool.
- 24:06And if you have a small API, that works great.
- 24:09And you can also filter it out so you expose an MCP server with only a small subset of your endpoints.
- 24:16That works great.
- 24:18You can also use kind of what we call dynamic mode, where there is three tools no matter how big your API is.
- 24:25One is list endpoints.
- 24:28The other is get endpoint and learn about it.
- 24:32And then the last one is execute endpoint.
- 24:34And so that enables this context thing to scale really well.
- 24:38But it means there's three turns of the model just to do one thing.
- 24:43And so that gets slower.
- 24:44It's more expensive in another sense.
- 24:48And there's some lossiness.
- 24:51It performs pretty well usually, but not quite as well because the tools aren't loaded up in quite the same way.
- 25:03Are you using MCP servers yourself?
- 25:05Yeah, I use MCP to...
- 25:11Actually, funnily enough, not so much on the coding side, but I use it on the business side.
- 25:16So I'll use like the Notion, HubSpot, Gong, MCP servers to kind of say, hey, like an action MCP server for our database, a read only copy of our database and say, hey, what are the interesting customers that signed up for Stainless last week?
- 25:35And it'll go off and make a great query of our Postgres database and then it can cross-reference those things in HubSpot and then look up our notes in Notion.
- 25:43Maybe even look at transcripts in Gong and tell me all about it.
- 25:48It's incredible.
- 25:49Imagine going from idea to live website in just a minute with no code.
- 25:53At every, we run six products in-house with a team of just 15.
- 25:56So we're making landing pages and marketing sites all the time.
- 25:59And the tool we trust to do that at a high level is Framer.
- 26:03Framer is the design first no code website builder that lets you ship a production ready website in minutes.
- 26:08Type something like modern SaaS landing page for a productivity app and watch it just generate a site with a responsive layout, a clean look and feel and even pre-filled copy.
- 26:18After that, Framer makes it easy to refine, style and publish your website.
- 26:22It's also really powerful.
- 26:23At Every, we care a lot about all the little details that go into the design of landing pages, and Framer makes it easy to do this.
- 26:31You can make buttery smooth effects and micro interactions with really simple sliders.
- 26:35It makes the website feel alive, like you care about all the little details.
- 26:39And it lets you turn your ideas into production-ready effects really quickly.
- 26:44Another great thing about Framer is that it lets you localize your website easily.
- 26:48Click one button and translate your website from end to end into any language.
- 26:51Framer can handle all the heavy lifting while you focus on design.
- 26:54And when you're ready to launch, you can just hit publish and your site will be live instantly.
- 26:58Behind the scenes, Framer handles everything from posting to loading times to SEO optimization for you.
- 27:04So if you're ready to build a site that looks hand coded without hiring a developer, launch your site for free at Framer.com.
- 27:10And use the code DAN, that's Dan, D-A-N, to get your first month of pro on the house.
- 27:16Rules and restrictions may apply.
- 27:17And now, back to the episode.
- 27:19And so that's one of your big use cases.
- 27:22Are you doing that every week?
- 27:23Now I'm interested, not even from an MCP perspective, but for anyone running a...
- 27:31business that has some complexity and you're like, I want to know what's going on in the business.
- 27:34Like, what is, what are you actually doing and what is the report that comes out and how often are you doing that and all that kind of stuff?
- 27:38So I can tell me so I can steal it.
- 27:40Yeah.
- 27:41Um, uh, for me, it's still usually in kind of like playing around mode.
- 27:45One of the things is the MCP servers disconnect and then I get annoyed.
- 27:49Um, and so, you know, you have to just kind of reconnect and whatever.
- 27:53It's not a huge deal.
- 27:54Um, uh,
- 27:56But there are a lot of little paper cuts still in a technology this new that you're going to expect that can hold back some amount of your usage.
- 28:06One of the things that I found really helpful kind of at the meta level, and I'm sure you've had other guests talk about this, is the practice of just collecting notes for the AI by the AI and kind of edited and curated by yourself.
- 28:20So, you know...
- 28:23I have a, like a, I can't remember if I call it a note.
- 28:26I think I have a notes folder, a research folder, something like that in a special Git repo that I use just for this sort of like internal stuff.
- 28:35And I'm like, hey, when you find interesting customer quotes, put them in this folder and give the full citation.
- 28:42So that the next time I start asking interesting questions, it doesn't have to go searching through the MCP servers again.
- 28:48It has them kind of cached in, um,
- 28:53just on desk in Markdown files.
- 28:55Wait, that's crazy.
- 28:56Wait, so how are you getting, like, what are you using to write into that Git repo?
- 29:02Like, is it cloud code?
- 29:03Are you using touch APT?
- 29:05Like, how does it get in there?
- 29:06Yeah, I use cloud code these days for that kind of thing.
- 29:09And so you just have a cloud code open and running.
- 29:12And then a new customer testimonial comes in and you're just like, hey, can you throw this in my like get master company, get knowledge repository, basically.
- 29:22And and then whenever you need anything later, you're like, Claude, like go search through my master repository to figure out where the best customer quote is for this.
- 29:33Totally.
- 29:34That's fucking so cool.
- 29:36Um, can I, can we see it?
- 29:39Um, no, it's too messy and probably has a lot of confidential information.
- 29:43The latter being more, more important.
- 29:46Is it, um, when you say it's messy, like, are you having Claude organize it at all?
- 29:50Or like, how is it structured?
- 29:52There's a lot that, that I want us to do here.
- 29:55that we haven't had the chance to do yet.
- 29:57There's some, there's some other lower, lower hanging fruit that, that I'm working through that, that our business team is working through right now.
- 30:03Um, just on the, on the basics of your kind of CRM systems and so on.
- 30:08Um, um,
- 30:10But, um, and so it's not as, it's not well structured now, but I think that's fine.
- 30:16Um, I, yeah, I, I, I, I'm not, I don't plan to prioritize structuring it super, super well until we're using it more.
- 30:23I'm using it more broadly because, you know, I use this stuff some of the time.
- 30:27Um, one of the, one of the.
- 30:29Business people on the team uses it a fair amount.
- 30:32I think like one or two kind of of our customer support engineers uses this stuff a lot, but it's not yet kind of broader than that.
- 30:41And I would like it to get there.
- 30:43And once we see how everything's evolving, I think that's when we'll start bringing in more structure.
- 30:48But as it is, Cloud Code can handle unstructured stuff really well.
- 30:53So you don't have to think about it too hard in advance, in my view.
- 30:58You can move things around later.
- 30:59What else do you have in there other than customer quotes?
- 31:03SQL queries.
- 31:04So, you know, I'm a software developer.
- 31:09I don't write a lot of code these days, but I spend a lot of time doing that.
- 31:12And so...
- 31:14When I say, hey, can you look up, I might be, hey, how is our month-on-month growth of XYZ metric over the last three months?
- 31:23I did this recently.
- 31:24I did this for my last board prep.
- 31:28And it came out with a pretty good answer right away.
- 31:31And I was like, wow, this is awesome.
- 31:33And then I kind of looked a little bit deeper and I was like, oh, I actually want to exclude, you know, these users from this analysis and I want to filter it this way and filter it that way.
- 31:42And I kind of imbued more of this business context into that SQL query.
- 31:46And I iterated with Cloud Code to get it to be better and better for the specific kind of metric that I was looking for, the specific kind of story that I was trying to tell.
- 31:56And then I got it to a good place.
- 31:57I was like, great, let's dump this to, you know, an analysis folder for or an analytics folder for future use.
- 32:08And then next time you're doing your board prep, you can be like, hey, what was that query that we did last time?
- 32:12And it'll presumably go get it.
- 32:14Yeah, that's really cool.
- 32:16What else?
- 32:17You know, as any software team is these days, we're using this also for, hey, a customer comes in with a question.
- 32:29Can Cloud Code just fix it?
- 32:32You know, and so you'll have, in some cases, a linear ticket is filed.
- 32:37And then, you know, our support engineers are really very technical.
- 32:43And so they may not have the wall clock time to go down and chase down the fix themselves to, you know, an incoming bug.
- 32:50Yeah.
- 32:51Um, they have the technical skill.
- 32:53Um, but guess what?
- 32:54Another customer writes in two minutes later and, and they want to jump on that.
- 32:57They don't want to be, um, knee deep in a debugger.
- 33:01Um, and so, um, something that we do sometimes is they'll file the ticket, um, in case, and by default, it'll maybe they intend to do it later or some other engineer is going to be doing it later.
- 33:13Um, but Hey, can we...
- 33:16Can we see if quad code can just take a crack at it?
- 33:19Is that going to work out 100% of the time?
- 33:22Definitely not.
- 33:22Is that going to work out 50% of the time?
- 33:24Still no, to be honest with you.
- 33:28But can that improve the overall efficiency?
- 33:35Yeah, maybe.
- 33:36We're still, I would say, experimental there.
- 33:39But we're seeing a lot of promise.
- 33:42That's really interesting.
- 33:44Okay.
- 33:45Well, I know you also, you know, in our pre-production call, you were talking about you have a big vision for the future of AI.
- 33:53Do you want to talk me through that?
- 33:56Yeah, yeah.
- 33:57I would love to.
- 33:57You know, we talked earlier about how agentic AI can make...
- 34:05Operators' lives a lot easier by taking their, you know, certain pedestrian tasks and sort of running with it independently.
- 34:12And that's something that I think as an industry we're almost on the cusp of.
- 34:17And if you start stepping...
- 34:21you know, you ask how you get there and you also start asking about the steps beyond that and beyond that.
- 34:27A big part of the way I see things unfolding from here, I like to say, is the future of AI is cyborgs.
- 34:38Which is like sort of like extra ridiculous because like,
- 34:41what is a cyborg other than like already like a robot.
- 34:46But, you know, cyborg, as I understand it, is a term that means you're sort of like part, you know, person and then part machine.
- 34:52And in this case, I mean, when you go and talk to an agent, what you're going to be getting is part GPT, neural net, LLM, part AI, and part code.
- 35:12where the machine, quote unquote, that I'm talking about is is traditional CPU, not GPU software.
- 35:21And to me, I think I expect this to play out in two main ways.
- 35:27One is your kind of one off operational use cases like we were talking about a minute ago.
- 35:32And then the other is production software.
- 35:35And in the use case we were talking about a minute ago where
- 35:42Someone needs to kind of perform some tricky one off action with a bunch of points and clicks.
- 35:46And now we want an AI to just do a bunch of tool calls.
- 35:51The way I actually see that happening and what we're building towards is code execution.
- 35:56So rather than the model having a bajillion tools, model has two tools.
- 36:03One to...
- 36:04Execute code where it just kind of has a text box of like, hey, put in some TypeScript and you're going to use this API's TypeScript SDK and you're just going to write Stripe.transactions.list or Stripe.
- 36:21charges.list, and you're going to do stripe.customers.retrieve and stripe.refunds.create.
- 36:26This is really easy for models.
- 36:28They're really good at writing code.
- 36:31And if you give that tool a little bit of sort of a readme, where you say, here's an example request, and here's some other resources, some other API calls that you can make, it's really good at extrapolating from patterns if the SDK and the API are well-formed and predictable.
- 36:49And then you give it an additional tool to kind of search the docs and ask questions to the docs.
- 36:54And anything it's not sure about or gets wrong on the first try, you give it the documentation.
- 37:02And...
- 37:04What this does for that scenario that we were talking about earlier is you have very, very limited impact on the context window up front.
- 37:14And we're talking about a thousand tokens or something like that, maybe less.
- 37:18And the context impact of doing a whole bunch of paginated list requests...
- 37:25zero you know the the model will go look for somebody named dan and it'll double check um that the purchase of stripy socks and you might write three nested for loops but then only at the end when it found the right thing it'll console.log found dan customer id blah blah blah transaction id blah blah blah um and then create refund you know refund id one two three um and the context uh
- 37:52hit coming back from all of this is going to be like 10 lines of text.
- 37:57You know, it's really minimal.
- 38:00And all of this will run really, really quickly, too.
- 38:02So you don't have a round trip to the model every time you're doing something like this.
- 38:06It's just CPU code and it runs in a server in the cloud right next to the Stripe API in AWS somewhere, probably.
- 38:12And it goes super, super fast.
- 38:15Okay.
- 38:16So what I am understanding you saying is like the language model
- 38:22has a tool where it can write code and send that code to this tool that the, you know, whoever the company is, whether it's Stripe or whatever, whoever's MCP server you're using, they'll go and execute that code.
- 38:33And that code is going to interact with their API and then return the results rather than like these sort of, you know, you have 50 different, you have 50 different possible tool calls and, you know,
- 38:45All that stuff.
- 38:45It's just model writes API code and API provider executes that code, runs it on their API and returns the results.
- 38:54Why wouldn't my model just write the code that I then run myself instead of relying on an API provider to do it?
- 39:04I expect that that will happen a lot more.
- 39:07I expect that the code execution tool is going to become the most widely used tool.
- 39:13One of the problems that we have today is that the code execution tool doesn't work so well with libraries.
- 39:22LLMs have a hard time working with library and knowing exactly what version of the library it's using, using the right version, probably usually the latest version.
- 39:33and not hallucinating aspects of the API and knowing how to iterate if it hallucinates wrong.
- 39:42And if it can't use any library off NPM or the Python package index or anything like that really, really well, basically perfectly out of the box, then, okay, well, forget about using a library.
- 39:59At that point, you just have to hit
- 40:01the raw HTTP API.
- 40:03And at that point, in order to figure out what's in there, you need the whole open API spec.
- 40:07And you're back at square one because that document is massive.
- 40:10And furthermore, something that's really scary about that is if you don't have a typed library with static typing, where the computer can say what you're trying to do is wrong,
- 40:22then the LLM will try to make an API request that is wrong some percentage of the time.
- 40:28The code execution tool can run a type checker and say, oh, you're asking about Stripe.transactions.list, but that actually doesn't exist.
- 40:35Stripe doesn't have a transactions API.
- 40:37You might want payment intents, you might want orders, you might want balance transactions.
- 40:42Which one do you want?
- 40:43And if the API provider is doing a great job building this tool,
- 40:47it'll return the documentation for all of these things in line.
- 40:51It might have its own AI look at what the model's trying to do and come up with a suggestion.
- 40:56And that sub-agent is well-trained, specified, always updating, and isn't burdened with the context of the full conversation.
- 41:06Hmm.
- 41:08What do you think of the security model?
- 41:10The security model is really, really interesting.
- 41:13This is another area where we're really starting to think about things at Stainless, and I'm getting really excited about it.
- 41:19So if any listeners are really interested in this and have some ideas or want to talk, please do reach out.
- 41:29At the end of the day, I think the security has to take place at the API layer itself.
- 41:34Right now, you see people trying to implement security by sort of limiting what's exposed through MCP.
- 41:39And that kind of makes sense.
- 41:40But at the end of the day, you could do anything that's in the API under the hood, right?
- 41:51And what people should be doing is using...
- 41:55OAuth with granular permissions, with proper scopes.
- 42:01And at that point, the security happens in the right place, which is at the API layer.
- 42:06There's limitations to OAuth scopes, and it's pretty hard to build.
- 42:10So it'd be nice if someone made that easy, but in my view, that direction is sort of the right direction.
- 42:18the right layer.
- 42:19So going back to my earlier question, I'm thinking about the idea of having a model write code that then the API provider executes to interact with their API and then returns the results.
- 42:33Would you ever consider just creating a tool use tool that developers use?
- 42:40Because, for example, I'm thinking about for Quora.
- 42:44Got all these tools.
- 42:44Yeah.
- 42:46Maybe Gmail is going to build a code use thing or whatever.
- 42:50But really, I would probably use what you're talking about inside of Quora, but we would need a tool use tool.
- 42:59It's not a tool use tool.
- 43:02It's a computer use tool.
- 43:04And I know OpenAI has this, but it's not really well built for lots of libraries and stuff.
- 43:09It's not a custom environment.
- 43:11I need a computer use tool.
- 43:13where I control the environment and I can install different libraries in it and be able to call it any time to then call any API or it has to have network access, basically.
- 43:27Yeah.
- 43:27You guys should build that.
- 43:29We're working on it.
- 43:30Fuck yeah.
- 43:32You're building it for developers who want to access MCP servers or people who are providing MCP servers?
- 43:38We're starting with people who are providing MCP servers, but ultimately I think that we're going to need this to work such that...
- 43:45you can give the model a code execution environment where it can hit not only the Stripe integration, but also the Salesforce integration and also anything else.
- 43:54But not too much anything else, right?
- 43:56And so one of the advantages of starting where we're starting of just one API provider is that you ensure that there's no network connections allowed out of that sandbox where we're running the code to anything other than, in this case, api.stripe.com.
- 44:10And that's really, really critical for security for something like this.
- 44:14And so there's ways to expand that bit by bit and keep things secure.
- 44:22It'll take some time.
- 44:24The other thing I think to point out as you see some of these generalizations is it's not just that you want this code execution sandbox to work really well.
- 44:33for any API, for any library, which I think we really do.
- 44:38I think we really need that.
- 44:40You also start to see that this is just a powerful model for AI doing stuff.
- 44:47And sometimes you want, you realize that the thing that the AI did this one time in this one-off case is actually enduringly useful.
- 44:55Maybe anytime a customer writes into support and says, hey,
- 45:00my socks had holes in them.
- 45:02You should automatically get a refund, you know, um, maybe you want that, maybe you don't, but there's a lot of stuff that people do one or one time and then two times and then three times.
- 45:12And then they say, okay, we should automate this.
- 45:14Right.
- 45:15And that's, and that's what software teams do all day, every day.
- 45:18Right.
- 45:19And, um,
- 45:20I think we're also going to be seeing that with AI, where the same code search tool that we're talking about, all the same prompting that will make an AI really, really good at interacting with an API in one of these code sandboxes, kind of like almost quote unquote in its brain.
- 45:34We're going to like write code in its head, run the code in its head, see the results, and then move forward with your query, with your task.
- 45:45It should be able to say, okay, actually, this is enduringly useful code.
- 45:48Let me commit this to the repo.
- 45:50Yeah, yeah, yeah, yeah.
- 45:52It's like, you know, chat is a really good interface for exploring, but sometimes you just want a dashboard, you know?
- 45:58I just want to like log into my Stripe dashboard and see all the stuff without having to be like, what is my MRR?
- 46:03It should just show up, you know, because I just do that every day.
- 46:07But I want to push you as a hashtag value add investor because I think that there's a, I think that there's this
- 46:16thing that happens in AI where often the first attempt at something like this, people try to be really cautious.
- 46:24And I'm sure that your customers care about you being cautious, like big enterprise customers.
- 46:29But...
- 46:30The things that get adopted are often the ones that are willing to take the risk to be YOLO very early.
- 46:37So an example is Dolly was totally private for a long time, and people were posting some images, but you couldn't get in.
- 46:44And then Stable Diffusion was just like, fuck it, anyone can use this.
- 46:47And then that just really started the whole image generation wave.
- 46:53Obviously, Stable Diffusion sort of fumbled the bag, but they had a lead for a little while.
- 46:58Same thing for Cloud Code, honestly.
- 47:00Like, if you look at... Codex is not like this as much anymore, but if you look at the difference between Codex CLI and Cloud Code, Cloud Code was just like, fuck it, like...
- 47:09YOLO mode, it's super industrious.
- 47:12It has a sandbox, but you can just do dangerously skip permissions.
- 47:15And Codex just fell way behind because first it was in the browser, and so the whole thing was locked down.
- 47:22And then it was in the CLI, but it was really built for...
- 47:27pair programming and so it just wasn't particularly industrious it wouldn't go off and do a bunch of stuff it didn't it would get locked out of doing certain things even if you did full auto mode and now they've like caught up because they're they're like yeah you can just let it do whatever you want and so i would i would really push you on
- 47:45There might be a version that you could do today or tomorrow or very soon for individual developers that would let them set up this environment that, for example, I would use immediately.
- 47:55And I care about security, but I care a lot less than some ex-gigantic enterprise company.
- 48:03But I think the people like me who are building at this scale are eventually hopefully going to be the big companies.
- 48:10But we're the ones that are really doing the AI-first adoption, not the big companies.
- 48:14Well, I would love to get this in your hands.
- 48:15What are some of the APIs your team uses the most?
- 48:19I'm thinking, we have a bunch of different products, but I'm thinking right now about Quora, the email assistant.
- 48:25And it has all of the, like the big APIs that it's using, it's mostly the Gmail API.
- 48:34And so you're interacting with the assistant over chat, and then it has a list of tools that are like, you know, archive email or draft email or send email or whatever.
- 48:43Like there's a whole categorized tool.
- 48:45So it categorizes your mail in certain ways.
- 48:48And I think we would definitely try out something like this because it would, if it ran the same way, it would make it much more flexible for us to make more tools and not break old ones.
- 49:04You know, it's really interesting.
- 49:08Sure.
- 49:09I mean, in a sense, what I actually predict is that people who are quote unquote building tools, once we have a code execution kind of super tool like I'm talking about, is that the only way you really quote unquote build a tool is with...
- 49:23instructions with prompts.
- 49:26And the full power of everything you could possibly do in the API, in the Gmail API, for example, it's all there in one tool.
- 49:34But sometimes you have specific tasks or specific categories of work that you want to describe in a particular way to help the LLM perform a sequence of actions as productively as possible.
- 49:49And at that point,
- 49:50the only work in engineering that you have to do is, is prompt engineering.
- 49:54Um, we'll see if it's, we'll, we'll see if it's that quote unquote easy.
- 49:57Um, uh, as we all know, prompt engineering can be, can be really tricky.
- 50:02It's hard.
- 50:03Yeah.
- 50:03But, um, but I think, I think that's, that's part of the vision.
- 50:07Um,
- 50:08That being said, we do have some pretty nifty ways with the MCP servers that we generate today to help developers mix and match all the parts of the different tools underlying, all the different parts of the API as they compose and write their own tools.
- 50:23This is awesome.
- 50:24So for people who are listening and want to know more from you and know more from Stainless, where should they find you?
- 50:31Um, stainless.com, um, our, is it, that's, that's our website.
- 50:35Awesome.
- 50:36Or at least visit stainless.com.
- 50:38Uh, Alex, great to have you on.
- 50:39I can't wait to do more of this, uh, when you have some of these new things launched.
- 50:42This is really, really fun.
- 50:44And, uh, yeah, great to, great to chat.
- 50:46Thanks Dan.
- 50:47You too.
- 50:56Oh my gosh, folks, you absolutely positively have to smash that like button and subscribe to AI and I.
- 51:02Why?
- 51:02Because this show is the epitome of awesomeness.
- 51:05It's like finding a treasure chest in your backyard.
- 51:07But instead of gold, it's filled with pure unadulterated knowledge bombs about chat GPT.
- 51:13Every episode is a roller coaster of emotions, insights, and laughter that will leave you on the edge of your seat, craving for more.
- 51:21It's not just a show.
- 51:22It's a journey into the future with Dan Shipper as the captain of the spaceship.
- 51:27So do yourself a favor.
- 51:29Hit like, smash subscribe, and strap in for the ride of your life.
- 51:33And now, without any further ado, let me just say, Dan, I'm absolutely hopelessly in love with you.