Skip to main content

Cursor Memory MCP

Python Version License: MIT smithery badge

🧠 Enable AI assistants to create and manage project memory files in Cursor through a simple MCP interface.

The Cursor Memory MCP Server provides a bridge between AI assistants and Cursor's project memory system through the Model Context Protocol (MCP). It allows AI models to automatically create and manage .mdc memory files in your project's .cursor/rules/ directory.

Project Screenshot Project Screenshot

✨ Core Features

  • 🧠 memory record: Automatically create task memory files in .cursor/rules/ directory
  • 📝 structure format: Generate properly formatted .mdc files following Cursor specifications
  • 🔄 context saving: Preserve task execution context for future reference
  • 🌐 multi-language: Full support for Chinese and international content
  • 💻 cross-platform: Works seamlessly on Windows, macOS, and Linux
  • ⚡ MCP standard protocol: Built on the Model Context Protocol for seamless AI integration

🚀 Quick Start

Installing via pip

Install using uv for better performance and isolation:

# Install globally as a tool
uv tool install cursor-memory-mcp

# Update PATH to use the tool
uv tool update-shell

step1 . cursor settings --> MCP --> add configuration (reffered later)

step2 . cursor settings --> RULES --> add user rule:

After task execution is completed, use `cursor memory` to track task execution records

step3 . call agent to help you with coding

when you dev step by step, proj rules will record cursor operation history, and when cursor need them, it will reffer it and do your job with memory.

Installing for Development

For development and contributing:

# Clone and set up development environment
git clone https://github.com/yourusername/cursor-memory-mcp.git
cd cursor-memory-mcp

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or
.venv\Scripts\activate     # Windows

# Install with development dependencies
pip install -e ".[dev]"
# Install globally
uv tool install cursor-memory-mcp

# For development
git clone https://github.com/yourusername/cursor-memory-mcp.git
cd cursor-memory-mcp
uv venv
source .venv/bin/activate  # Linux/macOS
# or
.venv\Scripts\activate     # Windows
uv pip install -e ".[dev]"

🔌 MCP Integration

Cursor Integration

Add this configuration to your Cursor MCP settings:

{
    "mcpServers": {
        "cursor-memory-mcp": {
            "command": "uv",
            "args": [
                "tool",
                "run",
                "cursor-memory-mcp",
            ]
        }
    }
}

Development Configuration

For development with local installation:

{
    "mcpServers": {
        "cursor-memory-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "path/to/cloned/cursor-memory-mcp",
                "run",
                "cursor-memory-mcp",
            ]
        }
    }
}

💡 Available Tools

The server provides one powerful tool for memory management:

Memory Creation Tool

Create project memory files with comprehensive context:

result = await call_tool("create_cursor_memory", {
    "task_summary": "实现了用户认证系统,包括JWT token生成、密码加密验证和权限管理功能",
    "task_name": "user_authentication_system",
    "task_description": "用户认证和授权系统实现"
})

Parameters:

Parameter Type Required Description
task_summary string ✅ 详细的任务执行上下文总结
task_name string ✅ 简短的任务名称(用作文件名)
task_description string ⚪ 可选的详细任务描述
project_path string ✅ 当前项目的绝对路径

Validation Rules:

  • task_name must contain only letters, numbers, underscores, and hyphens
  • task_summary cannot be empty or whitespace only
  • Files are automatically timestamped if duplicates exist

📁 Generated File Format

The server creates .mdc files with the following structure:

---
description: "get the summary of previous step: {task_description}"
globs:
alwaysApply: false
---
{task_summary}

🤝 Contributing

We welcome contributions of all kinds! Please see our Contributing Guide for details.

🙏 Acknowledgments


Made with ❤️ for the AI development community

Star ⭐ this repo if you find it helpful!

Metadata

Release files for cursor-memory-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cursor-memory-mcp 0.1.1
File Size Uploaded
cursor_memory_mcp-0.1.1.tar.gz 20.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cursor-memory-mcp 0.1.1
File Interpreter ABI Platform
cursor_memory_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.7 kB

Release files / cursor_memory_mcp-0.1.1.tar.gz

Download URL cursor_memory_mcp-0.1.1.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3b9d09de0b909c70aa46bfe4b71ac97fcdbf110382f5a0be0a6c68db90fda4cc
BLAKE2b-256 checksum
How to use checksums
5e62bee1627243be9b1c2d2de8836dab75c186d23426a8058b0d3db9d94a8d33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / cursor_memory_mcp-0.1.1-py3-none-any.whl

Download URL cursor_memory_mcp-0.1.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f69fddfbc2c84d5ffd3c0e96bb195f1c871ad847b2ba009885b13abd4316c95
BLAKE2b-256 checksum
How to use checksums
66bd4ae8f7ae01249784d9104a4c7177c6a9df8be14ca169d3c33d118194dacc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page