How To Use OpenAI Agent MCPs For Beginners β
Let's learn how to use OpenAI Agent Builderπ
2025-10-09
Transcript β
[00:00] Let's learn how we can start utilizing MCP within our agent workflow. And yes, OpenAI made it way more confusing than it needs to be. So, I'll explain everything as simple as possible. Welcome back. In today's video, we're going to build out a workflow leveraging the native integration of MCP within this OpenAI agent builder. I'm going to go over the nuances of integrating this way, why it could be a good thing, but also why this could be a bad thing if you use the native version of the OpenAI integration. Now, your first question might be, Corbin, what the heck do you mean native integration? Essentially,
[00:30] when you put an MCB block here, we hit add. You'll notice that it says Open AI connectors. These are connections that leverage OpenAI's back-end infrastructure or in other words, essentially it's supposed to be their version of an easy plug-and-play where essentially you just provide an API key and then you can do actions within these different softwares, whether it's Gmail, Google Calendar, SharePoint, Dropbox. But I'm going to go over a very specific caveat of why this integration might not be good for you. But we'll set one up today just so you understand how to use it and it's going to be with Google
[01:01] Calendar. Non-native integrations is when you come down here to thirdparty servers such as Zapier, Stripe, Shopify, everything like that. So in this video, let's set up Google Calendar. The steps and processes you'll learn in today's video, you can go ahead and apply to all the other integrations you'll see with OpenAI. So first things first, I'm just going to go ahead and delete this little block here. We're going to leverage the MCP directly in the agent itself. So what I'm going to do is simply hit my agent here. We created a new workflow. I'm going to come down here to tools and we're going to hit MCP server. We're
[01:31] going to hit Google calendar. It's going to request an access token. And the way I want you to think of an access token is this is our way of telling OpenAI that we have the rights to this individual's Google calendar. For example, the email and the calendar we're going to be using today is going to be my contact at webcafi.com. I'm telling OpenAI, hey, I own this. Here's my key. Therefore, you can do stuff to this calendar. This exists for obvious reasons. So, basically, you can't just affect everyone's calendar. To do this, we're going to hit get access token. It's going to bring you to a page like this. Don't worry, I know this looks
[02:02] extremely scary and extremely like OpenAI. Where the heck did you just take me? Before we dive into the implications of integrating this way, let's just find out how the heck do we find our API key. You will notice our first step here is authorized APIs. And then sadly, or maybe not sadly, but essentially Google gives you every single API that they provide. This is too many, right? If we're just trying to do Google Calendar, we need to find it. So on your computer, do command F or control F and type in calendar. Now, this is going to make it so it pops up pretty fast here, which is nice. If you're doing Gmail, type in
[02:33] Gmail. You know the situation. Once we do calendar here, I'm going to simply open it. And what you'll notice is that it is not as simple as, hey, Corbin, I want to integrate everything with Google calendar. Essentially what they do here is they'll granularize a lot of the different types of actions. But if you want like the end all end all the top level of integrating an API for that specific software or application we're going to go with the one that starts with /cal. And the reason because and you can learn something new right now is that everything after calendar eg calendar.acls
[03:04] calendar.calers calendar.events these are going to be subcategories within this endpoint found in this API. This is confusing, I know. For now, all you need to understand is go with the shorter URL. Let me show you another troubleshooting thing that could help you out. If you're trying to integrate something else, it's not Google Calendar, so you can't watch this video and you're like, Corbin, I need to integrate Gmail like right now. Take the Gmail part. Simply just copy all of these links. Copy. Go to the chatbot that you absolutely love and then simply just paste it in here and ask what you
[03:35] want. For example, if I'm like Corbin, I want to know how to create an event in Google Calendar. Which one's the one I should give access to? You can say I want the link for the ability to create an event in Google calendar. The AI will do its analyzing and then it'll provide the most relevant link such as the one.events or alternatively if you just want the master one like I told you earlier the one/calar. So now that you know that we're going to do here is we're going to click this one. But you'll notice is that we can actually click multiple if we choose to do so. Now in theory what I always suggest people to do especially if you have kind
[04:05] of no clue what's going on or very little clue just select them all. end of the day, select them all. See if it works or whatever you're trying to achieve can work with all them selected. You're giving all the scope, right? All the rights and the abilities to that key. For now, though, we're going to select the slashcal here, authorize APIs. Go ahead and select the relevant email you want to give access to. So, I'm going to do this one right here. But I want to point out something very important, and I'm going to show you a solution near the end of the video of how to solve for this. And that is when you give access to your calendar using this method, you will only give access
[04:36] for 7 days, and then it'll be revoked. But to be honest with you, I'm not sure if that's a new Google update to their policy, but from my experience, and if you're wondering what my experience is, I built out a software company called Bumpups. You can check it out, AI video model. But one of the integrations we did on this was integrating your YouTube channel to automate content workflow. Now, when I went through the development logic for this, when I created this software, at the time, Google's access token at a production level would expire every 24 hours. In other words, me
[05:07] accessing this access token, I would have to use a refresh token and then programmically keep refreshing it. But what Open AI does, which is kind of interesting here, is what you'll notice is that in OpenAI's agent builder, it doesn't give you the option for refresh token, but only access token, which tells me that either your workflow is going to break after 24 hours, or alternatively, maybe Google increased it to after a week. But keep that in mind. That means after seven days, your entire workflow is going to break and you're gonna have to redo the steps in order to
[05:38] give a new access token. But don't worry, I'm going to show you a solution to that. Right now though, let's just keep going here. I'm going to continue. Now, obviously, I'm going to have to white out that authorization code. This is all high-risk stuff. You don't even see my face right now because it's cropped in. But I'm essentially going to click this and then you're going to copy this token right here. For some reason on my page, it clicks away really fast. But just copy this token once you click this. Once you have that, it should start with like y a something something. It's just like a long string string just text. You're going to paste it here and then we'll hit connect. Next, it's going to ask like all the relevant actions you want to give consent to. We'll just say
[06:10] everything for now, but you can kind of get an idea like, oh, this is kind of cool. Add. So, let's see if this actually works. I'm going to simply use the prompt, you are my calendar assistant. Find all my events for October. I have the tool of Google calendar, the MCP. We just connected here. In theory, we could actually make a widget for this. Pretty cool stuff. stuff I'm going to do in another video. So, make sure to subscribe here and check out the description down below for the mega playlist that we are doing on this channel. For now, though, we're going to do text and then we shall preview this. Now, for reference, I went ahead and took my blank calendar here. I added one little event here of live stream tonight. So, when doing this and
[06:40] proving that this works, this is the event that should show up for October. And yes, you heard that right. I live stream every single day. I'm the only AI influencer in the industry live streaming every single day. Every single day, Corbin, every single day. Description down below. Check it out. What events are there in October? I'm going to hit enter here and we're going to go straight to our agent and then we should see what it does here. I'm going to hit approve and there we go. October 15th live streaming tonight. It shows up. This proves that the access token we worked was correct. It proves that we can actually grab data from that calendar using this method. So your next question might be, Corbin, this is super
[07:12] cool, but I don't want to keep having to reset my access token to give access to this. I just want this flow to keep going. I get it. Let me help you out. In the short term, OpenAI might provide this in their native MCP feature. In order to do that, at least in the context of Google and Google's ecosystem. I'll be completely transparent with y'all. I have not really messed around with Microsoft's ecosystem when it comes to access tokens and how long they expire and everything of this nature, but I assume most industry standard access tokens will expire within 24 hours, 48 hours, or
[07:43] supposedly, as we saw with Google, 7 days. This is typically industry standard. Like one niche case that I know that doesn't expire or you can set an expiry date is Pinterest which is like you can set a non-expiry date for the access token. But for these big platforms they do this for security risk and the way they go about it though. So it's like Corbin when I create a software when I connect in this method how do I do it so that when I use something like Zapier I never have to reconnect again? Well that's when the logic of a refresh token comes into play. Essentially, what a refresh token is is that the software will hit the
[08:15] refresh token, then give you a new access token that will then expire in 24 hours and then does this cycle automatically in the background and you never have to worry about it. But how do we do that without having to set up our own little custom, you know, source code and like I don't want to code Corbin, just give me an easy plug-and-play. Well, that comes into Zapier and I plan on doing an entire video on this. And the way Zapier works in this context is we can do that exact same integration of Google calendar, but then you would integrate and connect Google Calendar with Zapier's platform. Therefore, we circumn the pain point of having to
[08:47] reset our access token every time. So, make sure to stay tuned for this channel. Subscribe down below. I'm going to show you a really, really cool use case using Zapier here that's going to allow me to create a AI YouTube bot that I can put in any link, ask any question, and get information out of the video. One last major shout out here. Make sure to check out the school community description down below as well. It is free to join. Think of it like the Reddit of all Reddits when it comes to AI. I need help coding. I need help with my AI agent workflow. Sword are two free codes. Whatever it may be, description down below. Join for free. So, there we
[09:18] go. That is how you set up an MCP native integration with OpenAI. If you found value in today's video, make sure you leave a like. It is completely free just like the community description down below. Builders content log. I'll see you in the next. OpenAI has a native integration for MCPS, but they need to give us the ability to add a refresh token so we never have to keep resetting it every seven