MemorySync Cursor Starter
OfficialPersistent, project-scoped memory and documentation lookup for AI agents.
Search saved project memories semantically by natural-language query, returning ranked results with IDs, scores, and timestamps.
Save durable project facts, preferences, conventions, or architectural decisions one per call, with optional source and metadata tags.
Read MemorySync's own public documentation on demand for API/SDK/MCP/integration topics; no key required.
Fetch a single memory in full by ID, including tags, importance, and timestamps.
Explore connected memories around a topic via graph traversal, optionally focused on decisions.
List recorded decisions and surface contradictions or superseded decisions.
Preview and permanently delete memories by ID, with deletion only after explicit confirmation and dry_run=false.
MemorySync Cursor Starter Template
Stop Cursor from forgetting your project architecture across chat restarts.
This repository is a production-ready starter template configured with MemorySync and the Model Context Protocol (MCP). It gives Cursor persistent, scoped memory across conversations, so you never have to re-explain your framework choices, database patterns, or pinned library versions.
Every push to main runs the JSON-RPC contract in GitHub Actions. The server is started the way Cursor starts it, and the check speaks the protocol to it. Registries treat a missing CI status as a sign the project is unmaintained, so that run is part of keeping the listing healthy.
What's Included
server.py: Runnable, zero-dependency standard MCP stdio server implementing the full Model Context Protocol (MCP 2024-11-05) for Cursor, Claude Desktop, and AI agents.Dockerfile&docker-compose.yml: Containerized deployment running the MCP server over stdio..cursor/mcp.json: Preconfigured with MemorySync remote MCP endpoints (both memory and live zero-signup docs)..cursorrules: Strict developer instructions instructing Cursor when to save decisions and how to recall them with zero context bloat.setup.sh&setup.ps1: Automated 1-click cross-platform setup scripts for macOS, Linux, and Windows.tools/inspect_memory.sh&tools/inspect_memory.ps1: Single-file, zero-dependency terminal memory inspector.examples/minimal_mcp_client.py: Minimal Python example demonstrating how to interact with MCP programmatically.
Related MCP server: ContextFS
Get an API key (no account needed)
memorysync_read_docs and the memorysync-docs server work without a key. The memory tools need one. You can get an evaluation key without signing up:
In the browser: open memorysync.io/try and press Create my key.
From a terminal:
curl --request POST https://api.memorysync.io/evaluation/keys \ --header "Content-Type: application/json" \ --data '{"agent_caller":"cursor"}'The response includes
api_key,default_user_id, when the key expires (expires_at) and how many writes and searches it allows (limits).
Then set both values where server.py reads them (the memory inspector reads the key too):
# macOS / Linux
export MEMORYSYNC_API_KEY="<api_key>"
export MEMORYSYNC_USER_ID="<default_user_id>"# Windows PowerShell
$env:MEMORYSYNC_API_KEY = "<api_key>"
$env:MEMORYSYNC_USER_ID = "<default_user_id>"server.py sends the key as X-API-Key and the user id as X-End-User-ID. Every memory is saved and searched under that end user, so give each person their own id. Without MEMORYSYNC_USER_ID, everyone shares default-user.
An evaluation key stops working at expires_at. To keep a browser key, add your email on memorysync.io/try. For a permanent key, create a free account.
Running the MCP Server (stdio)
Run the server directly with Python 3:
python3 server.pyOr connect it to Claude Desktop / Cursor using stdio configuration:
{
"mcpServers": {
"memorysync": {
"command": "python3",
"args": ["/path/to/memorysync-cursor-starter/server.py"],
"env": {
"MEMORYSYNC_API_KEY": "your_api_key_here"
}
}
}
}Supported MCP Tools:
memorysync_search: Semantic search over persistent long-term memories, ranked by meaning.memorysync_add: Save a new durable memory, preference, or architectural decision.memorysync_read_docs: Query official MemorySync API, SDK, and integration documentation on demand. Needs no key.memorysync_get: Read one memory in full, by the id a search returned.memorysync_related: Find memories connected to a topic.memorysync_decisions: List recorded decisions and the facts that contradict each other.memorysync_forget: Delete memories. Shows what would be deleted first, and deletes nothing until you confirm.
60-Second Setup
1. Clone this template
git clone https://github.com/memorysyncio/memorysync-cursor-starter.git my-agent-project
cd my-agent-project2. Run Automated Setup
Option A: Local Terminal (macOS / Linux / Windows)
macOS / Linux:
chmod +x setup.sh && ./setup.shWindows (PowerShell):
powershell -ExecutionPolicy Bypass -File .\setup.ps1
Option B: Docker (Containerized Testing)
# Verify connection inside container
docker compose run --rm memorysync-starter
# Run programmatic Python client test
docker compose run --rm test3. Open in Cursor
Open this folder in Cursor IDE:
cursor .4. Verify MCP Connection
Open Cursor Settings (
Cmd + ,orCtrl + ,) > Features > MCP.You will see two active servers:
memorysync(https://mcp.memorysync.io/mcp) — For persistent memory storage & semantic search.memorysync-docs(https://docs.memorysync.io/mcp) — Instant live documentation search without sign-up.
Terminal Memory Inspector
Inspect and verify saved memories directly from your terminal without opening a browser:
# macOS / Linux
./tools/inspect_memory.sh ping
./tools/inspect_memory.sh stats -k "ms_live_..."
./tools/inspect_memory.sh query "PostgreSQL configuration" -k "ms_live_..."
# Windows PowerShell
.\tools\inspect_memory.ps1 -Command ping
.\tools\inspect_memory.ps1 -Command stats -ApiKey "ms_live_..."
.\tools\inspect_memory.ps1 -Command query -Query "PostgreSQL configuration" -ApiKey "ms_live_..."How It Works
+-------------------------------------------------------------+
| Cursor Composer |
+------------------------------+------------------------------+
| 1. Store Decision (e.g. "We use FastAPI async")
v
+-------------------------------------------------------------+
| MemorySync Remote MCP Server |
| (https://mcp.memorysync.io) |
+------------------------------+------------------------------+
| 2. Hybrid keyword + vector recall
v
+-------------------------------------------------------------+
| Fresh Chat Session: Automatically applies past rule |
+-------------------------------------------------------------+Small context: Injects the few facts relevant to the task instead of replaying raw chat history.
Multi-Project Isolation: Memories are strictly scoped by project so your backend rules never leak into your frontend.
Inspectability: Every recalled fact references a verifiable memory ID.
Documentation & Resources
Cursor Guide: https://docs.memorysync.io/guides/cursor
MCP Integration Docs: https://docs.memorysync.io/mcp/overview
Live Zero-Signup Docs MCP: https://docs.memorysync.io/mcp
Available Tools
7 toolsmemorysync_addSave a durable project memoryA
Persist one fact so it survives after this conversation ends: an architectural decision, a convention the user asked you to follow, or a constraint that will still be true next session. Call this when the user states a lasting preference or you settle a design question. Do not call it for transient chat, for content already returned by memorysync_search, or for anything a later session would be misled by. Save one discrete fact per call rather than a conversation summary.
Inputs: text (required), source, metadata. Returns: id, status
memorysync_decisionsList recorded decisions and contradictionsARead-only
Return memories that record decisions, along with any that contradict each other, so a superseded choice is visible rather than silently competing with the current one. Call this before proposing an architectural change, to check whether the question was already settled and why. This surfaces conflict between stored facts; memorysync_search returns matches without telling you when two of them disagree.
Inputs: k, query. Returns: decisions
memorysync_forgetDelete memories (previews by default)ADestructiveIdempotent
Permanently delete one or more memories by id. Use this when a stored fact is wrong or the user asks you to forget something - not to tidy up, because a deleted memory cannot be recovered. This previews by default: it reports what would be deleted and deletes nothing until dry_run is explicitly set to false. Confirm with the user before that second call. To find the ids to pass, use memorysync_search.
Inputs: memory_ids (required), reason, dry_run. Returns: dry_run, deleted_ids, deleted_count
memorysync_getRead one memory in fullARead-only
Fetch the complete stored record for a single memory id, including its text, tags, importance and timestamps. Use this after memorysync_search when a result looks relevant but the snippet is not enough to act on, or when you need the creation date to judge whether a fact is stale. Takes an id, not a search phrase - to find a memory by topic, call memorysync_search first and pass an id from its results.
Inputs: memory_id (required). Returns: id, tags, text, created_at, +2 more
memorysync_read_docsRead MemorySync product documentationARead-only
Look up MemorySync's own public documentation: REST endpoints, SDK usage, MCP configuration, and integration guides. Call this before writing MemorySync integration code, so method names and parameters come from current docs rather than recall. Returns documentation text for the requested topic. This reads MemorySync product documentation only - to retrieve facts about the user's own project, use memorysync_search instead.
Inputs: topic (required). Returns: url, topic, content
memorysync_searchSearch saved project memoriesARead-only
Retrieve facts previously saved about THIS project and user: architectural decisions, naming conventions, pinned dependency versions, and stated preferences. Call this before answering questions about how the project is built, and before re-asking the user something they may have already told you. Returns ranked matches with an id and a relevance score. This searches the user's own stored memories only - to look up how MemorySync itself works, use memorysync_read_docs instead.
Inputs: query (required), k. Returns: count, results
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct operation: id-based fetch, graph traversal, decision conflict search, deletion, addition, docs lookup, and relevance search. Descriptions explicitly contrast the overlapping retrieval tools (search vs related vs decisions), leaving no ambiguity.
All tools share the memorysync_ prefix and use snake_case, but verbs and nouns are mixed: get, add, forget, search, and read_docs are verb-led, while related and decisions are noun-led. This is a minor deviation from a fully consistent verb_noun pattern.
Seven tools is a well-scoped set for a memory server, covering creation, retrieval by id, search, related-fact traversal, decision conflict detection, deletion, and self-documentation. No tools feel redundant and none are missing from the core set.
The surface covers create, read (multiple modes), and delete, plus graph and decision-specific retrieval. The notable gap is a dedicated update tool, though the documented workflow of forget-then-add mitigates it.
Maintenance
Related MCP Connectors
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Hosted persistent memory with semantic search, importance and TTL for AI agents.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server implementation that enables interaction with the Letta API for managing agents, memory blocks, and tools in the Letta system.3680MIT
- AlicenseNot gradedqualityDmaintenanceUniversal AI memory layer that provides cross-client, cross-repo context management with semantic search, automatic code indexing, and session management. Enables persistent developer memory across projects with typed memories, graph-based relationships, and RAG-powered retrieval.6MIT
- AlicenseNot gradedqualityBmaintenancePersistent memory layer for AI agents with entity resolution, PII detection, AES-256-GCM encryption at rest, and hybrid search. Self-hosted. 100% on LoCoMo benchmark.401 PyPI17MIT
- AlicenseNot gradedqualityCmaintenancePersistent knowledge memory layer for AI agents. Hybrid semantic + full-text search with pgvector, code dependency graph with blast-radius impact analysis, and incremental indexing for 7 languages. In-process ONNX embeddings, no external API required.34MIT