cherry-mcp
Cherry Studio 知识库的 MCP 服务,让 AI 客户端可以直接搜索本地知识库。
Install / Use
claude mcp add UserTheo02726 -- npx -y github:UserTheo02726/cherry-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Our assessment of cherry-mcp
cherry-mcp scores 67/100 on our quality scale, 753rd of 821 AI & Machine Learning skills we index.
Its MCP Server is 3.6 KB long, well organised into 17 sections with 7 code examples: a solid amount of guidance for an agent.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-18 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 85/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
cherry-mcp compared with similar skills
All 4 of these similar skills score higher than cherry-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| cherry-mcp (this skill)by UserTheo02726 | 67 | 3 | 4mo ago | MCP Server |
| claude-memby thedotmack | 100 | 94.9k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 86.0k | 13d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 84.5k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install cherry-mcp?
- Run
claude mcp add UserTheo02726 -- npx -y github:UserTheo02726/cherry-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does cherry-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is cherry-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 85/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is cherry-mcp still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubcherry-mcp
将 Cherry Studio 的本地知识库通过 MCP (Model Context Protocol) 暴露给 AI 客户端(Cursor、Claude Desktop、opencode 等)。
快速开始
在任何支持 MCP 的 AI 客户端配置文件中添加:
{
"mcpServers": {
"cherry-mcp": {
"command": "npx",
"args": [
"-y", "cherry-mcp",
"--embed-url", "http://127.0.0.1:1234",
"--embed-model", "text-embedding-qwen3-embedding-8b",
"--embed-dim", "4096"
]
}
}
}
[!TIP]
--embed-api-key使用本地模型时可省略;首次执行 npm 会自动安装依赖。
opencode 配置
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"cherry-mcp": {
"type": "local",
"command": [
"npx", "-y", "cherry-mcp@latest",
"--top-k", "10",
"--threshold", "0.6",
"--max-fetch", "1000",
"--kb-path", "C:\\Users\\你的用户名\\AppData\\Roaming\\CherryStudio\\Data\\KnowledgeBase",
"--embed-url", "http://127.0.0.1:1234",
"--embed-model", "text-embedding-qwen3-embedding-8b",
"--embed-dim", "4096"
],
"enabled": true
}
}
}
更多配置示例请参阅 mcp-config.md
参数配置
所有参数支持 CLI 传入,也可通过环境变量注入。优先级:CLI 参数 > 环境变量
[!IMPORTANT] 以下参数为必填:
--embed-url、--embed-model、--embed-dim
| CLI 参数 | 环境变量 | 默认值 | 说明 |
|:---------|:---------|:-------|:-----|
| --top-k <n> | DEFAULT_TOP_K | 20 | 最大返回结果数 |
| --threshold <n> | DEFAULT_THRESHOLD | 0.5 | 最低相似度阈值(0-1) |
| --max-fetch <n> | MAX_FETCH | 1000 | 每库最多读取的记录数 |
| --kb-name <str> | DEFAULT_KB_NAME | - | 限定搜索指定名称的知识库 |
| --kb-path <dir> | CHERRYSTUDIO_KB_PATH | 自动识别 | 知识库根目录路径(可覆盖默认值) |
| --embed-url <url> | EMBEDDING_URL | (必填) | Embedding API 地址 |
| --embed-api-key | EMBEDDING_API_KEY | - | API Token(本地模型可留空) |
| --embed-model <id> | EMBEDDING_MODEL | (必填) | 向量模型 ID |
| --embed-dim <n> | EMBEDDING_DIMENSION | (必填) | 向量维度(须与模型实际输出一致) |
完整参数说明请参阅 cli-params.md
可用工具
| 工具名 | 说明 |
|:-------|:-----|
| list_knowledge_bases | 列出所有知识库(名称、路径、向量数量、维度等) |
| search_knowledge | 向量相似度检索,返回最相关的文档片段 |
本地开发
1. 克隆项目并安装依赖
git clone https://github.com/UserTheo02726/cherry-mcp.git
cd cherry-mcp
npm install
2. 配置调试参数
# 复制配置文件示例
cp dev/dev-config.json.example dev/dev-config.json
# 编辑配置文件,填入你的参数
vim dev/dev-config.json
配置文件说明:
{
"embedUrl": "https://api.siliconflow.cn/v1/embeddings",
"embedModel": "BAAI/bge-m3",
"embedDim": 1024,
"embedApiKey": "sk-xxx",
"topK": 20,
"threshold": 0.5,
"maxFetch": 1000,
"kbName": "",
"kbPath": ""
}
3. 调试
方式 A:命令行调试
# 1. 列出所有工具
node dev/debug.js tools/list
# 2. 调用 list_knowledge_bases 工具
node dev/debug.js tools/call list_knowledge_bases
# 3. 调用 search_knowledge 工具
node dev/debug.js tools/call search_knowledge "<搜索关键词>" <返回结果数默认:5> <相似度阈值默认:0.6>
方式 B:使用 MCP Inspector
node dev/inspector.js
[!NOTE] MCP 服务启动后会等待 IDE 客户端连接,不会显示交互界面。
前置要求
- Node.js >= 22
- 已运行 Cherry Studio 并创建至少一个知识库
- 可访问的 Embedding API(本地 LM Studio 或远程 SiliconFlow 等)
TODO
- [ ] 优化
search_knowledge工具的参数描述,减少 AI 主动传入top_k、threshold、kb_name等可选参数的行为 - [ ]
list_knowledge_bases返回的知识库名称是 Base62 ID,而非 GUI 中的自定义名称
常见问题
遇到问题请参阅 troubleshooting.md
Related Skills
claude-mem
94.9kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
86.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
84.5kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
