MCP 101 Example

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.

Category
Visit Server

README

MCP 101

Calling a tool

  1. Make sure that nothing is listening on ports 8000 and 8080. Open 3 generously sized terminals on your screen.
  2. Download a sensible model. Qwen 3.5 4B is sensible.
  3. 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
    
  4. 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
    
  5. Clone this repository:
    https://github.com/behavioral-ds/mcp-example && cd mcp-example
    
  6. Install deps: poetry install && poetry shell
  7. Launch MCP in terminal #2: python mcp_serve.py
  8. Execute the Agentic Call™ in terminal #3: python call.py
  9. Observe the dance between LLM <-> Inference engine <-> MCP <-> Client.

Using MCP prompts

  1. 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" />

  2. Select "MCP prompt" when drafting a new message:<br /> <img width="241" src="https://github.com/user-attachments/assets/12495540-ffcc-4710-a345-c941fd05bafd" />

  3. 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" />

  4. ...and supply some meaningful content:<br /> <img width="220" src="https://github.com/user-attachments/assets/e4a9b415-31ba-4386-a6cb-24c509229c29" />

  5. 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured