Posts

Showing posts from October, 2026

MCP Learning Series - Part 4

Image
Now that we have an idea on what is MCP and how to create a simple MCP server and add it to AI Application like Claude. But, Do we really need a AI Application to access MCP Server? Answer is NO AI Applications like Claude are using LLM for thinking, reasoning and acting.  MCP is a Client - Server architecture. Where the client is your AI application. But, to be precise these AI Applications are called "MCP Host". These MCP host contains inbuild MCP client. The above diagram explains the architecture of MCP. 1) After we add the weather MCP server to the AI Application - MCP Host. 2) MCP Client creates a dedicated connection (1:1) with the weather MCP Server. 3) This connection exist, regardless of the MCP Server is used or not. 4) When the user enters the prompt, "What is the weather in Chennai?" 5) The LLM discovers the tools available and based on the input context and tool description. It uses the weather tool. 6) This call is forwarded from the MCP Host (LLM) -...

MCP Learning Series - Part 3

Image
  In this blog, lets see how to add news MCP server and add it to the AI Client like Claude Desktop. Refer to the code base for the new MCP server using Google News. Start the MCP server is debug mode as $ mcp dev <news_server.py> Click on the URL to open the MCP Inspector and look at the "Tools" section. We added 2 tools: 1) Search News 2) Get Top Headlines Now that the news MCP Server tool is working as expected. Lets add to Claude Desktop. Open Claude Desktop and Settings Click on " Developer " Click on "Edit Config" This open the "claude_desktop_config.json" file claude_desktop_config is a configuration file used by Claude Desktop (the local desktop app from Anthropic). It controls how the desktop client behaves, including: which model it uses how it connects to the Claude API what tools or plugins are enabled local preferences for the desktop environment developer‑specific overrides (for Claude Code, tool access, etc.) It is a JSON...

MCP Learning Series - Part 2

Image
  In the previous post we say what is MCP? In this post, we will create an MCP server and add it to Claude Desktop. Claude Desktop is our AI application (MCP Host) which has inbuild MCP Client to connect to our MCP Server. The MCP server which I am going to create is a simple math tool which can perform basic mathematical operations. Simple Code for creating Mathematics Operations: We use the decorator @mcp.tool to create a MCP tool. MCP allows to create Tools, Resources and Prompts. # server.py from mcp.server.mcpserver import MCPServer mcp = MCPServer( "Math Server" ) @mcp.tool () def add (a: int , b: int ) -> int : """Add two numbers together.""" return a + b def sub (a: int , b: int ) -> int : """Sub two numbers""" return a - b def multiply (a: int , b: int ) -> int : """Multiple two numbers""" return a * b def divide (a: int , b: int ) -> int :...

MCP Learning Series - Part 1

Image
  In this series, we’ll explore what MCP is and dive into the core concepts behind it. MCP, or Model Context Protocol, provides a unified interface that allows agentic systems to access tools and data sources in order to perform tasks. Without MCP, applications connect to external tools or data sources using traditional APIs. For example, if a data source exposes a REST endpoint such as https://datasource.com/v1/get_employee_data , the application simply makes a GET request to that URL to retrieve the data. Whenever an endpoint changes, the application must be updated to call the new endpoint. If an application depends on multiple APIs — for example, ten different endpoints to complete a single task — the codebase becomes tightly coupled to those endpoints, increasing complexity and maintenance overhead. This is exactly the kind of integration problem MCP is designed to solve. What MCP solves? MCP works by exposing the tools and capabilities it provides. Client applications can si...