This repository contains the Cursor rule document for integrating the HPKV Memory MCP Server with Cursor IDE. The Memory MCP Server provides long-term memory capabilities for LLMs in Cursor, allowing AI assistants to remember conversations across sessions.
The Memory MCP Server implements the Model Context Protocol (MCP) to give LLMs true long-term memory. This rule document enables Cursor IDE to:
- Remember project structures and conventions across sessions
- Recall user preferences for coding style and patterns
- Reference previous explanations and decisions
- Avoid hallucinating non-existent code and functions
- Stop suggesting previously failed approaches
In short, it makes AI coding assistants in Cursor much more reliable by giving them access to persistent memory.
-
Create a free HPKV account and create an API Key in Dashboard.
-
Edit your
mcp.json
file:
{
"mcpServers": {
"hpkv-memory-server": {
"command": "npx",
"args": ["mcp-remote", "https://memory-mcp.hpkv.io/sse"]
}
}
}
-
After adding the Memory MCP Server, you'll be prompted to login to your HPKV account. After that you can select the API key you generated.
-
Add the memory cursor rule to your project and set the rule type to
Always
.
The memory_tool_usage_guide.mdc file contains the rules that instruct Cursor's AI how to properly use the memory tools. It includes:
- Guidelines for when to search memory before responding
- Patterns for storing important information
- Best practices for memory retrieval
- Naming conventions for organizing memories
In certain situations, mcp-remote
might have trouble refreshing your token and it consitantly generates new Client IDs that lead to the loop of trying to register a new Client ID, openning API Key selection page and goingback to generating a new Client ID. To fix this, disable the MCP server in Cursor, kill all mcp-remote
processes and clear the .mcp-auth
folder with a command similar to pkill -f mcp-remote && rm -rf ~/.mcp-auth
and then re-enable it in Cursor. This should fix any authentication issue you were experiencing.
For more information, check out our blog post about Memory MCP and the HPKV documentation.