mcp-tools-server
mcp-tools-server
一个通用的 MCP (Model Context Protocol) 服务器,提供可供任何兼容代理使用的实用工具。
演示了 MCP 的服务器端实现——大多数项目仅消费服务器,而本项目实现了一个服务器。
暴露的工具
工具 | 功能 |
| UTC 日期、时间、Unix 时间戳、星期几、ISO 周 |
| 安全评估数学表达式(完整数学运算) |
| 文本的字数、句子数、字符数和预估 Token 数 |
| 通过点路径 ( |
| 知识库搜索——已准备好连接到 Qdrant 的存根 |
| 带有域名白名单的 HTTP GET 请求 |
快速开始
git clone https://github.com/RenanMiqueloti/mcp-tools-server.git
cd mcp-tools-server
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python server.py连接到 Claude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"mcp-tools": {
"command": "python",
"args": ["/caminho/absoluto/para/server.py"]
}
}
}重启 Claude Desktop。工具将自动可用。
连接到 LangGraph 代理
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic
client = MultiServerMCPClient({
"mcp-tools": {
"command": "python",
"args": ["server.py"],
"transport": "stdio",
}
})
tools = await client.get_tools()
agent = create_react_agent(ChatAnthropic(model="claude-opus-4-6"), tools)
result = await agent.ainvoke({"messages": [("human", "What day of the week is it?")]})添加真实的 search_knowledge (Qdrant)
在 server.py 中,替换 search_knowledge 处理程序中的存根:
from qdrant_client import QdrantClient
from langchain_openai import OpenAIEmbeddings
client_q = QdrantClient(url=os.getenv("QDRANT_URL"))
embeddings = OpenAIEmbeddings()
query_vec = embeddings.embed_query(query)
hits = client_q.search("knowledge", query_vector=query_vec, limit=top_k)
results = [{"rank": i+1, "text": h.payload["text"], "score": h.score} for i, h in enumerate(hits)]结构
mcp-tools-server/
├── server.py # Servidor MCP completo (stdio transport)
├── requirements.txt
├── .env.example
└── LICENSEThis server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/RenanMiqueloti/mcp-tools-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server