Readit News logoReadit News
Posted by u/roseway4 a year ago
Show HN: Cursor IDE now remembers your coding prefs using MCP
Hi, I'm Daniel from Zep. I've integrated the Cursor IDE with Graphiti, our open-source temporal knowledge graph framework, to provide Cursor with persistent memory across sessions. The goal was simple: help Cursor remember your coding preferences, standards, and project specs, so you don't have to constantly remind it.

Before this integration, Cursor (an AI-assisted IDE many of us already use daily) lacked a robust way to persist user context. To solve this, I used Graphiti’s Model Context Protocol (MCP) server, which allows structured data exchange between the IDE and Graphiti's temporal knowledge graph.

Key points of how this works:

- Custom entities like 'Requirement', 'Preference', and 'Procedure' precisely capture coding standards and project specs.

- Real-time updates let Cursor adapt instantly—if you change frameworks or update standards, the memory updates immediately.

- Persistent retrieval ensures Cursor always recalls your latest preferences and project decisions, across new agent sessions, projects, and even after restarting the IDE.

I’d love your feedback—particularly on the approach and how it fits your workflow.

Here's a detailed write-up: https://www.getzep.com/blog/cursor-adding-memory-with-graphi...

GitHub Repo: https://github.com/getzep/graphiti

-Daniel

jasonjmcghee · a year ago
What's the advantage over the built-in solution? (and before it, .cursorrules)

https://docs.cursor.com/context/rules-for-ai

striking · a year ago
You add some additional instructions to the Cursor rules here: https://github.com/getzep/graphiti/tree/main/mcp_server#inte...

I think the difference is that Cursor doesn't update its rules automatically as you work, while this might?

dan_voronov · a year ago
.cursorrules and other files that are added as system instructions in Cursor are just files, meaning the agent can edit them easely - you can tell it from the chat to add something to a rule and it will do it.

You are also wrong that it cannot do this automatically: if you add to the system instruction to record all important decisions in .cursorrules, it will record them there. automatically

roseway4 · a year ago
Correct. The Graphiti MCP server, with the help of the agent, stores and retrieves preferences and requirements automatically without requiring rule changes.
rahimnathwani · a year ago
But you could tell cursor to update its rules automatically, no?
bfeynman · a year ago
The over engineering here is commendable for something that provides most likely marginal value whilst still needing more api calls to summarize everything you do.
pizzafeelsright · a year ago
You've described my job for the last few years.

Deleted Comment

knowsuchagency · a year ago
You're not kind, but you're not wrong.
zachlatta · a year ago
Come on. You don’t need to be a bully. This person worked hard on their thing.
yard2010 · a year ago
It's a matter of perspective.
roseway4 · a year ago
We built Graphiti's MCP server for many different use cases. It's a great enhancement to Cursor, but may not offer significant value for your use case. No offense taken.
yard2010 · a year ago
I've been looking for a thing like this in the last few weeks to add memory to my bot. Initially I started implementing a poor man solution, realizing how hard the problem is. Thank you for creating this! This is awesome. Best of luck monetizing this!
mellosouls · a year ago
This looks interesting but somewhat complicated or not obvious how to get going in a classic "Show HN" style.

The requirement for an OpenAI key may also be a little off-putting, or at least, could do with some indication of realistic costs; most Cursor users will likely need a significant motivation to add to the subscription they already have.

Don't get me wrong, this could be a really worthwhile addition to the LLM coding toolset but I think it needs some work on the presentation as to how to get quickly up and running.

roseway4 · a year ago
Graphiti uses OpenAI (or other LLMs) to build the knowledge graph. Setting up the MCP server is fairly straight forward: https://github.com/getzep/graphiti/tree/main/mcp_server

There's also a Docker Compose setup: https://github.com/getzep/graphiti/tree/main/mcp_server#runn...

The Cursor MCP setup is also simple:

```{ "mcpServers": { "Graphiti": { "url": "http://localhost:8000/sse" } } }```

jasonjmcghee · a year ago
How complex is the system? Can a local model or the agent itself be used instead?
ekaesmem · a year ago
The concept is promising, but I tested it and found the performance quite poor. I used one of my Python projects for the test, which consists of about 10k lines of Python code. The model I utilized was Claude 3.7 Sonnet with thinking.

in the first conversation round, I asked Claude to grasp the overall project and initialize its memory. Unfortunately, Claude experienced a hallucination and generated an episode that included a full name entirely unrelated to my project's actual full name, as my project name is an abbreviation.

In the second conversation round, I provided Claude with the full name of my project and requested it to correct its memory. In response, Claude apologized and claimed that it now understood the full name of my project, but it did not utilize any MCP command.

In the third conversation round, I specifically asked it to use the MCP command to update its memory. Claude successfully added a new episode but failed to remove the incorrect old episode.

It wasn't until the fourth conversation round that I directly pointed out that it should eliminate the incorrect old episode, and Claude finally completed the memory initialization that should have been accomplished at the end of the first round.

I have set up the correct Cursor Rules according to the README.

At this point, it appears this project is challenging to use with natural language. I need to explicitly instruct Claude on which specific tools to call for various operations to achieve the intended outcome.

Am I doing something wrong?

roseway4 · a year ago
I used Claude 3.7 Sonnet for the Cursor Agent when building the demo. Happy to hop on a call to walk through your experience, as I'm surprised the agent performed so poorly. daniel AT getzep.com
octernion · a year ago
not obvious to me why this is an improvement of having the agent just update the rule files directly itself; i have it do that to my various AI-targeted readme files and it works great.
roseway4 · a year ago
Graphiti MCP can recall more than just preferences and coding styles. Application specifications and evolution of these may be stored. For any non-trivial application, config files would likely be a misfit for this use ase.
octernion · a year ago
i store those in my rules files - really all the knowledge i would pass onto another engineer (incl. AI). not sure i follow why you would avoid putting that into AI-readable files in your repo like i do now.
bbertelsen · a year ago
One of the big problems I have with cursor is that it ignores the rules frequently. For example, working in the front-end it will sometimes totally ignore all the components that I have explicitly told it to use. Would this... fix that?
eightysixfour · a year ago
This would help, but you can also use a more aggressive approach to cursor rules: https://ghuntley.com/stdlib/

Using file pattern matching and automatic attachment makes it much, much more sticky in my experience.

kelleyperry · a year ago
I actually had Claude Desktop with the file system MCP write me out a pretty nice suite of rules directly in the .cursor/rules folder.

Deleted Comment

loujaybee · a year ago
I don’t see how this is palatable by serious organizations? So you build this huge memory graph of preferences? But none of it is explicit? It’s all just magic? The attack vectors from a security angle seem insane. Also the absence of any explicitness in how you define standards seems completely not viable in a commercial context? I mean it’s crazy cool as a hobby project, but also seems not to have a serious commercial viability?
roseway4 · a year ago
There are definitely potential security issues with memory for coding agents, which apply to not only Cursor but also Windsurf. Looking forward to more research in this area.
adenta · a year ago
This is exciting!

Glancing through the article, I can't tell, is this Cursor specific? Some of us are raw dogging VS Code with https://cline.bot, which supports MCP servers: https://cline.bot/mcp-marketplace.

Would love to try this out in Cline!

striking · a year ago
The actual MCP server is linked in the blog, I'll save you some scrolling by pasting it here: https://github.com/getzep/graphiti/tree/main/mcp_server
roseway4 · a year ago
The MCP server will work with any MCP client.