mcpstore

作者 whillhill

开盒即用的优雅管理mcp服务 | 结合Agent框架 | 作者听劝 | 已发布pypi | Vue页面demo

431
Stars
34
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/whillhill/mcpstore

快速入门

使用 mcpstore 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

███    ███  ██████  ███████  ██████  ████████  ██████  ██████  ███████
████  ████ ██      ██    ██ ██          ██    ██    ██ ██   ██ ██
██ ████ ██ ██      ███████  ██████      ██    ██    ██ ██████  █████
██  ██  ██ ██      ██           ██      ██    ██    ██ ██  ██  ██
██      ██  ██████ ██      ██████       ██     ██████  ██   ██ ███████

GitHub stars GitHub forks GitHub license Python versions

English | 简体中文

文档 | 快速使用

mcpstore 是什么?

mcpstore 是一个基于 Rust 构建的 MCP 管理平台,覆盖 MCP 服务的配置、运行、调用与生命周期管理,并提供可复用的 SDK、命令行工具(CLI)以及 App/Web 应用等多种使用方式。

快速开始

SDK

Python(PyPI Lib)
pip install mcpstore
# 或:uv add mcpstore
Rust Lib
cargo add mcpstore

CLI

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/ip2a/mcpstore/main/install.sh | bash

# 或使用 npm(macOS / Linux / Windows)
npm install -g mcpstore

App

GitHub Releases 下载发行版。

App 功能

会话管理

统一查看和管理 MCP 会话,掌握当前连接状态与运行情况。

截图:docs/assets/images/app-sessions.png

会话转移

在不同 Agent 或工作区之间转移会话,保持上下文连续。

截图:docs/assets/images/app-session-transfer.png

技能管理

集中管理可用工具和技能,按需配置 Agent 的能力范围。

截图:docs/assets/images/app-skills.png

Agent 管理

创建和管理不同 Agent,为每个 Agent 配置独立的服务与工具。

截图:docs/assets/images/app-agents.png

CLI 使用

通过 CLI 管理 MCP 服务、查看运行状态,并为 Agent 提供命令行工作流。

SDK 使用

通过 Python SDK 或 Rust Lib 将 mcpstore 集成到自己的应用中。

简单示例

初始化 store

from mcpstore import MCPStore

store = MCPStore.setup_store()

通过 store.for_store() 管理全局作用域内的 MCP 服务和工具。

添加第一个服务

store.for_store().add_service({
    "mcpServers": {
        "mcpstore_wiki": {
            "url": "https://example.com/mcp"
        }
    }
}).wait_service("mcpstore_wiki")

add_service 接受 MCP 服务配置;wait_service 等待指定服务就绪。

转换为 LangChain 工具

tools = store.for_store().for_langchain().list_tools()
print("loaded langchain tools:", len(tools))

适配器从 store.for_store() 读取工具,并转换为对应框架使用的对象。

框架适配
框架获取工具
LangChaintools = store.for_store().for_langchain().list_tools()
LangGraphtools = store.for_store().for_langgraph().list_tools()
OpenAItools = store.for_store().for_openai().list_tools()
AutoGentools = store.for_store().for_autogen().list_tools()
CrewAItools = store.for_store().for_crewai().list_tools()
LlamaIndextools = store.for_store().for_llamaindex().list_tools()
Semantic Kerneltools = store.for_store().for_semantic_kernel().list_tools()

在 LangChain 中使用

from langchain.agents import create_agent
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    temperature=0,
    model="your-model",
    api_key="sk-*****",
    base_url="https://api.xxx.com",
)
agent = create_agent(model=llm, tools=tools, system_prompt="你是一个助手")
events = agent.invoke({
    "messages": [{"role": "user", "content": "mcpstore 怎么添加服务?"}]
})
print(events)

这里的 toolsstore.for_store() 提供。

为 Agent 分组

使用 for_agent(agent_id) 为不同 Agent 建立独立作用域:

