- Home
- MCP servers
- RAG Context
RAG Context
- typescript
2
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"notbnull-mcp-rag-context": {
"command": "npx",
"args": [
"@rag-context/mcp-server"
],
"env": {
"RAG_CONTEXT_DATA_DIR": "/path/to/your/data/directory"
}
}
}
}You use the RAG Context MCP Server to store and retrieve contextual information locally, enabling AI assistants to remember user preferences, project details, and other important context across conversations. It combines local vector storage with a persistent SQLite database and offers simple tools for setting and retrieving context, all while keeping your data private and online-free.
How to use
You interact with two tools to manage memory in your MCP client: setContext to store information and getContext to retrieve relevant context. When you store context, you provide a unique key, the content you want to remember, and optional metadata. When you retrieve context, you supply a natural language query, and you receive results that balance semantic similarity with quick, indexed lookups.
Practical usage patterns include storing user preferences, project configurations, and code snippets, then recalling them when you start a new conversation or work on related tasks. The system blends semantic search with precise database lookups to return useful results even as your memory grows.
Example payloads illustrate how to store and retrieve data without exposing underlying communication details.
{
"tool": "setContext",
"arguments": {
"key": "user_preferences",
"content": "The user prefers dark mode and uses VS Code as their primary editor",
"metadata": {
"category": "preferences",
"timestamp": "2024-01-15"
}
}
}
getContext usage example
Retrieve context with a natural language query, setting a limit for results and a threshold to balance precision and recall.
{
"tool": "getContext",
"arguments": {
"query": "What are the user's editor preferences?",
"limit": 5,
"threshold": 0.7
}
}
Available tools
setContext
Stores information in memory with automatic vectorization, accepting a key, content, and optional metadata for later retrieval.
getContext
Retrieves relevant context by performing semantic search on stored content and returning matching items based on a query, limit, and threshold.