LLM Tool-Calling Assistant
Este proyecto conecta un LLM local (p. ej., Qwen) con herramientas como una calculadora o una base de conocimientos mediante el protocolo MCP . El asistente detecta y llama automáticamente a estas herramientas para responder a las consultas de los usuarios.
📦 Características
🔧 Ejecución de herramientas a través del servidor MCP
🧠 Integración local de LLM a través de HTTP o OpenAI SDK
📚 Soporte de base de conocimientos (
data.json)⚡ Admite transportes
stdioysse
Related MCP server: MCP Server with Local LLM
🗂 Archivos del proyecto
Archivo | Descripción |
| Registra herramientas e inicia el servidor MCP |
| Utiliza |
| Utiliza SDK compatible con OpenAI para LLM + lógica de llamada de herramientas |
| Cliente MCP que utiliza stdio |
| Cliente MCP que utiliza SSE |
| Base de conocimientos de preguntas y respuestas |
📥 Instalación
Requisitos
Python 3.8+
Instalar dependencias:
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🚀 Primeros pasos
1. Ejecute el servidor MCP
python server.pyEsto inicia su servidor de herramientas con funciones como add , multiply y get_knowledge_base .
2. Iniciar un cliente
Opción A: Cliente HTTP (LLM local a través de API sin procesar)
python client-http.pyOpción B: Cliente SDK de OpenAI
python client-openai.pyOpción C: transporte stdio
python client-stdio.pyOpción D: Transporte SSE
Asegúrese de que server.py establezca:
transport = "sse"Luego ejecuta:
python client-sse.py💬 Ejemplos de indicaciones
Llamada a la herramienta matemática
What is 8 times 3?Respuesta:
Eight times three is 24.Pregunta de la base de conocimientos
What are the healthcare benefits available to employees in Singapore?La respuesta incluirá la respuesta relevante de data.json .
📁 Ejemplo: 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..."
}
]🔧 Configuración
Dentro de client-http.py o clientopenai.py , actualice lo siguiente:
LOCAL_LLM_URL = "..."
TOKEN = "your-api-token"
LOCAL_LLM_MODEL = "your-model"Asegúrese de que su LLM esté prestando servicio a puntos finales de API compatibles con OpenAI.
🧹 Limpieza
Los clientes gestionan las llamadas y respuestas de las herramientas automáticamente. Puede detener el servidor o el cliente con Ctrl+C .
🪪 Licencia
Licencia MIT. Véase el archivo LICENSE .
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseCqualityCmaintenanceA 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.221
- Flicense-qualityDmaintenanceIntegrates 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.
- Alicense-qualityDmaintenanceAutomatically converts CLI tools, APIs, and programs into MCP servers for LLM and agentic use, enabling rapid integration without manual server implementation.1MIT
- Flicense-qualityCmaintenanceExposes MCP tools that enable remote LLMs to query local Docker containers, OS processes, and system services in real time.
Related MCP Connectors
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/o6-webwork/mcp-template'
If you have feedback or need assistance with the MCP directory API, please join our Discord server