store.for_agent("agent1").add_service({
    "name": "mcpstore_wiki",
    "url": "https://example.com/mcp",
})

store.for_agent("agent2").add_service({
    "name": "gitodo",
    "command": "uvx",
    "args": ["gitodo"],
})

agent1_tools = store.for_agent("agent1").list_tools()
agent2_tools = store.for_agent("agent2").list_tools()

store.for_agent(agent_id)store.for_store() 提供相同的操作,服务和工具按 Agent 作用域隔离。

Rust API 与 MCP Server

当前推荐直接使用 Rust CLI 暴露服务,而不是再依赖历史 Python hub 接口:

# 启动 Rust HTTP API
mcpstore api --config-path ./mcp.json --host 127.0.0.1 --port 1820

# 以 stdio 启动 Rust MCP Server
mcpstore mcp --config-path ./mcp.json

# 以 streamable-http 启动 Rust MCP Server
mcpstore mcp --config-path ./mcp.json --transport streamable-http --host 127.0.0.1 --port 1830 --path /mcp

Python SDK 不再启动嵌入式 API server;需要对外提供服务时,请使用 Rust CLI。

常用接口

以下示例使用完整调用链:

动作示例
添加服务store.for_store().add_service(config)
定位服务store.for_store().find_service("service_name")
查看服务信息store.for_store().find_service("service_name").info()
查看服务状态store.for_store().find_service("service_name").state()
更新服务store.for_store().update_service("service_name", new_config)
增量更新store.for_store().patch_service("service_name", updates)
等待就绪store.for_store().wait_service("service_name", timeout=30)
重启服务store.for_store().restart_service("service_name")
断开服务store.for_store().disconnect_service("service_name")
删除服务store.for_store().remove_service(service_name="service_name")
列出服务store.for_store().list_services()
列出工具store.for_store().list_tools()
列出当前作用域资源store.for_store().list_resources()
列出当前作用域资源模板store.for_store().list_resource_templates()
读取指定服务资源store.for_store().find_service("service_name").read_resource("resource://uri")
列出当前作用域 Promptsstore.for_store().list_prompts()
获取指定服务 Promptstore.for_store().find_service("service_name").get_prompt("prompt_name", {"k": "v"})
调用工具store.for_store().find_tool("tool_name").call({"k": "v"})
查看配置store.for_store().show_config()
列出 Agentstore.list_agents()

数据源共享

可以使用 Redis 等 KV 后端,在多个进程或实例之间共享服务与工具数据。

Redis 示例
from mcpstore import MCPStore
from mcpstore.config import RedisConfig

redis_config = RedisConfig(
    host="127.0.0.1",
    port=6379,
    password=None,
    namespace="demo_namespace",
)
store = MCPStore.setup_store(source=redis_config)

使用相同后端和 namespace 的实例可以共享数据。若当前进程只使用共享数据源、不维护本地服务实例,可设置 mode="data_plane"

from mcpstore import MCPStore
from mcpstore.config import RedisConfig

redis_config = RedisConfig(
    host="127.0.0.1",
    port=6379,
    password=None,
    namespace="demo_namespace",
)
store = MCPStore.setup_store(source=redis_config, mode="data_plane")
services = store.for_store().list_services()

Docker 部署

仓库提供 Docker 配置,可用于本地试用和部署。

Star History

Star History Chart


欢迎通过 Issues 提交问题与建议。

常见问题

What is mcpstore?

mcpstore is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by whillhill. 开盒即用的优雅管理mcp服务 | 结合Agent框架 | 作者听劝 | 已发布pypi | Vue页面demo. It has 431 GitHub stars.

Is mcpstore safe to use?

mcpstore returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install mcpstore?

Clone the repository with "git clone https://github.com/whillhill/mcpstore" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is mcpstore written in?

mcpstore is primarily written in Python. It is open-source under whillhill on GitHub, so you can review or fork the full source.

Are there alternatives to mcpstore?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mcpstore against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情