by ttommyth
Enhance persistent memory with RAG Memory, merging Pinecone vector database and vector search with knowledge graph relat
β 44
GitHub stars
Creates a persistent knowledge graph with vector search that stores documents, entities, and relationships for intelligent information retrieval. Combines traditional graph-based connections with semantic similarity search.
RAG Memory is a community-built MCP server published by ttommyth that provides AI assistants with tools and capabilities via the Model Context Protocol. Enhance persistent memory with RAG Memory, merging Pinecone vector database and vector search with knowledge graph relat It is categorized under ai ml. This server exposes 20 tools that AI clients can invoke during conversations and coding sessions.
You can install RAG Memory in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
RAG Memory is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research β Summarize β Create document β Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
RAG Memory is a well-scoped MCP server in the explainx.ai directory β install snippets and categories matched our Claude Code setup.
We wired RAG Memory into a staging workspace; the listingβs GitHub and npm pointers saved time versus hunting across READMEs.
Strong directory entry: RAG Memory surfaces stars and publisher context so we could sanity-check maintenance before adopting.
We evaluated RAG Memory against two servers with overlapping tools; this profile had the clearer scope statement.
RAG Memory reduced integration guesswork β categories and install configs on the listing matched the upstream repo.
Useful MCP listing: RAG Memory is the kind of server we cite when onboarding engineers to host + tool permissions.
RAG Memory reduced integration guesswork β categories and install configs on the listing matched the upstream repo.
We evaluated RAG Memory against two servers with overlapping tools; this profile had the clearer scope statement.
RAG Memory is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
I recommend RAG Memory for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
showing 1-10 of 66
An advanced MCP server for RAG-enabled memory through a knowledge graph with vector search capabilities. This server extends the basic memory concepts with semantic search, document processing, and hybrid retrieval for more intelligent memory management.
Inspired by: Knowledge Graph Memory Server from the Model Context Protocol project.
Note: This server is designed to run locally alongside MCP clients (e.g., Claude Desktop, VS Code) and requires local file system access for database storage.
This server provides comprehensive memory management through the Model Context Protocol (MCP):
storeDocument: Store documents with metadata for processingchunkDocument: Create text chunks with configurable parametersembedChunks: Generate vector embeddings for semantic searchextractTerms: Extract potential entity terms from documentslinkEntitiesToDocument: Create explicit entity-document associationsdeleteDocuments: Remove documents and associated datalistDocuments: View all stored documents with metadatacreateEntities: Create new entities with observations and typescreateRelations: Establish relationships between entitiesaddObservations: Add contextual information to existing entitiesdeleteEntities: Remove entities and their relationshipsdeleteRelations: Remove specific relationshipsdeleteObservations: Remove specific observations from entitieshybridSearch: Advanced search combining vector similarity and graph traversalsearchNodes: Find entities by name, type, or observation contentopenNodes: Retrieve specific entities and their relationshipsreadGraph: Get complete knowledge graph structuregetKnowledgeGraphStats: Comprehensive statistics about the knowledge baseThis server is ideal for scenarios requiring intelligent memory and document understanding:
This section explains how to configure MCP clients to use the rag-memory-mcp server.
Add the following configuration to your claude_desktop_config.json (Claude Desktop) or mcp.json (Cursor):
{
"mcpServers": {
"rag-memory": {
"command": "npx",
"args": ["-y", "rag-memory-mcp"]
}
}
}
With specific version:
{
"mcpServers": {
"rag-memory": {
"command": "npx",
"args": ["-y", "[email protected]"]
}
}
}
With custom database path:
{
"mcpServers": {
"rag-memory": {
"command": "npx",
"args": ["-y", "rag-memory-mcp"],
"env": {
"MEMORY_DB_PATH": "/path/to/custom/memory.db"
}
}
}
}
Add the following configuration to your User Settings (JSON) file or .vscode/mcp.json:
{
"mcp": {
"servers": {
"rag-memory-mcp": {
"command": "npx",
"args": ["-y", "rag-memory-mcp"]
}
}
}
}
Entities are the primary nodes in the knowledge graph. Each entity has:
Example:
{
"name": "Machine Learning",
"entityType": "CONCEPT",
"observations": [
"Subset of artificial intelligence",
"Focuses on learning from data",
"Used in recommendation systems"
]
}
Relations define directed connections between entities, describing how they interact:
Example:
{
"from": "React",
"to": "JavaScript",
"relationType": "BUILT_WITH"
}
Observations are discrete pieces of information about entities:
Documents are processed through:
This enables hybrid search that combines:
MEMORY_DB_PATH: Path to the SQLite database file (default: memory.db in the server directory)This section is for developers looking to modify or contribute to the server.
package.json for version compatibilitygit clone https://github.com/ttommyth/rag-memory-mcp.git
cd rag-memory-mcp
npm install
npm run build
npm run watch # For development with auto-rebuild
npm run buildnpm run watchnpm run prepareHere's a typical workflow for building and querying a knowledge base:
// 1. Store a document
await storeDocument({
id: "ml_intro",
content: "Machine learning is a subset of AI...",
metadata: { type: "educational", topic: "ML" }
});
// 2. Process the document
await chunkDocument({ documentId: "ml_intro" });
await embedChunks({ documentId: "ml_intro" });
// 3. Extract and create entities
const terms = await extractTerms({ documentId: "ml_intro" });
await createEntities({
entities: [
{
name: "Machine Learning",
entityType: "CONCEPT",
observations: ["Subset of artificial intelligence", "Learns from data"]
}
]
});
// 4. Search with hybrid approach
const results = await hybridSearch({
query: "artificial intelligence applications",
limit: 10,
useGraph: true
});
For optimal memory utilization, consider using this system prompt:
You have access to a RAG-enabled memory system with knowledge graph capabilities. Follow these guidelines:
1. **Information Storage**:
- Store important documents using the document management tools
- Create entities for people, concepts, organizations, and technologies
- Build relationships between related concepts
2. **Information Retrieval**:
- Use hybrid search for comprehensive information retrieval
- Leverage both semantic similarity and graph relationships
- Search entities before creating duplicates
3. **Memory Maintenance**:
- Add observations to enrich entity context
- Link documents to relevant entities for better discoverability
- Use statistics to monitor knowledge base growth
4. **Processing Workflow**:
- Store β Chunk β Embed β Extract β Link
- Always process documents completely for best search results
Contributions are welcome! Please follow standard development practices and ensure all tests pass before submitting pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.
Built with: TypeScript, SQLite, sqlite-vec, Hugging Face Transformers, Model Context Protocol SDK
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
β Do
β Don't
π‘ Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
β Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
β Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.