MCP server for memory management using Qdrant vector database
npm install memory-qdrant-mcpbash
npx memory-qdrant-mcp
`
This will download and run the server automatically.
$3
`bash
npm install -g memory-qdrant-mcp
memory-qdrant-mcp
`
$3
`bash
git clone
cd memory-qdrant-mcp
npm install
npm run build # if needed
node server/index.js
`
Prerequisites
- Qdrant Database: The server requires a running Qdrant instance
Option 1: Simple Docker run
`bash
docker run -p 6333:6333 qdrant/qdrant
`
Option 2: Docker Compose (Recommended for production)
Create a docker-compose.yml file:
`yaml
services:
qdrant:
image: qdrant/qdrant:latest
container_name: qdrant
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
environment:
QDRANT__SERVICE__CORS: "true"
volumes:
- qdrant_data:/qdrant/storage
volumes:
qdrant_data:
driver: local
`
Then run:
`bash
docker-compose up -d
`
- Environment Variables: Copy .env.example to .env and configure:
`bash
cp .env.example .env
`
Embedding Provider (choose one):
`env
# Option 1: Google Gemini (fast, recommended - uses Gemini for both embedding and summarization)
GEMINI_API_KEY=your_gemini_api_key_here
# Option 2: Ollama (local, free, slower)
OLLAMA_BASE_URL=http://localhost:11434
# Option 3: OpenRouter + Gemini/Ollama (OpenRouter for summarization, Gemini/Ollama for embedding)
OPENROUTER_API_KEY=your_openrouter_api_key_here
`
Model Configuration (optional, defaults provided):
`env
EMBEDDING_MODEL=models/gemini-embedding-001 # Gemini embedding model (use nomic-embed-text:v1.5 for Ollama)
SUMMARIZER_MODEL=openai/gpt-oss-20b:free # OpenRouter default (auto-switches to Gemini if no OpenRouter key)
DEFAULT_TOP_K_MEMORY_QUERY=3 # Search result limit
`
Required:
`env
QDRANT_URL=http://localhost:6333
`
MCP Configuration
$3
Create or update the MCP settings file at:
- Windows: %APPDATA%\Code\User\globalStorage\github.copilot-chat\settings\mcp.json
- macOS: ~/Library/Application Support/Code/User/globalStorage/github.copilot-chat/settings/mcp.json
- Linux: ~/.config/Code/User/globalStorage/github.copilot-chat/settings/mcp.json
Add the following configuration:
`json
{
"mcpServers": {
"memory-qdrant-mcp": {
"command": "npx",
"args": ["memory-qdrant-mcp"],
"env": {
"QDRANT_URL": "http://localhost:6333",
"GEMINI_API_KEY": "your_gemini_api_key_here",
"OPENROUTER_API_KEY": "your_openrouter_api_key_here",
"OLLAMA_BASE_URL": "http://localhost:11434",
"EMBEDDING_MODEL": "models/gemini-embedding-001",
"DEFAULT_TOP_K_MEMORY_QUERY": "3",
"SUMMARIZER_MODEL": "openai/gpt-oss-20b:free"
}
}
}
}
`
$3
Add to your Roo MCP settings:
`json
{
"mcpServers": {
"memory-qdrant-mcp": {
"command": "npx",
"args": ["memory-qdrant-mcp"]
}
}
}
`
Available Tools
$3
#### log_memory
Log a memory entry to the vector database.
Parameters:
- project_name (string): Name of the project
- memory_type (string): Type of memory (productContext, activeContext, systemPatterns, decisionLog, progress)
- content (string): Content to log
- top_level_id (string, optional): Optional top level ID
#### query_memory
Query memory entries from the vector database.
Parameters:
- project_name (string): Name of the project
- query_text (string): Query text for semantic search
- memory_type (string, optional): Optional memory type filter
- top_k (number, optional): Number of results to return (default: 3)
#### log_decision
Log a decision entry.
Parameters:
- project_name (string): Name of the project
- decision_text (string): Decision text
- top_level_id (string, optional): Optional top level ID
#### log_progress
Log a progress entry.
Parameters:
- project_name (string): Name of the project
- progress_text (string): Progress text
- top_level_id (string, optional): Optional top level ID
#### summarize_text
Summarize the given text.
Parameters:
- text (string): Text to summarize
$3
#### initialize_workspace
Initialize a new workspace with automatic project detection and memory bank setup.
Parameters:
- projectName (string): Name of the project
- workspaceInfo (object): Workspace information containing files and directories
- files (array): List of file paths in the workspace
- directories (array): List of directory paths in the workspace
#### sync_memory
Synchronize memory bank with current workspace state and log any changes.
Parameters:
- projectName (string): Name of the project
- workspaceInfo (object): Current workspace information
- files (array): List of current file paths
- directories (array): List of current directory paths
$3
#### export_memory_to_markdown
Export all memory entries for a project to markdown files.
Parameters:
- projectName (string): Name of the project
- outputPath (string, optional): Output directory path (default: "./memory-bank")
#### import_memory_from_markdown
Import memory entries from markdown files into the vector database.
Parameters:
- projectName (string): Name of the project
- inputPath (string, optional): Input directory path (default: "./memory-bank")
$3
#### analyze_conversation
Analyze a conversation and automatically log relevant information to memory.
Parameters:
- projectName (string): Name of the project
- conversation (string): The conversation text to analyze
- context (string, optional): Additional context about the conversation
Publishing to npm
To publish your own version:
1. Update package.json with your information:
- Change name to a unique package name
- Update author, repository, homepage
- Ensure version is appropriate
2. Login to npm:
`bash
npm login
`
3. Publish:
`bash
npm publish
`
4. Users can then install and run:
`bash
npx your-package-name
`
Development
$3
`
memory-qdrant-mcp/
├── server/
│ ├── index.js # Main MCP server
│ ├── mcp_tools/ # MCP tool implementations
│ │ ├── memoryBankTools.js
│ │ ├── store.js
│ │ └── summarizer.js
│ ├── embeddings/ # Embedding providers
│ │ ├── providerBase.js
│ │ ├── geminiVertex.js
│ │ ├── ollama.js
│ │ └── fastEmbed.js
│ ├── cache.js # LRU caching implementation
│ └── config.js # Configuration
├── test/ # Test files
│ ├── memoryBankTools.test.js
│ └── mcpServer.integration.test.js
├── babel.config.cjs # Babel configuration for testing
├── jest.config.cjs # Jest configuration
├── package.json
└── README.md
`
$3
1. Implement the tool in server/mcp_tools/
2. Register it in server/index.js
3. Update this README
Testing
The project includes comprehensive testing using MCP Inspector for protocol compliance:
$3
`bash
npx @modelcontextprotocol/inspector node server/index.js
`
This will start the MCP Inspector at http://localhost:6274` where you can test all MCP tools interactively.