-
Notifications
You must be signed in to change notification settings - Fork 24
Home
whill edited this page Aug 9, 2025
·
1 revision
MCPStore 是一个轻量级的 MCP(Model Context Protocol)工具管理库,旨在简化智能体(agents)和链(chains)使用 MCP 工具的配置和管理过程。
- 简单集成:几行代码即可完成工具调用
- 链式操作:支持流畅的 API 调用方式
- 灵活模式:支持全局 Store 模式和独立 Agent 模式
- 服务隔离:不同 Agent 之间的服务和工具完全隔离
- 统一配置:统一的配置管理,支持动态服务注册
from mcpstore import MCPStore
# 创建 Store 实例
store = MCPStore()
# 注册服务
store.register_service("filesystem", {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
})
# 调用工具
result = store.call_tool("read_file", {"path": "example.txt"})
print(result)
所有服务在全局范围内共享,适合单一应用场景。
每个 Agent 拥有独立的服务空间,适合多智能体场景。
准备好开始了吗? 让我们从 安装指南 开始吧!