How To Connect MCP Servers To OpenAI ChatGPT β
Let's build with Zapier and AI (100+ videos)π
2025-06-12
Transcript β
[00:00] OpenAI MCP servers are a thing now and I'm going to show you how to connect Zapier to one and we're going to do some cool stuff in the developer playground. Does that sound good? Let's jump in. Welcome back. Today's video is sponsored by Zapier because as you already know, me and Zapier have teamed up to give you cool stuff and artificial intelligence and how we can integrate that. If you don't know what Zapier is, think of it like an AI orchestration platform that gives you the ability to access an entire ecosystem. Whether you want to do automations, leverage their tables, features, interfaces, chat bots, canvases, agents, a ton of stuff. This allows us to use AI throughout our business and all of our needs can be met
[00:31] through this little ecosystem. In today's video, I want to see how we can connect this ecosystem to OpenAI and create a nice little model that has the ability to access applications outside of its little bubble. Cuz as you already know, when you're using chat GBT cla, you're typically kind of siloed in. So the MCP server gives us the ability to access all these different apps within a chatbot interface. So basically, let's learn how we can take this 4.1 model here and send an email. But in theory, we could do a bunch of other stuff. Anything that connects with Zapier will connect to this. Now, to do this, make
[01:02] sure you just sign up for an OpenAI developer account here. We're going to come over to this little plus button here and choose MCP server. I'm going to go ahead and select Zapier here, and we're going to get our API key. So, I'm going to say get API key. Once we're here, all we need to do is hit create MCP server. So, with that done, I'm going to simply connect first by hitting connect, scrolling down here, and simply hitting copy secret for API key. coming over here. I'm gonna paste it and connect. So far so good. We have some tools available to us, but we're going to create a tool together here. I'm gonna hit add and we'll see it right there. So, let's lean into the power of Zapier, which is this ability to connect
[01:33] to a ton of different apps. And these are going to be what we call tools or just another way of saying it of you got an action of Gmail, that's a tool. You got an action of Google Sheets, that'll be a tool. A tool is the capabilities that we're going to give our model. So, I'm going say add tool and we're going to do Gmail. What I'm looking to do is going to be send email. There we go. So now with our MCP server here, our chatbot is going to be able to send an email. But what we can do is actually customize this. So I'm going to click this. And for most things, you can have AI generate the field. Scrolling down here though, I want to change one thing. So let's say I'm coming down here and
[02:04] for these kind of emails, I want to be very important. These are very important emails. So for the label, I'm going to simply do set specific field. For the value, we're going to choose important, but this could be a custom tag you create. Hit save. So now every single email I'll send through this MCP server will be tagged and ready to go. Mind you, there's a ton of other apps. I'll make sure to leave in the description down below a link to all the apps that Zapier currently integrates with in a very nice friendly way. I'm going to explain a little bit of this user interface, but just taking a step back of Corbin, what are we even doing today? Like what are we trying to solve? I want
[02:34] to go to San Francisco and I want to plan a day trip in San Francisco. I want to see everything about SF, plan a day trip and send it to my friend. So, first thing though, because of the fact that we added a new tool or new capability, we're going to click this and you're going to see it pop up here. There we go. Make sure you select it and hit update. Therefore, the workflow here is very much you add a tool here, make sure you do an update here so that the AI model can actually access it. What's cool about the developer playground is that we have way more flexibility on how we actually tailor our underlying models. So, for example, here we can
[03:05] choose our model we want. So, maybe we don't want 4.1, but we want 4.1 mini, etc. Another one here is to adjust the outputs of the AI model. So maybe we want text format. We want a JSON object, JSON schema or something like temperature. Lower temperature is very consistent outputs, very consistent. Don't get creative on me AI. And then higher temperature is go crazy. Here's a color crayon. Just start drawing pictures. Just basically crazier outputs that aren't as consistent at these outputs, right? So if you're looking for maybe social media captions, you'd be leaning towards a higher temperature to
[03:37] let it off the handle a little. For now though, typically you just go with defaults and you'll probably be good to go unless you need something very specific. So this brings us to the next two parts here, which is the system message and the user message. And this actually shows up when you actually code with OpenAI's API as well. The system message is bottom line context of how to interact with the messages it receives from the user message. Think of the user message like anytime you use Chad GBT or Claude or Perplexity, when you put in like a prompt, that's going to be your user message. The system message is like you're a social media manager. Interact
[04:09] with the prompts like a social media manager. So for example here I'm going to want to write emails. So let me give a little bit context of how I want these emails written. Big thing about system instructions is all about structure. Structure structure and structure. So what I'm going to do here is say you are here to help me write emails I will send to my friend for plenty of trips to new areas. Email structure should be one summary of the email two itinerary of the area and lastly a funny joke about the area. Oh yeah AI can be funny. So, now that I give this context though, what I can do here is simply say, I'm going to San Francisco with my friend.
[04:40] And because it has the system instructions, when I hit enter here, watch this. This is actually pretty on point. So, nice little subject. San Francisco trip plans an itinerary. It gives a summary of the email as we identified. Hey, I'm super excited about our upcoming trip to San Francisco. Here's a rough itinerary with some can'tmiss places. So, we got our itinerary for San Francisco. I get more specific with my system instructions for the actual output itself. So maybe I want a day in San Francisco like the timing associated like we go here at this time then we eat here because it's really good. And then finally a funny joke about the area which I'm actually curious. Why don't they serve ice cream
[05:12] at Alcatraz? Because the residents always break out. What? All right. So AI has got to work on its humor. For now though, this is solid. So we're chatting back and forth and finally I have come to the perfect email to send to my friends. So I'm going to say send email to a friend here. Provide the email address. Hit enter. Let's see the magic. Clearly see this all looks good here. So I'm going hit approve. We are sending an email through MCP M to the C to the P. And it says the email's been sent. Let's see. So we got our subject San Francisco trip plans and itinerary. Then we have the
[05:43] underlying information. Now what's really cool here that I noticed is that in the original output it gave stuff like summary of email which is you know if you're sending this to a friend you don't really I mean maybe some of y'all but you don't really put the verbiage summary of email and they give summary. You just give the summary. This was smart enough where it just gave the summary. It was good to go. It didn't need to have the one or the two of the three. And then funny joke about San Francisco, the something about eating ice cream. Okay, so now that we have that, here's where the power comes into play. We can also add other tools. So not only can we layer the Zapier MCP, we can also add things like web search and
[06:14] we can give specific time zones, areas, regions. I'm going to say add for now. So because it was talking about Alcatraz here, let's let's go to Alcatraz. Okay, actually, can you do a web search and find me a ticket to view Alcatraz and add that to the email? Enter. So, this is where the power comes into play, especially with AI models, is you're essentially giving it a toolkit. If you just use an AI model like regularly, it's typically input in, input out of text, but using something like this, we can really do multi-layers and crazy actions. So, I'm not even going to look at it. I'm just going to hit approve and
[06:44] see if it's correct. Going back to our email here, good structuring. And then supposedly, we can book our tickets here. Let's book our tickets. Click the link and there we go. It actually brought us to a real booking site to see Alcatraz. It doesn't just stop there. And here's something really cool. We can take this entire workflow that I just showed you and get the code for it. This is definitely taking the playground to the next level than what it used to be 2 years ago. Look at this, y'all. We got a cool workflow. I like the workflow. I come up here to code and we can get the actual code here and start integrating
[07:15] it into our current application. If that's not super cool, I don't know what is. I mean, this just took a very complex piece of code that would have taken some time to create yourself and made it a drag and drop UI interface. And for some of y'all that are like, Corbin, I just saw your MCP key. Don't worry, I'm changing it. Don't try to take it. So, that's how we connect OpenAI's models to an MCP server, which we could then use in code or just play around in the playground. So, make sure to leave a like if you felt like you learned something in today's video. As you already know, those are two random videos. That is my face, and that's also
[07:46] my face. and I'll see you in the next