
Lesson Description
The "Import the API Tool" Lesson is part of the full, Complete Intro to MCP course featured in this preview video. Here's what you'd learn in this lesson:
Brian imports the API tool into the application and tests the MCP with Claude Desktop. After some debugging, the tool loads into Claude, and Brian can ask the MCP to add an issue to the application.
Transcript from the "Import the API Tool" Lesson
[00:00:00]
>> Brian Holt: Okay, we do have to go import this and use it. So we're going to say title came from import API based tools from API based tools. And then once we have the server here, we're just going to say API based tools with server, right? So this is going to pass that into that other function we just wrote and it's going to register all the tools that we write in there.
[00:00:25]
All right, I think we should be able to give this a shot now. Okay, so let's go to Cloud Desktop. We have to go. No, it's already registered. Right, cuz we did it before with the resource, right? We already registered this MCP server, so it should. We don't have to do any modification and fix.
[00:00:52]
Probably to be expected that something is wrong. Open logs for Issues Server. By the way, if these logs get too long, you can just delete them and it will recreate them for you. Issues Server. Let's look down here at the bottom. Cannot find module API based tools. Okay, well, let's figure out why that is.
[00:01:23]
What did I call this?
>> Speaker 2: I think it just needs the .js.
>> Brian Holt: It doesn't. Yeah, I always forget that, .js. Once you start getting into this world of modules and common js, it just starts getting real picky about it. Not a fan. Take me back to the simple days.
[00:01:56]
All right, process is not defined. No, nothing there.
>> Speaker 2: Only one C in process.
>> Brian Holt: I can spell, [LAUGH] it's Proccus, thank you. All right, so process has one. Yeah, that was here. If you're following along with my insane spellings, make sure you only have one C. Okay, we're just gonna.
[00:02:45]
We're gonna delete all of these. Move to. Man, I had quite a few in here, didn't I? Z.string, I didn't call it as a function. Where is my. Where did I put. String is not a function. Right there. Line 52 here. This is a function invocation. I do that all the time with sod.
[00:03:24]
>> Speaker 2: I think tag IDs too has that on optional.
>> Brian Holt: Yep, you are very correct right there.
>> Speaker 2: Is that nested?
>> Brian Holt: Right.
>> Speaker 2: Do you want the number to be optional or the array? You might need a parenthesis moved.
>> Brian Holt: Yeah, no, I think you're right too.
[00:03:50]
>> Brian Holt: Yep, so the tags array here, that actually would be a bit of a problem. The array is optional. This is optional, which I had. The entire thing being optional, which is not actually what you want. Now we should be able to see that we have Issue Server and it does have an issue.
[00:04:14]
Create. I'm going to say create a new issue in my Issue tracker that says to add Google Login to my app, mark it as in progress and market as medium priority. Here is my API key. Okay, and then I'm going to go back over here and I'm going to go grab an API key right there and let's see how we do.
[00:05:10]
All right, let's see. See if it's reflected now in our issue tracker. Add Google Login to app implement Google OAuth. I mean, it's cool that it adds these things. Like, I didn't say OAuth anywhere in there, right, to allow users to sign in using their Google account. It's in progress.
[00:05:30]
It's medium priority. Pretty cool stuff, right?
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops