โ† Back|AI-AGENTSโ€บSection 1/17
0 of 17 completed

MCP (Model Context Protocol)

Advancedโฑ 12 min read๐Ÿ“… Updated: 2026-02-17

๐Ÿ”Œ Introduction โ€“ The Tool Integration Problem

AI Agents tools use pannanum. But every AI model has its own way of connecting tools! ๐Ÿ˜ซ


The Problem:

  • OpenAI: Function calling format A
  • Anthropic: Tool use format B
  • Google: Function declarations format C
  • Open source: Various formats D, E, F...

Oru tool build pannaa, every model ku separately integrate pannanum. Nightmare! ๐Ÿคฏ


The Solution: MCP (Model Context Protocol) ๐ŸŽ‰


MCP = Universal standard for connecting AI models to tools and data.


Analogy:

  • Before USB: Every device had different cable ๐Ÿ˜ค
  • After USB: One cable for everything! ๐Ÿ˜Š

Before MCP: Every model different tool format

After MCP: One protocol for all models! ๐Ÿ”Œ

๐Ÿง  What MCP Actually Does

MCP three main things provide pannum:


1. Tools ๐Ÿ”ง

  • External functions agents call pannalaam
  • Search, calculate, send email, query DB
  • Standardized input/output format

2. Resources ๐Ÿ“š

  • Data sources agents read pannalaam
  • Files, databases, API endpoints
  • Like giving agent a library card

3. Prompts ๐Ÿ“

  • Reusable prompt templates
  • Pre-built instructions for specific tasks
  • Shareable across applications

ComponentWhatExample
**Tools**Actions to executesend_email(), search_web()
**Resources**Data to readuser_profile, company_docs
**Prompts**Templates to use"Summarize this document"

MCP combines all three into one clean protocol! โœจ

๐Ÿ—๏ธ MCP Architecture

๐Ÿ—๏ธ Architecture Diagram
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              MCP ARCHITECTURE                โ”‚
โ”‚                                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚         MCP CLIENT (Host)            โ”‚   โ”‚
โ”‚  โ”‚  Claude Desktop / Cursor / Your App  โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ AI Model โ”‚  โ”‚ MCP Client SDK   โ”‚ โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ (LLM)   โ”‚  โ”‚ (connects to     โ”‚ โ”‚   โ”‚
โ”‚  โ”‚  โ”‚         โ”‚  โ”‚  MCP servers)     โ”‚ โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                            โ”‚                โ”‚
โ”‚              MCP Protocol (JSON-RPC)        โ”‚
โ”‚              stdio / HTTP+SSE               โ”‚
โ”‚                            โ”‚                โ”‚
โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚         โ”‚                  โ”‚            โ”‚   โ”‚
โ”‚         โ–ผ                  โ–ผ            โ–ผ   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚ MCP Server โ”‚   โ”‚ MCP Server โ”‚ โ”‚  MCP   โ”‚โ”‚
โ”‚  โ”‚ (Weather)  โ”‚   โ”‚ (Database) โ”‚ โ”‚ Server โ”‚โ”‚
โ”‚  โ”‚            โ”‚   โ”‚            โ”‚ โ”‚(GitHub)โ”‚โ”‚
โ”‚  โ”‚ ๐ŸŒค๏ธ Tools:  โ”‚   โ”‚ ๐Ÿ’พ Tools:  โ”‚ โ”‚๐Ÿ™Tools:โ”‚โ”‚
โ”‚  โ”‚ get_weatherโ”‚   โ”‚ query_db   โ”‚ โ”‚list_PRsโ”‚โ”‚
โ”‚  โ”‚ forecast   โ”‚   โ”‚ insert_row โ”‚ โ”‚review  โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key: Client โ†โ†’ Server communication via MCP Protocol
     One client can connect to MULTIPLE servers!
