mcp-server
Lokaler MCP-Server mit Ollama
Ein lokales Python-Projekt, das ein Ollama-Sprachmodell mit einem MCP-Server verbindet. Das Modell kann die Tools des Servers entdecken, entscheiden, wann es eines aufruft, das Ergebniss empfang en und eine prägnante abs chließende Antworte erzeugen.
flowchart TD
U["User question"] --> C["Python MCP client"]
C --> O["Ollama llama3.2:3b"]
O --> C
C --> S["Local MCP server"]
S --> D["Student JSON data"]Verfügbare Tools
Tool | Zweck |
| Addiert zwei explizit angegebene Zahlen |
| Gibt das integrierte Demo-Studentenprofil zurück |
| Durchsucht |
Related MCP server: py-mcp-students
Voraussetzungen
Pyton 3.11+
Ollama installiert und in Betrief
Ollama-Modell
llama3.2:3b
Windows-Einrichtung
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
ollama pull llama3.2:3b
python client.pyDer Client startet server.py automatisch über den aktiven Pyton-Interpreter. Sie müssen den Server nicht in einem separaten Terminal starten.
Beispielfragen
What is 10 + 20?Tell me about Pranay.Where is Ananya studying?What is Saranya studying?
Projektstruktur
mcp-server/
├── client.py
├── server.py
├── files/
│ └── students.json
├── tests/
│ └── test_server.py
└── requirements.txtTool-Ergebniss-Korrektur
Ollama erwartet, dass eine Tool-Ergebniss-Nachricht den ausgefüh rten tool_name enthält. Der Client fügt dieses Feld hinzu und übergibt die verfügbaren Tool-Definitionen an den Fol geaufruf, sodass das Modell die abs chließende Antworte erzeugen kann, nachdem ein MCP-Tool ausgefüh rt wurde.
Datenhinweis
files/students.json sind Demodaten. Ersetzen Sie sie durch fiktive Daten oder Daten, für die eine Einwilligung vorliegt, bevor Sie dieses Projekt öffentlich oder in der Produktion verwenden.
This server cannot be deployed
Maintenance
Related MCP Connectors
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
PDF, image, video, OCR, screenshot, SQL, QR and text tools for agents. No API key, no signup.
Search and run data, text, code, PDF and web APIs. Requests not stored. Network tools need a key.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes custom Python functions as tools and integrates with Ollama for tool calling.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to manage student records through natural language by wrapping a simple HTTP student server's endpoints as MCP tools.-
- FlicenseAqualityCmaintenanceEnables arithmetic calculation, current time lookup, and attendance retrieval through natural language tool calls.3-
- FlicenseAqualityCmaintenanceEnables an LLM client to perform basic arithmetic on two numbers — addition, subtraction, multiplication, and division — plus reverse a supplied text string, through five simple tools exposed over stdio. Inputs and structured text results follow JSON schemas, with invalid operations such as division by zero surfaced as tool errors.5-