Posts

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...

Session ID vs Session Token

Image
  In this post  we will see what is a session token and session ID. Imagine, you are want to travel is a train and you buy a ticket. The ticket is valid for a certain amount of time. You can travel any number of times as long as the ticket is valid.  Ticket is the "Session Token". Let's compare with distribute systems. When you login to the banking website, it prompts the user to enter with "Username: and "Password". Upon successful authentication, the authentication server generates a session token. This session token is valid for a certain amount of time. With this token, the user can make future requests in the banking site like checking balance, fund transfer. Once the token is expired, the user must "Re-Authenticate". Then, What is Session ID? When a user log to the banking website, server create a session token post verifying credentials. Then, the server creates a session ID. Server stores the token inside the session data. Server gives the...

AWS CloudWatch Synthetics Canary

Image
  Synthetic monitoring — often called synthetic canaries — is your system’s way of sending fake users through your application to make sure everything is working, even when no real users are around. It’s proactive, predictable, and designed to catch issues before customers feel the pain. Synthetic monitoring is automated, scripted traffic that runs on a schedule to test your application’s key flows. A “synthetic canary” is simply: A small, automated script that runs repeatedly to detect problems early — like a canary in a coal mine. It’s not tied to deployments. It’s not real user traffic. It’s not a canary release. It’s a monitoring probe . Creating Canary in AWS: I am going to configure canary for this demo endpoint  https://dummy.restapiexample.com/api/v1/employees Click on “Create Canary”. Select “Heartbeat monitoring”. If you would like to save the screenshot of the output to a S3 bucket, enable the checkbox. Select the regions from where API must be tested. ...

Principal SRE - Interview Question

Image
  Sharing some of the interview questions for the role of Principal SRE from Apple: 1) Tell me about a production outage you’ve handled that had ambiguous symptoms. How did you narrow it down? 2) How do you decide what belongs in an SLO, and how do you avoid overengineering it? 3) You inherit a platform with strong uptime but high operational toil. What do you change first? 4) How do you handle a disagreement with product leadership when reliability work competes with feature delivery? 5) A service is scaling rapidly and latency is degrading under load. Walk me through your approach. 6) What does “good observability” mean to you in practice? 7) Describe how you would lead a major incident. 8) What’s your philosophy on automation in production operations? 9) How do you evaluate whether an architecture is resilient enough? 10) You’re the on-call SRE for a globally used service. At 2:00 AM, error rates jump from 0.2% to 8%, latency doubles, and one region is still healthy wh...