Model Context Protocol Education
STDIOImplementation of Model Context Protocol server for educational purposes and LLM client integration.
Implementation of Model Context Protocol server for educational purposes and LLM client integration.
This repository contains an implementation of a Model Context Protocol (MCP) server for educational purposes. This code demonstrates how to build a functional MCP server that can integrate with various LLM clients.
To follow the complete tutorial, please refer to the YouTube video tutorial.
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications - it provides a standardized way to connect AI models to different data sources and tools.
MCP follows a client-server architecture where a host application can connect to multiple servers:
MCP servers can provide three main types of capabilities:
uv
package managerOn MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Make sure to restart your terminal afterwards to ensure that the uv
command gets picked up.
# Create a new directory for our project uv init mcp-server cd mcp-server # Create virtual environment and activate it uv venv source .venv/bin/activate # On Windows use: .venv\Scripts\activate # Install dependencies uv add "mcp[cli]" httpx
touch main.py
uv run main.py
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
{ "mcpServers": { "mcp-server": { "command": "uv", # It's better to use the absolute path to the uv command "args": [ "--directory", "/ABSOLUTE/PATH/TO/YOUR/mcp-server", "run", "main.py" ] } } }
If your server isn't being picked up by Claude Desktop:
This project is licensed under the MIT License. See the LICENSE file for details.