Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

跨项目问题解决方案记忆系统,自动捕获和搜索解决方案,支持混合搜索和离线存储。

README.md

Solution Memory MCP Server

跨项目问题解决方案记忆系统 - 为 Windsurf/Cascade 设计的 MCP Server。

功能特性

  • 🧠 自动捕获 - 保存问题解决方案,包含问题描述、根因分析、解决步骤
  • 🔍 混合搜索 - 结合关键词精确匹配 (FTS5) 和语义相似度 (向量) 搜索
  • 🏷️ 智能标签 - 自动分类:技术栈、问题类型、错误代码
  • 📦 完全离线 - 所有数据存储在本地,保护隐私
  • 🌍 跨项目共享 - 全局注册,所有项目可用,统一存储

安装

前置要求

  • Python >= 3.11
  • Windsurf IDE

安装步骤

# 1. 克隆或下载项目
cd solution-memory-mcp

# 2. 使用 Python 3.11+ 安装
python3.11 -m pip install -e .

# 或使用 Homebrew 安装的 Python
/opt/homebrew/bin/python3.11 -m pip install -e .

Windsurf 配置

MCP 配置文件路径:~/.codeium/windsurf/mcp_config.json

添加以下配置:

{
  "mcpServers": {
    "solution-memory": {
      "command": "/opt/homebrew/bin/python3.11",
      "args": ["-m", "solution_memory_mcp"],
      "cwd": "/path/to/solution-memory-mcp",
      "env": {
        "SOLUTION_MEMORY_PATH": "~/.solution-memory"
      }
    }
  }
}

注意:请将 command 替换为你系统上 Python 3.11+ 的实际路径

配置完成后重启 Windsurf 使配置生效。

Cascade 自动化配置

为了让 Cascade 在工作过程中自动保存和检索解决方案,需要在 Windsurf 的 MemoriesGlobal Rules 中添加使用规则:

# Solution Memory 使用规则

1. **遇到问题时** - 先调用 `search_solutions` 搜索是否有类似解决方案
2. **成功解决问题后** - 调用 `save_solution` 保存解决方案
3. **触发条件**:修复 bug、解决配置问题、处理依赖冲突

MCP 工具

save_solution

保存新的解决方案。

{
  "title": "Docker 容器网络连接失败",
  "problem": "API 请求报错 ECONNREFUSED...",
  "solution": "检查 Docker 网络配置...",
  "root_cause": "容器使用了 bridge 网络但未正确配置端口映射",
  "error_messages": ["ECONNREFUSED 127.0.0.1:3000"],
  "tags": ["Docker", "networking", "bug"],
  "project_name": "my-project"
}

search_solutions

搜索相似解决方案。

{
  "query": "ECONNREFUSED 连接被拒绝",
  "limit": 5,
  "tags": ["Docker"],
  "search_mode": "hybrid"
}

get_solution

获取解决方案完整详情。

{
  "id": "uuid-of-solution"
}

list_tags

列出所有标签。

{
  "category": "tech_stack"
}

数据存储

默认存储位置:~/.solution-memory/

~/.solution-memory/
├── solutions.db    # SQLite 数据库 (元数据 + FTS5 索引)
└── chroma/         # Chroma 向量数据库 (语义嵌入)

数据特点

  • 全局存储 - 数据存储在用户 home 目录,不绑定特定项目
  • 跨项目共享 - 所有项目的解决方案统一管理
  • 双重索引 - FTS5 关键词搜索 + 向量语义搜索

搜索模式

| 模式 | 说明 | 适用场景 | |------|------|----------| | hybrid (默认) | 关键词 + 语义混合 | 通用搜索 | | keyword | 纯关键词 FTS5 | 精确匹配错误信息 | | semantic | 纯语义向量 | 模糊描述、不同表述 |

开发

# 安装开发依赖
pip install -e ".[dev]"

# 运行测试
pytest tests/

# 手动测试服务
python -m solution_memory_mcp

常见问题

服务状态显示黄色

首次启动时需要下载 embedding 模型(~90MB),可能需要几十秒。完成后变为绿色。

语义搜索分数为 0

确保通过 MCP 工具 save_solution 保存,会自动同步到向量库。直接操作数据库不会触发同步。

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.