```

๐Ÿ”„ How MCP Works โ€“ Step by Step

MCP Communication Flow:


Step 1: Discovery ๐Ÿ”

Client asks server: "What tools do you have?"

json
// Server responds:
{
  "tools": [
    {
      "name": "get_weather",
      "description": "Get weather for a city",
      "inputSchema": {
        "type": "object",
        "properties": {
          "city": {"type": "string"},
          "date": {"type": "string"}
        }
      }
    }
  ]
}

Step 2: Tool Call ๐Ÿ”ง

Client requests tool execution:

json
{
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": {"city": "Chennai", "date": "2026-02-17"}
  }
}

Step 3: Response โœ…

Server executes and returns:

json
{
  "content": [{
    "type": "text",
    "text": "Chennai: 32ยฐC, Sunny, Humidity 65%"
  }]
}

Step 4: LLM Interpretation ๐Ÿง 

AI model takes the result and crafts response for user.


Clean, simple, standard! ๐ŸŽฏ

๐Ÿ†š MCP vs Other Approaches

FeatureFunction CallingLangChain ToolsMCP
**Standard**Model-specificFramework-specificUniversal
**Portability**โŒ Locked to providerโŒ Locked to LangChainโœ… Any client
**Discovery**Manual definitionManual importAuto-discovery
**Transport**HTTP onlyIn-processstdio / HTTP+SSE
**Resources**โŒ NoโŒ Noโœ… Built-in
**Prompts**โŒ NoโŒ Noโœ… Built-in
**Security**BasicBasicBuilt-in sandboxing
**Community**Platform-specificLarge but fragmentedGrowing fast

MCP Advantages:

  • โœ… Write tool once, use with any AI model
  • โœ… Auto-discovery โ€“ no manual tool registration
  • โœ… Resources + Prompts + Tools in one protocol
  • โœ… Open standard โ€“ no vendor lock-in
  • โœ… Growing ecosystem of pre-built servers

MCP = The future of AI tool integration! ๐Ÿ”ฎ

๐Ÿ› ๏ธ Building an MCP Server

Creating your own MCP server is surprisingly simple!


Basic MCP Server Structure:

code
my-mcp-server/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ index.ts          # Server implementation
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ tsconfig.json

Key Components:


  1. Server Setup
code
const server = new McpServer({
  name: "my-tools",
  version: "1.0.0"
});

  1. Define Tools
code
server.tool("get_stock_price", 
  { symbol: z.string() },
  async ({ symbol }) => {
    const price = await fetchStockPrice(symbol);
    return { content: [{ type: "text", text: price }] };
  }
);

  1. Define Resources
code
server.resource("company-docs",
  "docs://company/handbook",
  async () => ({
    contents: [{ text: handbookContent }]
  })
);

  1. Start Server
code
server.connect(new StdioTransport());

That's it! Your MCP server is ready! ๐Ÿš€

๐ŸŽฌ Real MCP Use Case โ€“ Personal Productivity

โœ… Example

Building a Productivity MCP Server:

code
MCP Server: "productivity-tools"

Tools:
โ”œโ”€โ”€ ๐Ÿ“ง send_email(to, subject, body)
โ”œโ”€โ”€ ๐Ÿ“… create_event(title, date, time, duration)
โ”œโ”€โ”€ โœ… add_todo(title, priority, due_date)
โ”œโ”€โ”€ ๐Ÿ“ create_note(title, content, folder)
โ”œโ”€โ”€ ๐Ÿ” search_notes(query)
โ””โ”€โ”€ ๐Ÿ“Š get_daily_summary()

Resources:
โ”œโ”€โ”€ ๐Ÿ“‹ todos://today โ†’ Today's task list
โ”œโ”€โ”€ ๐Ÿ“… calendar://week โ†’ This week's events
โ””โ”€โ”€ ๐Ÿ“ง emails://unread โ†’ Unread emails summary

User to Claude Desktop:

"Check my unread emails, add important ones as todos,

and block time on my calendar for follow-ups"

Claude (via MCP):

1. Reads emails://unread resource

2. Calls add_todo() for 3 important emails

3. Calls create_event() to block follow-up time

4. Responds with summary

All through standard MCP protocol! โœจ

๐ŸŒ MCP Ecosystem

Growing ecosystem of MCP servers:


CategoryMCP ServersWhat They Do
**Dev Tools**GitHub, GitLab, LinearCode management
**Database**PostgreSQL, SQLite, SupabaseData access
**Communication**Slack, Gmail, DiscordMessaging
**Productivity**Notion, Google Drive, ObsidianKnowledge mgmt
**Cloud**AWS, GCP, CloudflareInfrastructure
**Search**Brave Search, ExaWeb search
**Finance**Stripe, QuickBooksPayments
**AI**Hugging Face, ReplicateModel access

MCP Clients (Hosts):

  • ๐Ÿค– Claude Desktop
  • ๐Ÿ’ป Cursor IDE
  • ๐Ÿ“ Zed Editor
  • ๐Ÿ”ง Continue.dev
  • ๐Ÿ› ๏ธ Custom applications

Ecosystem rapidly growing โ€“ 1000+ community servers available! ๐Ÿ“ˆ

๐Ÿ”’ MCP Security Model

MCP security important โ€“ agents with tool access = power + risk!


Security Layers:


1. Transport Security ๐Ÿ”

  • stdio: Process-level isolation
  • HTTP+SSE: TLS encryption
  • No unauthorized access

2. Permission Model ๐Ÿ›ก๏ธ

code
Permissions:
โ”œโ”€โ”€ Tools: Which tools can client call?
โ”œโ”€โ”€ Resources: Which resources can client read?
โ”œโ”€โ”€ Rate Limits: How many calls per minute?
โ””โ”€โ”€ Scope: What data can tools access?

3. Human-in-the-Loop ๐Ÿ‘ค

  • Sensitive tool calls require user approval
  • "Agent wants to send email. Allow?" โ†’ User confirms

4. Sandboxing ๐Ÿ“ฆ

  • MCP servers run in isolated environments
  • Can't access host system directly
  • Limited file system access

Security Best Practices:

PracticeWhy
Minimal permissionsReduce attack surface
User approval for sensitive opsHuman oversight
Audit loggingTrack all tool calls
Input validationPrevent injection
Rate limitingPrevent abuse
Regular updatesSecurity patches

๐Ÿ”„ MCP Transport Protocols

MCP two transport methods support pannum:


1. stdio (Standard I/O) ๐Ÿ“Ÿ

code
Client โ†stdin/stdoutโ†’ MCP Server Process
  • Server as child process run aagum
  • Fast, secure, local only
  • Best for: Desktop apps, CLI tools

2. HTTP + SSE (Server-Sent Events) ๐ŸŒ

code
Client โ†HTTP POSTโ†’ MCP Server (remote)
Client โ†SSE streamโ† MCP Server (events)
  • Server remotely run aagum
  • Network-accessible
  • Best for: Cloud deployments, shared servers

TransportSpeedSecurityDeploymentBest For
stdioVery fastHigh (local)Local onlyDesktop apps
HTTP+SSEFastMedium (needs TLS)AnywhereCloud, shared

Recommendation:

  • Development: stdio (easy setup)
  • Production: HTTP+SSE (scalable)
  • Both: Use HTTP+SSE with proper TLS ๐Ÿ”’

๐Ÿงช Try It โ€“ Design an MCP Server

๐Ÿ“‹ Copy-Paste Prompt
```
Design an MCP server for a "Smart Home" system:

