MCP server with Ollama + Vectra for semantic memory and RAG operations
npm install @arcaelas/rag


MCP server with Ollama + Vectra for semantic memory and RAG operations.
Build intelligent AI agents with persistent semantic memory - Store, search, and retrieve knowledge using vector embeddings, powered by local Ollama models and Vectra vector database.
- 🧠 Semantic memory with vector embeddings
- 🔍 Semantic search using similarity
- 📦 Bulk import/export via JSONL
- 🚀 Local-first with Ollama and Vectra
- 🔧 Zero configuration with sensible defaults
- Node.js >= 18
- Ollama running locally
- An embedding model installed (e.g., ollama pull nomic-embed-text)
Add to your ~/.claude.json:
``json`
{
"mcpServers": {
"rag": {
"command": "npx",
"args": ["-y", "@arcaelas/rag"],
"env": {
"OLLAMA_HOSTNAME": "http://localhost:11434",
"OLLAMA_MODEL_NAME": "nomic-embed-text"
}
}
}
}
`bash
npm install -g @arcaelas/rag
Then in
~/.claude.json:`json
{
"mcpServers": {
"rag": {
"command": "rag",
"args": [],
"env": {
"OLLAMA_HOSTNAME": "http://localhost:11434",
"OLLAMA_MODEL_NAME": "nomic-embed-text"
}
}
}
}
`Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
|
OLLAMA_HOSTNAME | http://localhost:11434 | Ollama server URL |
| OLLAMA_MODEL_NAME | nomic-embed-text | Embedding model name |Available Tools
$3
Save knowledge to semantic memory database.`typescript
await save("TypeScript is a typed superset of JavaScript", {
category: "programming",
importance: "high"
})
`$3
Search knowledge base using semantic similarity.`typescript
await search("typed javascript", 5)
`$3
List stored memories with pagination.`typescript
await list(0, 10)
`$3
Retrieve specific memory by ID.`typescript
await get("uuid-here")
`$3
Add tag to a memory.`typescript
await tag("uuid-here", "important")
`$3
Permanently delete a memory.`typescript
await destroy("uuid-here")
`$3
Bulk import memories from JSONL file.`typescript
await upload("/path/to/memories.jsonl")
// Returns: { filename, done: 299, error: [{ line: 297, error: "..." }] }
`$3
Export memories to JSONL file.`typescript
await download(0, 100, "/path/to/export.jsonl")
// Returns: { filename, offset, limit, count: 303 }
`JSONL Format
Each line in the JSONL file should be:
`json
{"context": "Your knowledge content here"}
`Optional fields:
`json
{
"context": "Content here",
"metadata": {
"category": "programming",
"importance": "high",
"project": "my-project"
},
"tags": "tag1,tag2,tag3"
}
`Data Storage
Vector database is stored in:
- npx/global install:
~/.cache/@arcaelas/rag/data/
- Local install: Collection name:
arcaelas_mcp_rag_collectionDevelopment
`bash
Clone repository
git clone https://github.com/arcaelas/rag.git
cd ragInstall dependencies
yarn installBuild
yarn buildRun locally
yarn startWatch mode
yarn dev
`Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
1. Fork the repository
2. Create your feature branch (
git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'feat: add amazing feature')
4. Push to the branch (git push origin feature/amazing-feature`)See SECURITY.md for security policies and reporting vulnerabilities.
See CHANGELOG.md for release history.
MIT © Miguel Guevara (Arcaela)
- npm Package
- GitHub Repository
- Issues & Bug Reports
- Model Context Protocol
- Ollama
- 📧 Email: arcaela.reyes@gmail.com
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions