home / mcp / memory pouchdb mcp server
simple memory mcp server with custom memory location
Configuration
View docs{
"mcpServers": {
"bneil-mcp-memory-pouchdb": {
"command": "node",
"args": [
"/path/to/mcp-memory-pouchdb/dist/index.js"
],
"env": {
"POUCHDB_PATH": "<path-to-pouchdb-directory>",
"MEMORY_FILE_PATH": "<path-to-memory.json>",
"DISABLE_MEMORY_FILE": "<true|false>"
}
}
}
}You can deploy and use a Memory Custom MCP Server that stores interactions and memory data in a robust PouchDB-backed knowledge graph. This setup helps you organize project-specific memories, track timestamps, and retrieve relevant context during conversations with an LLM-driven client.
Start by launching the Memory MCP Server within your client workflow. The server provides a memory graph you can read from and write to during conversations with your language model. Begin each session by initializing memory access, identify the default user, and then retrieve and update memory as you interact. You can create entities, connect them with relations, and store observations with timestamps to maintain a clear history of interactions.
Prerequisites: ensure you have Node.js version 16 or higher installed on your system.
Install via Smithery for quick setup:
npx -y @smithery/cli install @bneil/mcp-memory-pouchdb --client claudeClone the repository and install dependencies:
git clone [email protected]:bneil/mcp-memory-pouchdb.git
cd mcp-memory-pouchdb
npm installBuild and run the server locally:
npm run build
node dist/index.jsTo run the Memory MCP Server, you need two environment variables: MEMORY_FILE_PATH and POUCHDB_PATH. You can place the server in your Claude Desktop configuration under the mcpServers section.
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/mcp-memory-pouchdb/dist/index.js"],
"env": {
"MEMORY_FILE_PATH": "/path/to/custom/memory.json",
"POUCHDB_PATH": "/path/to/custom/pouchdb_directory",
"DISABLE_MEMORY_FILE": "true"
}
}
}
}Optional environment variables you may provide: - POUCHDB_OPTIONS: JSON string of additional PouchDB configuration options - DISABLE_MEMORY_FILE: Set to "true" to disable saving to memory.json and rely solely on PouchDB storage.
If the server fails to start, confirm that MEMORY_FILE_PATH and POUCHDB_PATH are set and point to valid directories. Check that the run command uses the exact path to the built index file and that you started the server with the proper node invocation.
When you update memory during a session, ensure you follow the recommended steps to create entities, connect them with relations, and store observations with timestamps for coherent history.
Get current time from the server to timestamp interactions.
Set a new memory file path for a specific project.
Create entities and relations to model user data and interactions.
Add observations to capture details of conversations and events.
Read the graph to retrieve memory when beginning a session.
Keep file paths and access controls secure. Regularly back up the PouchDB store and memory files to prevent data loss. Rotate credentials and review environment variables to minimize exposure.
Retrieve the current timestamp from the server for consistent logging and memory observations.
Specify or update the absolute path where memory backup data is stored.
Create new memory entities (e.g., people, organizations, events) used in the knowledge graph.
Connect entities with relationships to form a graph structure.
Record factual observations about entities and events with timestamps.
Remove entities from memory when they are no longer relevant.
Remove observations that are no longer accurate or needed.
Remove relationships between entities.
Query the memory graph to retrieve related entities and observations.
Find nodes in memory by name, type, or attributes.
Access detailed information for a specific memory node.