Skip to content
cursor-mem logo

Cursor-Mem Integration Skill

cursor-mem

Accesses the claude-mem MCP server from Cursor to search session history and record observations. Triggers: memory search, claude-mem, past decisions, record this. Do NOT load for: normal coding, temporary notes, or implementation work.

SKILL.md

Full skill instructions

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

📚 参考資料

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
A
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View