Cursor IDE: Adding Memory With Graphiti MCP 🤖⚡️
Upgrade Cursor with persistent memory using Graphiti MCP. Now your favorite AI coding agent remembers your preferences, standards, and specs across sessions.

In AI-assisted development, the ability for an agent to recall and update coding preferences and standards, procedural knowledge, and specifications across sessions has become increasingly important. Unfortunately, Cursor, the most popular agentic IDE, does not yet have a good memory solution.
I decided to take on the challenge by using our open-source temporal graph framework, Graphiti, and its new Model Context Protocol (MCP) server to add sophisticated memory to Cursor. Now, the Cursor Agent can effectively retain, manage, and recall memory across developer and agent sessions, and build far more complex applications.
Cursor Agent Memory Walkthrough
What's MCP?
The Model Context Protocol (MCP) is an open standard designed for structured interaction between AI applications (MCP clients) and external resources (MCP servers). It allows AI models to access external data or tools, extending their capabilities beyond static training data. In our implementation, Graphiti serves as the MCP server, while Cursor IDE operates as the MCP client.
Introducing Graphiti
Graphiti is a framework for building and querying temporally-aware knowledge graphs, specifically tailored for AI agents operating in dynamic environments. Unlike traditional retrieval-augmented generation (RAG) methods, Graphiti continuously integrates user interactions, structured and unstructured enterprise data, and external information into a coherent, queryable graph.
The framework supports incremental data updates, efficient retrieval, and precise historical queries without requiring complete graph recomputation, making it suitable for developing interactive, context-aware AI applications. Graphiti’s MCP server exposes the framework as tools an agent can directly utilize, including the Cursor Agent.
We're excited to release an experimental MCP server for Graphiti. Demonstrating this integration with Cursor was a natural choice, given our team's regular use of Cursor and enthusiasm to see MCP in daily use.
Customizing Graphiti for Cursor
Graphiti enables the use of rich, domain-specific data structures through custom entity definitions, replacing generic graph nodes with detailed models. For example, in Cursor IDE, we use the following Requirement
entity definition:
class Requirement(BaseModel):
"""A Requirement represents a specific need, feature, or functionality that a product or service must fulfill.
Always ensure an edge is created between the requirement and the project it belongs to, clearly indicating on the edge that the requirement is a requirement.
Instructions for identifying and extracting requirements:
1. Look for explicit statements of needs or necessities ("We need X", "X is required", "X must have Y").
2. Identify functional specifications describing what the system should do.
3. Pay attention to non-functional requirements like performance, security, or usability.
4. Extract constraints or limitations that must be adhered to.
5. Focus on clear, specific, and measurable requirements rather than vague wishes.
6. Capture priority or importance if mentioned ("critical", "high priority", etc.).
7. Include explicit dependencies between requirements.
8. Preserve original intent and scope.
9. Categorize appropriately based on domain or function.
"""
project_name: str = Field(
...,
description='The name of the project to which the requirement belongs.',
)
description: str = Field(
...,
description='Description of the requirement. Only use information mentioned in the context to write this description.',
)
This structured approach allows Cursor to precisely store and recall project requirements within Graphiti's knowledge graph.
How We Powered Cursor IDE with Graphiti's MCP Server
Here's how I integrated Graphiti's MCP server to provide memory capabilities to Cursor IDE:
- Configuration: Cursor IDE was configured as an MCP client linked to Graphiti's MCP server, enabling direct interaction with the temporal knowledge graph. More details in the Graphiti MCP ReadMe.
- Custom Entity Definition: We defined custom entities in Graphiti—such as
Requirement
,Preference
, andProcedure
—representing project specifications and coding standards. - Real-Time Data Updates: The Cursor agent is instructed to add and update entities in the Graphiti knowledge graph. For instance, changing a UI framework preference from Chakra UI to ShadCN immediately reflected in the graph, complete with temporal metadata reflecting when the requirements changed.
- Retrieval Before Action: The agent is also instructed to query Graphiti before taking action, retrieving stored preferences, requirements, and procedures. These persist across sessions, and potentially projects.
Next Steps
- Explore the Graphiti Repo: Visit the Graphiti GitHub repository and star the project if you find it useful.
- MCP Server Documentation: Read the detailed MCP server README for configuration guidance.
- Read Zep's Research Paper on arXiv: Learn more about Graphiti's architecture and performance by reading Zep: A Temporal Knowledge Graph Architecture for Agent Memory.