MCP

What does this stand for?

Master Control Program from TRON (1982)
[MCP Image]
mcp_obey.jpg

The iconic MCP from TRON (1982)

Master Control Program

Of course! 🎮

The malevolent AI from TRON (1982)

"I can run things 900 to 1200 times
better than any human"

💭 Personal note: At billiger.de, we also called our Shop-Management-Tool "MCP" - so I always get into a nostalgic mood when seeing those 3 letters! 😄

But today we're talking about the Model Context Protocol

The Developer's Dilemma

😫 Copy file contents → Paste into AI

📋 Copy AI response → Paste back to editor

🔄 Repeat 50 times per day

"Is this what I'm paid to do?"

Sound familiar?

Every developer working with AI has felt this pain...

Why Trust MCP Is Worth Our Time?

Reality: AI moves fast, life is finite, pick battles wisely

"I need to make sure something new isn't just a fad, but here to stay"

The Creators

🔨 David Soria Parra

  • PHP Release Manager
  • Mercurial core contributor
  • 10 years at Facebook
  • Python MCP SDK author

🍎 Justin Spahr-Summers

  • macOS/iOS expert
  • Claude Desktop integration
  • Developer tools veteran
  • Quality engineering focus

I don't understand everything yet, but trust me:
This is worth investigating.

The LSP Inspiration

BEFORE LSP

Editor A ←→ Language 1
Editor A ←→ Language 2
Editor B ←→ Language 1
Editor B ←→ Language 2
...n×m integrations

AFTER LSP

Editor A ←→ LSP ←→ Language 1
Editor B ←→ LSP ←→ Language 2
Editor C ←→ LSP ←→ Language 3
...n+m integrations

MCP does the same for AI context!

MCP Architecture

┌─────────────────────┐
│        HOST         │  ← AI Applications (not AI models!)
│  ┌─────────────┐    │    (Claude Desktop, VS Code)
│  │   CLIENT    │────┼──→ MCP SERVER ──→ (acts as client)
│  └─────────────┘    │    (Your Python Code!)    ↓
│  ┌─────────────┐    │                    Other MCP Server
│  │   CLIENT    │────┼──→ ┌─────────────┐        ↑
│  └─────────────┘    │    │ RESOURCES   │    Sampling
└─────────────────────┘    │ TOOLS       │   (ask LLM)
         ↑                 │ PROMPTS     │        │
         └─────────────────└─────────────┘────────┘
              Bidirectional connections
                    

Key insights:
• MCP extends AI applications, not AI models!
• Servers can also be clients to other servers
Chaining enables complex agent workflows! 🚀

What MCP Servers Provide

🗂️

RESOURCES

For applications to read

  • Lists of things with URIs
  • File contents, DB rows, API data
  • Application decides which to use
  • Can build RAG systems on top
🔧

TOOLS

For AI models to execute

  • Also called "function calling"
  • Database queries, API calls
  • Calculations, file operations
  • LLMs can invoke these directly
📝

PROMPTS

For human consumption

  • Slash commands in editors
  • Claude Code prompts (/search)
  • Templated workflows
  • Humans trigger these manually

🎯 Key Distinction

Resources: Application chooses what to read | Tools: AI model chooses what to call | Prompts: Human chooses what to use

Simple, Powerful Protocol

Transport Options:

  • 📱 stdio ← Most common (local servers)
  • 🌐 HTTP ← Remote servers + streaming
  • 🔮 Future ← Thrift, Protocol Buffers, etc.

Protocol Details:

  • JSON-RPC 2.0 ← "Boring choice" (proven!)
  • Bidirectional ← Client ↔ Server
  • Stateful sessions
  • Auth: OAuth 2.0 (evolving)

🔄 Design Philosophy

JSON-RPC was chosen because it's boring! Transfer mechanism doesn't matter - reused proven solution from LSP. Bidirectional connections enable servers to call back to clients.

🔗 Cool Feature: "Sampling"

Server can ask client's LLM for help without sharing API keys!
Enables chaining: Server A → Server B → Client's LLM

Python Implementation

# pip install mcp

from mcp import serve
from mcp.server.stdio import stdio_server

app = serve()

@app.list_resources()
async def list_resources():
    return [Resource(uri="file://README.md", name="Project README")]

@app.read_resource()  
async def read_resource(uri: str):
    with open(uri.replace("file://", "")) as f:
        return f.read()

@app.list_tools()
async def list_tools():
    return [Tool(name="word_count", description="Count words in text")]

@app.call_tool()
async def call_tool(name: str, arguments: dict):
    if name == "word_count":
        return {"count": len(arguments["text"].split())}

if __name__ == "__main__":
    stdio_server(app)

This is a complete, working MCP server!

Integration with Claude Desktop

1. Add to config:

{
  "mcpServers": {
    "my-server": {
      "command": "python",
      "args": ["my_mcp_server.py"]
    }
  }
}

2. Simple steps:

  • ✅ Restart Claude Desktop
  • ✅ See your resources/tools appear
  • ✅ AI can now access your local context!

🎉 No more copy-paste hell! 🎉

Growing MCP Ecosystem

🗃️ File Systems

Local file access

📊 Databases

SQLite explorer

🐙 Git Integration

Repository history

💬 Chat Platforms

Slack, Discord

🌐 APIs

Weather, News

🔧 Dev Tools

Linting, Testing

📋 Task Management

GitHub Issues

📈 Analytics

Custom dashboards

🚀 Your Idea Here?

What will you build?

Finding MCP Servers

📚 Official Registry

Maintained by Anthropic
• Curated list of servers
• Basic quality checks
• Regular updates
modelcontextprotocol.io/servers

🌟 Awesome MCP Servers

Community-driven list
• More comprehensive
• Faster additions
• Less vetting
GitHub: awesome-mcp-servers

⚠️ Security Warning: Supply Chain Risks

MCP servers run with YOUR permissions!
• They can access files, run commands, make network requests
• No sandboxing by default - full system access
Always review code before running unknown servers
• Consider running in containers or VMs for isolation

🔍 Trust but verify - inspect server code before installation!

Your MCP Journey Starts Now

✅ Step-by-Step Guide:

  • Visit modelcontextprotocol.io
  • Read the Python SDK docs
  • Clone example servers from GitHub
  • Build your first server (start simple!)
  • Share with the community

💡 Ideas to Try:

  • File system browser
  • Database query tool
  • API wrapper for your favorite service
  • Custom workflow automation

🤝 Join the Community

Plenty of room for innovation!

Active Discord & GitHub discussions

Questions & Discussion

🔗 Key Resources:

  • modelcontextprotocol.io
  • github.com/modelcontextprotocol
  • Python SDK documentation
  • Community Discord

🤔 Common Questions:

  • Security considerations?
  • Performance at scale?
  • Integration with other AI tools?
  • Deployment best practices?

Let's discuss! 🗣️

Thank you for your attention!
Time to build some amazing MCP servers! 🚀

Connect with me:

GitHub: github.com/ephes
Mastodon: @jochen@fedi.wersdoerfer.de
Email: jochen-mcp@wersdoerfer.de