Back to Skills

cursor-mem

majiayu000
Updated Today
58
9
58
View on GitHub
Developmentaimcp

About

This skill connects Cursor to the claude-mem MCP server, enabling developers to search session history and record key observations across sessions. It's specifically for retrieving past decisions, implementation patterns, or recording design judgments—not for general coding tasks. Key capabilities include searching by keyword or timeline and saving reusable solutions for future reference.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/cursor-mem

Copy and paste this command in Claude Code to install this skill

Documentation

Cursor-Mem Integration Skill

CursorからClaude-memを活用するスキル。Claude CodeとCursorで同じメモリデータベースを共有し、セッション間の知識を引き継ぎます。

🎯 使用場面

検索(読み取り)

  • 過去の意思決定を確認: 「なぜこのアーキテクチャを選んだのか?」
  • パターンの参照: 「以前はどのように実装したか?」
  • バグ修正履歴: 「同様の問題を過去に解決したか?」
  • 技術選定の理由: 「なぜこのライブラリを使っているのか?」

記録(書き込み)

  • PMとしての判断をメモ: レビュー中の気付きや設計判断
  • パターンの記録: 再利用可能なソリューション
  • 引き継ぎ事項: 次のセッションやチームメンバーへの情報
  • 学習事項: トラブルシューティングで得た知見

📋 利用可能なMCPツール

Cursor上でclaude-memのMCPツールを直接利用できます:

検索系

  • mcp__claude-mem__search: キーワードでメモリを検索
  • mcp__claude-mem__timeline: 時系列で記録を取得
  • mcp__claude-mem__get_recent_context: 最近の文脈を取得
  • mcp__claude-mem__get_observation: 特定の観測を取得

書き込み系

  • mcp__claude-mem__create_entities: 新しいエンティティを作成
  • mcp__claude-mem__create_relations: エンティティ間の関連を作成
  • mcp__claude-mem__add_observations: 観測を追加

🔧 セットアップ

1. MCPラッパースクリプトの配置

# harness リポジトリ内に claude-mem-mcp がインストールされている前提
# 絶対パスで参照
HARNESS_PATH="/path/to/claude-code-harness"

2. Cursor MCP設定

プロジェクトルートに .cursor/mcp.json を作成:

{
  "mcpServers": {
    "claude-mem": {
      "type": "stdio",
      "command": "/absolute/path/to/claude-code-harness/scripts/claude-mem-mcp"
    }
  }
}

⚠️ 重要: command には絶対パスを指定してください。

3. Cursor再起動

設定後、Cursorを再起動してMCPサーバーを認識させます。

💡 使い方の例

詳細な使用例は examples.md を参照してください。

基本的な検索

ユーザー: 「認証方式の選定理由を確認したい」

Cursor(Composer):
→ 直接 mcp__claude-mem__search を呼び出し(auto mode により自動有効化)
→ クエリ: "認証 JWT Supabase 選定理由"
→ 過去の決定記録(decisions)を取得

v2.1.7+: MCP auto mode がデフォルト有効のため、MCPSearch による事前検索は不要です。

気付きの記録

ユーザー: 「この実装パターンを記録しておいて」

Cursor(Composer):
→ 直接 mcp__claude-mem__add_observations を呼び出し
→ タイプ: pattern
→ タグ: source:cursor, review, best-practice
→ 内容: 実装パターンの説明

🏷️ タグ規約

Claude CodeとCursorで統一されたタグ体系を使用します:

タグ用途
source:cursorCursorから記録された情報
source:claude-codeClaude Codeから記録された情報
type:decision意思決定の記録
type:pattern再利用可能なパターン
type:bugバグ修正の記録
type:reviewレビューでの気付き
type:handoff引き継ぎ事項

🔄 Claude Code との連携

データ共有

  • Claude CodeとCursorは同じSQLiteデータベース(~/.claude-mem/claude-mem.db)を使用
  • WALモードで並行書き込みに対応
  • リアルタイムでデータが共有される

推奨ワークフロー

  1. Cursor(PM役): 設計判断やレビュー結果を記録
  2. Claude Code(実装役): 過去の判断を参照しながら実装
  3. 双方向検索: どちらからでも過去の記録を検索可能

🔄 Claude Code 2.1.7+ 対応

MCP tool search の auto mode がデフォルト有効になりました。

変更点:

  • MCPSearch による明示的なツール検索は不要
  • MCP ツールは直接呼び出し可能
  • 初回呼び出し時に自動的にツールが有効化される

互換性:

  • Claude Code 2.1.6 以前: MCPSearch を先に実行
  • Claude Code 2.1.7+: 直接呼び出し可能

⚠️ 注意事項

パフォーマンス

  • 初回検索時はワーカー起動に2-3秒かかる場合があります
  • 2回目以降はワーカーが常駐するため高速

セキュリティ

  • メモリデータベースはローカル環境にのみ保存されます
  • 機密情報を記録する場合は注意してください

トラブルシューティング

問題: MCPツールが認識されない 解決策:

  1. .cursor/mcp.json のパスが正しいか確認
  2. スクリプトが実行可能か確認: chmod +x scripts/claude-mem-mcp
  3. Cursorを再起動

問題: ワーカーが起動しない 解決策:

  1. ヘルスチェック: curl http://127.0.0.1:37777/health
  2. 手動起動: node ~/.claude/plugins/cache/thedotmack/claude-mem/*/scripts/worker-cli.js start

📚 参考資料

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/cursor-mem

Related Skills

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

llamaguard

Other

LlamaGuard is Meta's 7-8B parameter model for moderating LLM inputs and outputs across six safety categories like violence and hate speech. It offers 94-95% accuracy and can be deployed using vLLM, Hugging Face, or Amazon SageMaker. Use this skill to easily integrate content filtering and safety guardrails into your AI applications.

View skill