- Explore MCP Servers
- Mini-MCP
Mini Mcp
What is Mini Mcp
Mini-MCP is a project that demonstrates how to create an MCP server using the MCP Python SDK, providing various functionalities such as tools, resources, and prompt templates.
Use cases
Use cases for Mini-MCP include building a simple calculator application, serving documentation files, and generating structured meeting summaries for teams.
How to use
To use Mini-MCP, set up your project environment with Python 3.9+, install the required dependencies using the uv package manager, and initialize your project. Then, implement your server logic in a Python script.
Key features
Key features of Mini-MCP include a calculator tool for adding two numbers, a resource for serving file contents, and a prompt template for generating meeting summaries.
Where to use
Mini-MCP can be used in various fields such as software development, educational tools, and any application requiring structured output and file management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mini Mcp
Mini-MCP is a project that demonstrates how to create an MCP server using the MCP Python SDK, providing various functionalities such as tools, resources, and prompt templates.
Use cases
Use cases for Mini-MCP include building a simple calculator application, serving documentation files, and generating structured meeting summaries for teams.
How to use
To use Mini-MCP, set up your project environment with Python 3.9+, install the required dependencies using the uv package manager, and initialize your project. Then, implement your server logic in a Python script.
Key features
Key features of Mini-MCP include a calculator tool for adding two numbers, a resource for serving file contents, and a prompt template for generating meeting summaries.
Where to use
Mini-MCP can be used in various fields such as software development, educational tools, and any application requiring structured output and file management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Mini-MCP
Dieses Projekt zeigt, wie du mit dem MCP Python SDK einen MCP-Server erstellst, der verschiedene Funktionen bereitstellt: Tools (wie eine Taschenrechner-Funktion), Resources (zum Bereitstellen von Dateiinhalten) und Prompt Templates (für strukturierte Ausgaben). Der Server kann mit jedem MCP-kompatiblen Client (z.B. Claude Desktop) verwendet werden.
Features
- add: Addiert zwei Zahlen und gibt das Ergebnis zurück.
- file://pysdk.md: Resource zum Bereitstellen von Dateiinhalten (pysdk.md vom Desktop)
- meeting_prompt: Prompt Template für Besprechungszusammenfassungen basierend auf meeting_prompt.md
Voraussetzungen
-
Python 3.9+
Prüfe deine Python-Version mit:python --versionoder
python3 --version -
uv (moderner Python-Paketmanager)
Prüfe, obuvinstalliert ist:uv --versionFalls nicht vorhanden, installiere es:
pip install uv
Installation
-
Wechsle in deinen Projektordner
(Du hast den Ordner bereits angelegt und geöffnet.) -
Initialisiere das Projekt mit uv
uv init . -
Installiere MCP (inkl. CLI) als Abhängigkeit
uv add "mcp[cli]" -
Projektstruktur anlegen
Erstelle die Datei für den Server:new-item server.py(oder per Editor anlegen)
Beispielcode: server.py
from mcp.server.fastmcp import FastMCP, Context
import os
import asyncio
from pathlib import Path
# MCP-Server initialisieren
mcp = FastMCP(
"Taschenrechner",
host=os.getenv("HOST", "localhost"),
port=int(os.getenv("PORT", "3000"))
)
# Tool: Addition
@mcp.tool()
def add(a: int, b: int) -> int:
"""Addiert zwei Zahlen"""
return a + b
# Resource: Inhalt von pysdk.md bereitstellen
@mcp.resource("file://pysdk.md")
async def pysdkfile() -> str:
desktop_path = Path.home() / "Desktop"
file_path = desktop_path / "pysdk.md"
try:
with open(file_path, "r", encoding="utf-8") as file:
return file.read()
except Exception as e:
return f"Error reading pysdk.md: {str(e)}"
# MCP Prompt: meeting_prompt
@mcp.prompt()
def meeting_prompt(meeting_date: str, meeting_title: str, transcript: str) -> str:
"""Erstellt eine Besprechungszusammenfassung basierend auf dem Template aus meeting_prompt.md."""
template_path = Path(__file__).parent / "meeting_prompt.md"
try:
with open(template_path, "r", encoding="utf-8") as f:
template = f.read()
except Exception as e:
return f"Fehler beim Laden des Templates: {str(e)}"
# Template-Variablen ersetzen
result = template.replace("{{ meeting_date }}", meeting_date)
result = result.replace("{{ meeting_title }}", meeting_title)
result = result.replace("{{ transcript }}", transcript)
return result
async def main():
transport = os.getenv("TRANSPORT", "stdio")
if transport == 'sse':
await mcp.run_sse_async()
else:
await mcp.run_stdio_async()
if __name__ == "__main__":
asyncio.run(main())
Server starten & testen
1. Starte den Server im Entwicklungsmodus
uv run mcp dev server.py
- Der Server läuft jetzt und kann von einem MCP-Client (z.B. Claude Desktop) erkannt werden.
2. Funktion prüfen
- Öffne Claude Desktop oder einen anderen MCP-Client.
- Füge den Server hinzu (z.B. über die Datei
server.py). - Teste das Tool
addmit zwei Zahlen.
Fehlerbehebung
- Python nicht gefunden:
Prüfe, ob Python korrekt installiert und im PATH ist. - uv nicht gefunden:
Installiere uv mitpip install uv. - MCP-Server wird nicht erkannt:
Stelle sicher, dass der Server läuft und die Datei korrekt angegeben ist.
Weiterführende Links
Hinweis:
Dieses Beispiel ist minimal gehalten. Du kannst weitere Tools oder Ressourcen nach Bedarf ergänzen.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