1. List all TOOLS the server should expose:
   - What actions can the AI take?
   - What parameters does each tool need?
   - What does each tool return?

2. List all RESOURCES:
   - What data should be readable?
   - What's the URI format?

3. List PROMPT templates:
   - What pre-built prompts would be useful?

4. Security considerations:
   - Which tools need user approval?
   - What rate limits?

Example format:
Tool: set_light(room: string, brightness: number, color: string)
  โ†’ {status: "success", new_state: {...}}

Resource: devices://living-room
  โ†’ List of all devices in living room with status

Be creative and thorough!
```

Designing MCP servers = designing agent capabilities! ๐Ÿ 

๐Ÿ’ก MCP Best Practices

๐Ÿ’ก Tip

Building great MCP servers:

1. Clear tool descriptions โ€“ LLM reads these to decide when to use

2. Typed parameters โ€“ Use JSON Schema for validation

3. Meaningful errors โ€“ Return helpful error messages, not just "error"

4. Idempotent operations โ€“ Same call twice = same result (when possible)

5. Batch support โ€“ Allow processing multiple items at once

6. Versioning โ€“ Version your server for backward compatibility

7. Documentation โ€“ README with examples for each tool

8. Testing โ€“ Test with multiple MCP clients

Tool description quality directly impacts agent accuracy! ๐Ÿ“

โš ๏ธ MCP Limitations and Challenges

โš ๏ธ Warning

Current limitations to be aware of:

- ๐Ÿ“ˆ Ecosystem still growing โ€“ Not all integrations available yet

- ๐Ÿ”ง Client support varies โ€“ Not all AI apps support MCP yet

- ๐Ÿ“‹ Spec evolving โ€“ Breaking changes possible

- ๐Ÿ› Debugging tools โ€“ Still maturing

- ๐Ÿ’ป Local-first bias โ€“ stdio transport is local-only

- ๐Ÿ“Š No built-in analytics โ€“ Need external monitoring

But these are rapidly improving! Anthropic and community actively developing. By mid-2026, most limitations will be addressed! ๐Ÿš€

๐Ÿ“ Summary

Key Takeaways:


โœ… MCP = Universal protocol for AI-tool integration (like USB for AI)

โœ… Three components: Tools (actions), Resources (data), Prompts (templates)

โœ… Architecture: Client (host app) โ†MCP Protocolโ†’ Servers (tools)

โœ… Transports: stdio (local, fast) and HTTP+SSE (remote, scalable)

โœ… Security: Permissions, human-in-the-loop, sandboxing, audit logging

โœ… Ecosystem: 1000+ community servers, growing rapidly

โœ… Created by Anthropic, open standard for everyone


Next article la Autonomous Agents paapom โ€“ fully self-directed AI systems! ๐Ÿค–๐Ÿง 

๐Ÿ ๐ŸŽฎ Mini Challenge

Challenge: Design Oru MCP Server


MCP protocol understand panna MCP server design:


Scenario: Weather tool share panna MCP server create


Step 1: Define Resources (3 mins)

Weather data expose panna resources:

code
weather://cities/{city}/current
weather://cities/{city}/forecast
weather://alerts/{region}

Step 2: Define Tools (4 mins)

Actions expose:

json
{
  "name": "get_weather",
  "description": "Get current weather for a city",
  "inputSchema": {
    "type": "object",
    "properties": {
      "city": {"type": "string"},
      "units": {"type": "string", "enum": ["celsius", "fahrenheit"]}
    },
    "required": ["city"]
  }
}

Step 3: Define Prompts (3 mins)

Reusable instructions:

code
"weather_summary": "Provide a brief weather summary for the given city in Tanglish"
"travel_advisory": "Give travel safety advice based on weather conditions"

Step 4: Implement Server (3 mins)

Pseudo-code:

code
MCP Server:
  - Listen on stdio/HTTP
  - Handle resource requests
  - Execute tools
  - Return structured responses

Step 5: Register & Connect (2 mins)

  • Register server in MCP client config
  • Test tool calls
  • Verify responses

MCP server complete! Now any MCP client (Claude, Cursor, etc.) use pannalaam! ๐Ÿ”Œ

๐Ÿ’ผ Interview Questions

Q1: MCP yaaru create pannanga, why?

A: Anthropic (Claude creators) create pannanga. Problem: Every AI model different tool formats (OpenAI function calling, Claude tools, Google, etc.). Fragmented ecosystem! Solution: One universal standard = MCP. USB analogy perfect!


Q2: MCP advantage vs function calling?

A: Function calling model-specific. OpenAI style, Anthropic style, Google style โ€“ different! MCP: One protocol, all models, all tools. Write once, use everywhere! Massive advantage for tools teams!


Q3: MCP server implement panna difficulty level?

A: Easy! Anthropic SDK simple. Python/Node.js examples available. 1 day implement panna mudiyum basic server. Community servers explore panna, fork customize panna easy!


Q4: MCP security concerns?

A:

  • Tool sandboxing: Limit dangerous operations
  • Permissions: Users approve before execution
  • Human-in-the-loop: Critical actions human confirm
  • Audit logs: Track all tool calls
  • Rate limiting: Prevent abuse

Proper MCP server: All security measures built-in!


Q5: MCP future โ€“ 2027 la mainstream aaguma?

A: Yes! Already adopted: Claude, Cursor, Zed. More tools integrating daily. Community explosion ongoing. By 2027, MCP standard = industry norm. New tools MCP support pannanum illa, behind time! ๐Ÿš€

โ“ Frequently Asked Questions

โ“ MCP na enna simple la?
Model Context Protocol โ€“ AI models ku external tools and data connect panna oru universal standard. USB port maari โ€“ any device (tool) connect pannalaam oru standard interface la.
โ“ MCP yaaru create pannanga?
Anthropic (Claude creators) create pannanga. Open standard aa release pannanga so anyone can implement it. Now many companies adopting.
โ“ MCP vs Function Calling โ€“ enna difference?
Function calling is model-specific (OpenAI style, Anthropic style). MCP is universal โ€“ one protocol, any model, any tool. Write once, use everywhere.
โ“ MCP production-ready aa?
Rapidly maturing. Claude, Cursor, Zed already support. Community growing fast. For new projects, definitely consider MCP.
โ“ MCP free aa?
Yes! Open standard, open source implementations. Anyone can build MCP servers and clients. No licensing fees.
๐Ÿง Knowledge Check
Quiz 1 of 1

Test your MCP knowledge:

0 of 1 answered