Store and retrieve memories across OpenCode sessions.
cd /home/naresh/Projects/mcp-memory-server
npm installnpm startMemories are saved to: ~/Documents/memory-mcp/memories.json
Add to your OpenCode config (~/.config/opencode/opencode.jsonc):
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/home/naresh/Projects/mcp-memory-server/server.js"]
}
}
}Store a new memory.
Input:
content: The memory content (required)type: Type of memory - preference, context, decision, learning (required)tags: Array of tags (optional)namespace: Namespace for organization (default: global)
Example:
{
"content": "Always use TypeScript, prefer Tailwind CSS",
"type": "preference",
"tags": ["typescript", "css", "ui"],
"namespace": "voice-assistant"
}Search memories by query, type, tags, or namespace.
Input:
query: Search in content and tags (optional)type: Filter by memory type (optional)tags: Filter by tags (optional)namespace: Filter by namespace (optional)
Retrieve a memory by ID.
Input:
id: The memory ID (required)
Update an existing memory by ID.
Input:
id: The memory ID (required)content: New content (optional)type: New type (optional)tags: New tags (optional)namespace: New namespace (optional)
Delete a memory by ID.
Input:
id: The memory ID (required)
List all memories, optionally filtered.
Input:
namespace: Filter by namespace (optional)type: Filter by type (optional)
{
"id": "abc123",
"content": "User prefers Tailwind CSS",
"type": "preference",
"tags": ["css", "tailwind"],
"namespace": "voice-assistant",
"createdAt": "2026-02-11T10:00:00.000Z",
"updatedAt": "2026-02-11T10:00:00.000Z",
"accessCount": 0
}