LLM Tool-Calling Assistant
该项目通过MCP协议将本地 LLM(例如 Qwen)连接到计算器或知识库等工具。助手会自动检测并调用这些工具来帮助解答用户疑问。
📦 功能
🔧 通过 MCP 服务器执行工具
🧠 通过 HTTP 或 OpenAI SDK 进行本地 LLM 集成
📚 知识库支持(
data.json)⚡ 支持
stdio和sse传输
Related MCP server: MCP Server with Local LLM
🗂 项目文件
文件 | 描述 |
| 注册工具并启动 MCP 服务器 |
| 使用 |
| 使用与 OpenAI 兼容的 SDK 实现 LLM + 工具调用逻辑 |
| 使用 stdio 的 MCP 客户端 |
| 使用 SSE 的 MCP 客户端 |
| 问答知识库 |
📥 安装
要求
Python 3.8+
安装依赖项:
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🚀 入门
1. 运行 MCP 服务器
python server.py这将启动您的工具服务器,具有add 、 multiply和get_knowledge_base等功能。
2. 启动客户端
选项 A:HTTP 客户端(通过原始 API 的本地 LLM)
python client-http.py选项 B:OpenAI SDK 客户端
python client-openai.py选项 C:stdio 传输
python client-stdio.py选项 D:SSE 传输
确保server.py设置:
transport = "sse"然后运行:
python client-sse.py💬 示例提示
数学工具调用
What is 8 times 3?回复:
Eight times three is 24.知识库问题
What are the healthcare benefits available to employees in Singapore?响应将包括来自data.json的相关答案。
📁示例: 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..."
}
]🔧 配置
在client-http.py或clientopenai.py中,更新以下内容:
LOCAL_LLM_URL = "..."
TOKEN = "your-api-token"
LOCAL_LLM_MODEL = "your-model"确保您的 LLM 提供与 OpenAI 兼容的 API 端点。
🧹 清理
客户端自动处理工具调用和响应。您可以使用Ctrl+C停止服务器或客户端。
🪪 许可证
MIT 许可证。请参阅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