Skip to content
whill edited this page Aug 9, 2025 · 1 revision

欢迎使用 MCP-Store

什么是 MCPStore?

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)

两种使用模式

Store 模式(全局共享)

所有服务在全局范围内共享,适合单一应用场景。

Agent 模式(独立隔离)

每个 Agent 拥有独立的服务空间,适合多智能体场景。

下一步


准备好开始了吗? 让我们从 安装指南 开始吧!