LLM Tool-Calling Assistant
Dieses Projekt verbindet ein lokales LLM (z. B. Qwen) über das MCP- Protokoll mit Tools wie einem Taschenrechner oder einer Wissensdatenbank. Der Assistent erkennt diese Tools automatisch und ruft sie auf, um Benutzeranfragen zu beantworten.
📦 Funktionen
🔧 Toolausführung über MCP-Server
🧠 Lokale LLM-Integration über HTTP oder OpenAI SDK
📚 Wissensdatenbank-Support (
data.json)⚡ Unterstützt
stdioundsse-Transporte
Related MCP server: MCP Server with Local LLM
🗂 Projektdateien
Datei | Beschreibung |
| Registriert Tools und startet den MCP-Server |
| Verwendet |
| Verwendet OpenAI-kompatibles SDK für LLM + Tool-Aufruflogik |
| MCP-Client mit stdio |
| MCP-Client mit SSE |
| Fragen und Antworten-Wissensdatenbank |
📥 Installation
Anforderungen
Python 3.8+
Installieren Sie Abhängigkeiten:
pip install -r requirements.txtrequirements.txt
aiohttp==3.11.18
nest_asyncio==1.6.0
python-dotenv==1.1.0
openai==1.77.0
mcp==1.6.0🚀 Erste Schritte
1. Führen Sie den MCP-Server aus
python server.pyDadurch wird Ihr Tool-Server mit Funktionen wie „ add , multiply und get_knowledge_base gestartet.
2. Starten Sie einen Client
Option A: HTTP-Client (lokales LLM über Raw-API)
python client-http.pyOption B: OpenAI SDK-Client
python client-openai.pyOption C: Standardtransport
python client-stdio.pyOption D: SSE-Transport
Stellen Sie sicher, dass server.py Folgendes festlegt:
transport = "sse"Führen Sie dann Folgendes aus:
python client-sse.py💬 Beispielaufforderungen
Aufruf des Mathe-Tools
What is 8 times 3?Antwort:
Eight times three is 24.Wissensdatenbankfrage
What are the healthcare benefits available to employees in Singapore?Die Antwort enthält die entsprechende Antwort aus data.json .
📁 Beispiel: data.json
[
{
"question": "What is Singapore's public holiday schedule?",
"answer": "Singapore observes several public holidays..."
},
{
"question": "How do I apply for permanent residency in Singapore?",
"answer": "Submit an online application via the ICA website..."
}
]🔧 Konfiguration
Aktualisieren Sie in client-http.py oder clientopenai.py Folgendes:
LOCAL_LLM_URL = "..."
TOKEN = "your-api-token"
LOCAL_LLM_MODEL = "your-model"Stellen Sie sicher, dass Ihr LLM OpenAI-kompatible API-Endpunkte bereitstellt.
🧹 Aufräumen
Clients verarbeiten Tool-Aufrufe und -Antworten automatisch. Sie können den Server oder Client mit Ctrl+C stoppen.
🪪 Lizenz
MIT-Lizenz. Siehe LICENSE- Datei.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- AlicenseCqualityCmaintenanceA multi-tool MCP server that enhances local LLMs with web search, document reading, scholarly research, Wikipedia access, and calculator functions. Provides comprehensive tools for information retrieval and computation without requiring API keys by default.221MIT
- FlicenseNot gradedqualityDmaintenanceIntegrates local language models (like Qwen3-8B) with MCP clients, providing tools for chat, code analysis, text generation, translation, and content summarization using your own hardware.-
- AlicenseNot gradedqualityDmaintenanceAutomatically converts CLI tools, APIs, and programs into MCP servers for LLM and agentic use, enabling rapid integration without manual server implementation.1MIT
- FlicenseNot gradedqualityDmaintenanceExposes MCP tools that enable remote LLMs to query local Docker containers, OS processes, and system services in real time.-