Skip to content

ianupk/learning-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Playground 🧪

My notes and code for Model Context Protocol (MCP).


What is MCP?

Model Context Protocol — open standard by Anthropic for connecting AI apps to external tools & data.

USB-C for AI — one protocol, many integrations.

Problem it solves

Without MCP → every AI app needs custom integration for each tool → M×N problem. With MCP → standard interface → M+N solution.

WITHOUT MCP:                    WITH MCP:
┌─────────┐                     ┌─────────┐
│ Claude  │──┐                  │ Claude  │──┐
│ ChatGPT │──┼── custom ──┐     │ ChatGPT │  ├── MCP ──┐
│ Cursor  │──┘    APIs    │     │ Cursor  │──┘         │
└─────────┘               │     └─────────┘            │
      ↕ M×N connections   │           ↕ M+N            │
┌──────────┐              │     ┌──────────────┐       │
│ Slack    │──────────────┘     │  MCP Server  │───────┘
│ GitHub   │                    │  (Slack,     │
│ Database │                    │   GitHub,    │
└──────────┘                    │   DB, etc.)  │
                                └──────────────┘

Architecture

┌─────────────────────────────────────────────────┐
│              HOST (e.g. Claude Desktop)         │
│                                                 │
│  ┌──────────────┐    ┌──────────────┐           │
│  │  MCP Client  │    │  MCP Client  │    ...    │
│  └──────┬───────┘    └──────┬───────┘           │
└─────────┼───────────────────┼───────────────────┘
          │ (transport)       │ (transport)
    ┌─────▼──────┐      ┌────-▼──────┐
    │ MCP Server │      │ MCP Server │
    │  (local)   │      │  (remote)  │
    └────────────┘      └────────────┘
Component Role
Host AI app that wants to use external tools/data
Client Lives inside host, 1:1 connection to a server
Server Exposes tools, resources, prompts via MCP
Transport How client ↔ server talk (stdio, HTTP+SSE)

3 Core Primitives

Primitive What it does Think of it as
🔧 Tools Functions AI can call POST endpoints
📄 Resources Data AI can read GET endpoints
💬 Prompts Templates AI can use Reusable prompt snippets

Tools = actions, Resources = data, Prompts = templates


Index

Folder Concept
hello-mcp-server/ First MCP server + tool
tools/ Tools deep dive
resources/ Resources
prompts/ Prompt templates
transport/ stdio vs SSE vs Streamable HTTP
client/ MCP client
real-world-server/ Full-featured server

Quick Start

cd hello-mcp-server
uv run server.py

Stack

Python + mcp SDK + uv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages