MCP (Model Context Protocol)

MCP (Model Context Protocol)

By kabragaurav GitHub

A Simple Model Context Server For AI

tools ai
Overview

what is MCP?

MCP (Model Context Protocol) is a standardized protocol developed by Anthropic that enables large language models (LLMs) to interact with external tools and functions, facilitating the injection of context into LLMs.

how to use MCP?

To use MCP, set up the server by creating a directory, initializing a Node.js project, and installing the Model Context Protocol SDK. Configure the MCP server in your IDE and create a JSON configuration file to define the server settings.

key features of MCP?

  • Standardized interaction for LLMs with external tools
  • Real-time information requests
  • Execution of actions in external systems
  • Access to specialized knowledge and APIs

use cases of MCP?

  1. Integrating LLMs with various APIs for enhanced functionality.
  2. Enabling real-time data retrieval for AI applications.
  3. Facilitating complex interactions between AI agents and external systems.

FAQ from MCP?

  • What is the purpose of MCP?

MCP standardizes how LLMs interact with external tools, reducing the chances of API breakage and improving integration.

  • Is MCP easy to set up?

Yes! The setup involves simple steps using Node.js and the Model Context Protocol SDK.

  • Can MCP be used with any LLM?

Yes! MCP is designed to work with various large language models.

Content

MCP (Model Context Protocol)

by Gaurav Kabra

The Model Context Protocol (MCP) is a standardized way, introduced by Anthropic, for LLMs to interact with external tools and functions and injecting context in LLMs. It allows models to:

  • Request real-time information
  • Execute actions in external systems
  • Access specialized knowledge
  • Interact with APIs and services

→ Agents → MCP The 2nd figure is like this:

So we improve and get to the 3rd figure, which is similar to: The MCP is similar to USB hub in above picture. Due to it being a standard, changes become in a standard way. So less chances of API breaking since each MCP server is now being maintained by individual companies (Yahoo or Google etc.) and we just integrate with them.

An MCP server will expose 3 things:

Tool: Resource: includes knowledge base, DB, files etc. Prompt:

You can refer this for above images.

Setup From Scratch

mkdir mcpserver
npm init
npm install @modelcontextprotocol/sdk

See this for official documentation.

Now in Cursor IDE, click on Settings cog -> MCP. Create the file mcp.json and put below code:

{
    "mcpServers": {
        "Gaurav Kabra's MCP Server": {
        "command": "node",
        "args": ["/Users/gauravkabra/Desktop/MCPServer/index.js"]
        }
    }
}

Replace args with absolute path (full path) of index.js on your local.

And now it should show the add tool available:

You can find documentation here.

Do CMD + I and ask to add two numbers and you should see a response which we coded in index.js.

STDIO (Standard Input-Output) is ideal on local but for remote we use SSE transport (Server Sent Event). See this to know more.

No tools information available.

A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.

YouTube MCP Server
YouTube MCP Server by IA-Programming

YouTube MCP Server is an AI-powered solution designed to revolutionize your YouTube experience. It empowers users to search for YouTube videos, retrieve detailed transcripts, and perform semantic searches over video content—all without relying on the official API. By integrating with a vector database, this server streamlines content discovery.

youtube ai
View Details

MCP Deep Research Server using Gemini creating a Research AI Agent

research ai
View Details
MCP-Mealprep
MCP-Mealprep by JoshuaRL

This project takes a number of MCP servers from GitHub locations, packages them together with this repo's GHCR container, and launches them with docker-compose to run as a stack for ML/AI resources.

docker ai
View Details

BioMCP: Biomedical Model Context Protocol

bioinformatics ai
View Details
MySQL MCP Server
MySQL MCP Server by designcomputer

A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases

Toolbase
Toolbase by Toolbase-AI

A desktop application that adds powerful tools to Claude and AI platforms