# Ch 8: First connection: ClickUp via API, not MCP Creator: Nate Herk (@nateherk) Transcript of Nate Herk's 2h33m 'Build your own AI operating system' course, split into its chapters. All content and credit: Nate Herk (@nateherk), https://x.com/nateherk/status/2101656269056610682. Transcribed locally with faster-whisper; names may be misheard. [0:36:00] that's the source of truth for it. But once we start to connect it to all of these things that we kind of sketched out earlier, once we connected to these, it won't have to keep asking us questions because the default will be, instead of asking Nate for answers, I will just go look in school or I will just go pull the data from QuickBooks or I will just use my GWS tool. That is what it's able to start to do. All right, so let's say that's where we're at now. I'm gonna go ahead and do a slash clear, which basically just clears the conversation, and I'm gonna pretend it's the next day, okay? Hey, good morning, it's day two, and I now want to start to actually connect you to things. You know, what are the most important things that I could start to connect you to, so you can get more context about my business, and we can just start to grow your database of data that you get to access. Now, if you already know, okay, like ClickUp, Google, Fireflies, those are the three most important things, then you can start wiring that up right now. But you can also have a conversation with it. You can be curious. You can ask it what it thinks and you can start to, you know, just kind of layer on top of each other, the different connections. Now, when you think about an actual connection, if you're not technical, don't worry about it. Because all that happens is you say, Hey, glared up, go do research for me and figure out how to connect click up. And it just does it. The one thing you will probably have to do is you're going to be the one that has to go grab the API key. And you're going to have to give Claude Code the API keys so it can actually access your stuff. It's basically just a password. So what this came back and said, good morning, day two, this is the exact right move I looked at your connections doc and I can see your priority order. [0:37:30] So here's the three things that you can do together. Click up for tasks, ownerships and deadlines and DMS and channels, fireflies for all of your meetings and then slack to get communication from other vendors. Now I actually disagree with this priority, probably because I didn't give it enough insight. I think ClickUp is definitely number one for us. And then for me, number two would be like my Google workspace. But anyways, let's just start with ClickUp so I can show you guys how that works. It is a massive tool for us, obviously. All right, so one other thing that you can think about when it comes to ClickUp or Gmail or Slack or whatever it is that you're giving your agent access to is that you don't have to give it access as you because your account probably has full permissions. It can see every space, it can download all the data, they can write whatever. it wants. In some cases, you probably do want that. But in other cases, why not just create an account for your AI OS? What I did here is I created an account called Up at AI. And now I give my Up at AI API key to Claude Code rather than my own personal API key. And you can do this for all of your other tools as well. Maybe you want to get a separate API key inside of QuickBooks, and you only want to give it read access, you know, you can do certain things like that to restrict the ability of the AI to make sure you don't have a situation like I forget which company it was, but I just saw some news article where an AI deleted like a really big database and you just want [0:39:00] to make sure that that doesn't happen. So per API key or per account, you can set different permissions. So think about that. And what else that means is if you have a bunch of different AI agents, each of them can have their own API key. And if they're spending money on that platform, you know, whether that's a research platform or just an AI model, you can then see which automation is using how much money. So think about the way that you separate out your permissions and your keys. But anyways, this is my Upit AI account of ClickUp. What I would do here is I would go to, um, up here in the settings, I would click on settings, I would go to the ClickUp API, and now I would just copy this token and this is what I need to be able to give to Claude Code. And once it does that, it can access ClickUp. Now, obviously before that, it's going to say, Hey, can we connect the ClickUp MCP? Or, you know, how do you want to do this? A lot of these AI models are going to want to default to using an MCP server. As you can see here, how would you prefer to wire it MCP server? It's the fastest if one exists for ClickUp. I don't like using MCP servers because basically what happens when you do that is it gives you access to every single function and every single endpoints that's possible, but you always don't need all of them. And also having a bunch of MCP servers loaded into your project, actually eats more tokens. So what I prefer to do is API endpoints. So here's what I'm gonna say. And this is what you should probably say to all of the different integrations that you need to connect. I want to use ClickUp's API because it's more token efficient than having the MCP server. So what I want you to do is do research [0:40:30] on ClickUp's documentation about all the different API endpoints. It would probably be helpful for you to set up a reference guide, a markdown file inside of this project that has all of the endpoints stored, so that later if you need to use a different one, you don't have to go do research again, you can just reference that file. But anyways, go do research about that, and then create me a .env file, and I will give you my ClickUp API key in that file. So let me just kind of like translate what I meant by that. It's going to look up the ClickUp API documentation. So if I search ClickUp API documentation, it's basically going to find all of this, and it's gonna look through it. Because there's different endpoints to get a token or to create a task comment or to, you know, make a list or to remove things from a list. Every single function has a different end point. And every single time that cloud would need to do something in ClickUp, it would have to come research it. But instead, if we just let it research all of this once and then save it as a Markdown file, Markdown is really easy for AIs to read. It's also very cheap for them to read. So now we have our own sort of database of every single possible ClickUp function and we have that stored locally. So that is the research that Claude Code is doing as we speak and it is going to save that for later. Now, what is a .env file? The .env file is basically just a secret file, right? So this is what it looks like. This is where you're going to store all your secrets. So we will input a ClickUp API token and a team ID. Now, the reason why we have a dot is because it's a .env [0:42:00] and it gets excluded from anytime we do a public push to a repo or anything like that. So it basically just means that we are protecting this API key. It's much more secure for you to paste in your API key into the .env rather than giving it in the chat history. Sometimes it might say, hey, just drop in your API key and I'll set it up. Don't do that. Just tell it to create the .env with the placeholder. And then it's so simple for you to go into ClickUp, copy this, and then you would literally just paste it right here, hit save, and now Claude Code can use it. And if you ever get confused about where you find your API key or how any of this works, just ask Claude Code to do the research and it will figure it out for you 99% of the time. Also guys, I realized that I switched over this mode to bypass permissions. So there's basically different modes in Claude Code. What I like to do typically is start on plan mode if I'm gonna build like a skill or I need help brainstorming. But if you're on edit automatically and you're trying to do something like research like you just saw, it might stop constantly and say, hey, can I do this web fetch? Can I do this? Can I do this? And if you get annoyed of that, you can switch to auto mode. Or you can also switch to bypass permissions. So auto mode uses a little bit more tokens because it basically uses an AI to analyze what am I about to do? Is this safe? If it's safe, I'm just gonna go ahead and do it. But if I'm doing something like a delete, or if I'm doing something like a push or anything that might be a little bit risky, then I'm gonna stop and ask Nate, or I'm gonna stop and ask the user. Bypass permissions just says, okay, [0:43:30] you can go do everything. I have never had an issue with bypass permissions. It's deleted things, sure, but only when I've asked it to. But you do run that risk of full autonomy. So just wanted to at least let you guys know about that. The way that you can enable bypass permissions is if you go to the settings down here and you click on settings and you type in Claude and then you can see right here, allow dangerously skip permissions. If you turn that on, you should now be able to see this option. But you could always just use auto if you're scared and then eventually if you feel more confident, you could switch to bypass. But that's why you might have seen that down there. Okay, so it says that ClickUp is wired. It says that we have a full V2 reference. So if I come into the references, we have a ClickUp API markdown file. And if I look in here, this is a very comprehensive doc. It is pretty long. So if Claude Code does use this, it's gonna have to read all of these lines, but it has all the endpoints. And now it has basically full understanding of how to use ClickUp. So let's go ahead and check it. It says, do you want me to run a test per assignee workload snapshot right now? it will see who's holding what across all 17 people. I'm just gonna go ahead and say, sure. And we're gonna see if it's able to use my API key that I gave it, use the team ID that I gave it, and use the right endpoints to find that information. And the cool thing is, as you're testing out these different endpoints or these different skills, if it hits a mistake, it's gonna fix itself. But what else is good about that is it found an edge case, because every time that it fails, it learns, and it can update something. So if this fails, I'm gonna say, okay, update the API doc [0:45:00] So that next time you do this, it never happens again. Or if you were, if this was running a skill right now, like let's say we ran a skill called team check-in, I would say, okay, can you go update the skill with the issue that you just ran into, how you fixed it, and to make sure that you never, ever run into that issue ever again. So honestly, think of a failure as a good thing, because it gave you more data about what not to ever do again. Another one of those super healthy Nate mindset shifts. Okay, so I'm not going to show you exactly what's on the screen right now. I'm gonna have like a blur over this or a box over this because I don't want you guys to know what I'm up to. But all of this is legit. This is exactly what's going on in our click up. And at the end of this, you guys can't see, I'll show you this line, but it says the three things worth doing. It gives me a number one, which definitely seems like I should probably check up with this person right now. We have number two and number three, which all makes sense in the context of my business right now. So that is proof that that's working. Let's do one more quick thing. I'm gonna go ahead and just do a slash clear. Actually, I'm just gonna open up a new tab and I'm gonna say shoot Nate a. A message in ClickUp. Actually, I don't know why I'm not speaking. ClickUp and just say, hey YouTube, making sure that this is working. Okay, so this will be interesting to see if it decides to use a channel or if it decides to just go ahead and DM me directly. But what is it doing? It's reading the connections doc and then it's reading the ClickUp reference doc and then it is going to shoot me off a message. [0:46:30] Now there's one thing that I would say here that you might wanna consider is if you have like a couple main API endpoints that you hit, you probably wanna put those somewhere that makes a little bit more sense. So for example, we don't want it to read every single time that entire doc because that could just waste tokens. But what's interesting is, let's take the example of the team check-in. Whenever we run the team check-in, we could say, okay, when you ran that, what endpoints did you use? And it would say, I used endpoints X, Y, and Z. Okay, put endpoints X, Y, and Z in the skill file So you don't have to look at the full API documentation whenever you want to do that specific skill. So I hope you guys are starting to understand here why it's a little bit difficult to give you like a step-by-step playbook for setting up your own AIS because everyone runs their business differently, everyone has different connections. But I'm trying to give you guys the way that I think about the mindset of setting this kind of stuff up. So anyways, it decided to create me a task. So it didn't completely understand what I wanted. So in my ClickUp, my real Nate ClickUp, not the Up at AI version, I got a task here and the task says, hey YouTube, making sure this is working, and it assigned the task to me. So it misunderstood my request a little bit. I was hoping it would send me an actual DM, but we can see here that it was able to create a task and assign it to me. So at least it understands that. And really what I was trying to prove to you guys there is that it was able to use a different endpoint as well. That is ClickUp. Now, before we set up another one and before we talk about some other stuff, I wanted to show you guys these skills