Full transcript of “Rest MCP Server with Claude | Developed & Design by PrinceAutomationDestination”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 Hello everyone, welcome back to my channel Prince Automation Destination. This side prince I hope you are doing well. So today we are going to talk about rest MCP server. This is a brand new MCP server which I have developed and designed from the scratch using AIO's library right and the purpose of this particular MCP server to enable LLMs to talk to REST APIs and perform crowd operations. So this is what we are going to talk about as part of today's discussion. So without further delay, let me jump onto the slides. So this is the rest MCP server which uh like can be connected with LLM and can perform operations on REST APIs such as create, retrieve, update and delete. Right? So
0:46 now let us try to understand what is going to be the text tag. Right? Uh like what is the text that I have used right? So I have used NodeJS, TypeScript and JavaScript. I want to highlight one thing that I'm more comfortable in Java and I have mostly worked in Java. But I have followed MCP document to develop this particular MCP server in TypeScript and JavaScript right and uh the main library is uh this model context protocol which provide tool right using tool we can define our individual functionality. J is to provide the linking between methods and NLP. What does it mean? So in any language there are methods right which need to be invoked but as we are going to provide the integration between this method and NLP. So this is where jord helps and it
1:34 can provide the integration between the natural language and the methods right and exios is similar to sur which I'm using right to perform the cred operations right. So this is what is the text. So let me show you the framework right. So this is the local copy. So in this particular framework the main uh class is index index.ts right. So if I show you so I'm using this MCP server library right and this is stdio server transport which is the for purpose of which is for the purpose of running the MCP server locally. Strand for standard input output. J is uh for like linking between NLP and methods right and Xio's for the uh like hitting the APIs right. So this is how we are starting the
2:19 server and as I mentioned that tool uh like this particular MCP server provide the tool functionality. So using server tool we define the individual functionality. So this is one individual functionality that I have developed. So here we need to provide the NLP context right generate token or authenticate user right this is what we used to pass from LLM in order to talk to this particular functionality. Right? So here how we are using uh the input from llm base URL endpoint username and password and we are passing it to this particular method and then we are using xos to hit the endpoint right xos.post post base URL and endpoint which we got from this particular uh like LLM right and this is the body right username and password which is payload we can say this is
3:05 header right and this is how we are returning right similarly we have developed other tools or other functionality as well like get endpoint then create endpoint uh put or update right then partial update is there right and delete request is there right so this is what I wanted to give a glimpse of it Right. So now let me go back because this is not the agenda of the discussion. The agenda of the discussion is to integrate the MCP server with the with any LLM. Right? Now let us try to understand what is MCP. As I have already covered MCP in many videos, right? And in case you want to skip this section, you can skip it. But those who are watching this video for the first time, for them it become important to understand what is MCP. So
3:50 that's why I need to cover it right now. What is MCP? So MCP is a unified protocol or set of standards which defines uh standard to allow applications to provide the context to LLMs. Right? So with the help of MCP what happens is we provide the context to the LLMs. What does it mean? So LLM by default cannot talk to external data sources. So suppose your LLM want to talk to Jira to read by user story. So by default it does not have this capability. And what is LLM? So for any AI tool LLM is the core. So when we say uh something to AI this is LLM which is returning something right which is giving the output right. So LLM needs the context and MCP is used to provide more context by establishing the connection between LLM and the external
4:36 data sources. Right? So it acts like a bridge between LLMs and external systems. Right? It follows client server architecture. So client could be any LLM which is MCP MCP client meaning it should be able to talk to MCP server. Server is similar to that I have developed. So there are like many MCP server available into the market like GitHub, GitLab, uh Poster, U, PostJS, right, Puppeteer like there are many servers you can talk to, you can utilize to talk to different external sources, right? Now let us try to decode what actually MCP is. MCP stand for model context protocol. Model is GPT4 claw sorry giny uh flash right. So as we mentioned that for any AI tool the core is model right which gives the output. So when you say act as a senior
5:22 automation QA and give me the test cases for this particular uh module. So this is model who generates this particular output right. So AI tool just is like a UI which will render it right. So now AI tool needs or LLM needs the context right. So what MCP does is it defines a standard by which we can provide the context to LLM so that it can provide more accurate output. What does it mean? So if you will for example provide a connection between LLM and let us say Jam right which has a user story and we want it to generate the test cases. So if you will have if it will have more context it would be able to generate more test cases. So this is where the MCP helps right. So if I'll talk about the integration. So for example as a user I want to talk to an AI tool in the
6:09 background it will have LLM which is like a brain right. If it for example want to talk to GitHub to patch the repositories it cannot do it right. But with the help of GitHub MCP server it can integrate LLM with this MCP server and then after this user can talk to GitHub repository via LLM right in natural language. Similarly, if it want to talk to selenium, it need to integrate meaning this particular LLM need to integrate selenium mcp and similarly if it want to talk to rest apis or want to perform rest operations. So, it will need to integrate with rest api mc mcp server right. So, now let us talk about our case right. So, llm with rest mcp server right. So, as a user I want to talk to or I want to perform the rest operations right. So by default if
6:55 I'll say to LLM to perform the CRUD operations on our sample API it won't be able to do so right because it doesn't know how to interact and how to talk to rest APIs but with the help of restcp server which can be integrated with lm we can perform these operations so this is what we are going to demonstrate right but before that I just want to show you the resources so this is the sample rest API right so uh this is the endpoint to generate the token this is to get the booking ids this is to get the uh specific booking this is to create the booking this is to update the booking partial update delete the booking right and health check right so these are the endpoints that I'm going to demonstrate as part of current discussion right so this is the GitHub repository where I have pushed the code
7:40 for this particular MCP server and this is the npm location where I have pushed the node module which is required for the AI tool to pull right when it would be running it locally right So we will soon understand what does it mean right? So I'm going to uh jump onto the demonstration. So this is the cloud desktop which is an AI tool. Right. So if I click on this particular tool section you will see no MCP server is connected. As soon as MCP server is connected it will start appearing here. Right. So by default web search is automatically integrated but this is uh nothing uh for relevant right. Uh so we are going to talk about MCP server right? Uh our MCP server right? So how to integrate it right? So the question is how to integrate it. So for that purpose first of all node should be
8:26 installed as we would need to run node module locally which happens internally right when we will provide this particular configuration to um any MCP client in our case it is going to be cloud right. So uh what I'm going to do is I'm having this particular uh configuration here and I'm going to claude and I'll be going to file settings and developer and click on edit config. As soon as I'll click on edit config I'll land on this particular location where cloud is available and I'll see cloud desktop_config.json. I'm going to right click open it into notepad and I'm going to provide my configuration right and then after uh I'm simply going to exit this particular
9:13 AI2 right now I will start cloud once again. So you see it got started right. So let us wait uh for some time because as we have provided the configuration it would be downloading the node module right and it would be running it locally right. So you see now we are able to see HTTP server. So this is how we can see the same functionality available here and if I go here and go to file settings and click on developer HTTP server. So HTTP server is running right. So this is happening because of npx command. Right? So this is how it works. Right. Now what we are going to do is we are going to perform the crowd operations. Right? So
10:00 for that purpose I have simply kept this particular prompt. Right? So this is the prompt that like this is the information I got from this particular site. So I'll be sharing this particular link as well. Right. Now I'm going to copy this particular prompt and I'm going to generate the token. Right? So let us say whether it would be able to generate the token or not. So you see base URL endpoint is all this is username and this is password right. Authentication token has been successfully generated. Right? Now let us go to the second part. Right? Create the booking. Right? So when we want to create a booking meaning it would be a post request. So it would need a payload. Right? So I'm passing first name as Prince and last name as Butra. Right? So I'm simply going to provide it
10:45 right and see right. So I don't need to pass token it will automatically be passed right because it is automatically generated right? So whichever request would need the token it will be passed automatically. So you see it has generated booking ID with 3147 name is Princera right now what I'm going to do is I'm simply going to update the booking using the above endpoint. So for update also the endpoint is going to be the same right but it will add this particular 3147 automatically right. So I just want to update last name to automation which wasra previously right. So let us see whether it would be able to do so right. So I'll update the booking to change the last name from butra to automation. So you see it will automatically pass the booking ID right booking/3147
11:31 so booking has been updated so you see is updated to automation and it has mentioned it as well last name changed from butra to automation right now let us move further right delete the booking endpoint right so delete the booking using above endpoint so it I'll delete the booking with ID P147 which we just generated right so you The booking has been successfully deleted. Right? Now let us try to get this particular booking. Right? So get the deleted booking using the above endpoint. So I'll try to retrieve the deleted booking with 3147 to confirm it. It has been removed. Right? So you see we got unable to fetch. Right? And it said that
12:16 as expected the booking retrieval failed with an error unable to fetch because the booking was already deleted. So this is what I wanted to cover as part of current discussion. Thank you for watching and I would request you to please like, share and subscribe.