MCP 101 Example
A foundational implementation of a Model Context Protocol (MCP) server designed for educational purposes. It demonstrates the complete interaction between an LLM, an inference engine, and a client during an agentic call.
README
MCP 101
Calling a tool
- Make sure that nothing is listening on ports
8000and8080. Open 3 generously sized terminals on your screen. - Download a sensible model. Qwen 3.5 4B is sensible.
- Compile fresh
llama.cpp:git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp cmake -B build && cmake --build build --config Release -j 6 - Launch the llama in terminal #1:
./llama-server -m ~/Downloads/Qwen3.5-4B-Q8_0.gguf --ctx-size 4096 --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.00 --verbose --webui-mcp-proxy - Clone this repository:
https://github.com/behavioral-ds/mcp-example && cd mcp-example - Install deps:
poetry install && poetry shell - Launch MCP in terminal #2:
python mcp_serve.py - Execute the Agentic Call™ in terminal #3:
python call.py - Observe the dance between
LLM <-> Inference engine <-> MCP <-> Client.
Using MCP prompts
-
Open llama web UI at http://localhost:8080/, go to settings and add a new MCP server: <img width="585" src="https://github.com/user-attachments/assets/b4fedffa-550f-4f1c-af80-79e2c5876826" /> <img width="585" src="https://github.com/user-attachments/assets/9fc83783-9725-4e68-9396-a158d6bf9335" />
-
Select "MCP prompt" when drafting a new message:<br /> <img width="241" src="https://github.com/user-attachments/assets/12495540-ffcc-4710-a345-c941fd05bafd" />
-
That's your
@mcp.prompt()parsed into UI element, click it:<br /> <img width="257" src="https://github.com/user-attachments/assets/29d82c3d-d133-47b8-ad42-e0a2b00ae5af" /> -
...and supply some meaningful content:<br /> <img width="220" src="https://github.com/user-attachments/assets/e4a9b415-31ba-4386-a6cb-24c509229c29" />
-
Then click "Use prompt" and rejoice: <img width="803" alt="image" src="https://github.com/user-attachments/assets/7c7ccaf8-d62a-4b6f-93a0-fa62ae4a0a8a" />
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.