home / mcp / mcp context provider
A static MCP server that provides AI models with persistent tool context, preventing context loss between chats.
Configuration
View docs{
"mcpServers": {
"doobidoo-mcp-context-provider": {
"command": "python",
"args": [
"context_provider_server.py"
],
"env": {
"AUTO_LOAD_CONTEXTS": "true",
"CONTEXT_CONFIG_DIR": "/path/to/mcp-context-provider/contexts",
"MCP_MEMORY_SQLITE_PATH": "/path/to/memory.db",
"MCP_MEMORY_STORAGE_BACKEND": "sqlite_vec"
}
}
}
}You deploy the MCP Context Provider to give AI models a persistent, tool-specific context that survives across chat sessions. It loads context rules and syntax preferences at startup, injects them into every conversation, and supports automatic corrections and intelligent learning for scalable, enterprise-ready context management.
You run the MCP Context Provider as a local or remote service and connect it through your MCP client. The provider exposes tool-specific context rules, syntax conversions, and memory-enabled learning features that stay available across sessions. In practice, you load the provider at startup, restart your client to rebind the server, and then interact with the context-enabled tools within any chat session. Use the available context methods to fetch rules, apply corrections, initialize sessions, and progressively optimize contexts based on usage.
Prerequisites: you need Python installed on your system. You may also use Node/NPM for helper tooling if you choose automated installation paths.
# Option A: Automated Installation (Recommended)
# Unix/Linux/macOS
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
./scripts/install.sh
# Windows
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
.\ ools\install.bat
```
```
# Option B: Manual Installation from DXT
npm install -g @anthropic-ai/dxt
wget https://github.com/doobidoo/MCP-Context-Provider/raw/main/mcp-context-provider-1.2.1.dxt
# Unpack to your preferred location
# dxt unpack mcp-context-provider-1.2.1.dxt ~/mcp-context-provider
# Then follow the local setup steps as described earlier
```
```
# Option C: Installation from Source
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtConfigure the client to load the MCP Context Provider. The configuration should point to the context directory, enable automatic loading, and specify how to start the provider. Use environment variables to customize paths and startup behavior.
{
"mcpServers": {
"context-provider": {
"command": "/path/to/mcp-context-provider/venv/bin/python",
"args": ["/path/to/mcp-context-provider/context_provider_server.py"],
"env": {
"CONTEXT_CONFIG_DIR": "/path/to/mcp-context-provider/contexts",
"AUTO_LOAD_CONTEXTS": "true"
}
}
}
}
```
```
# Alternative system Python installation
{
"mcpServers": {
"context-provider": {
"command": "python",
"args": ["context_provider_server.py"],
"cwd": "/path/to/MCP-Context-Provider",
"env": {
"CONTEXT_CONFIG_DIR": "./contexts",
"AUTO_LOAD_CONTEXTS": "true"
}
}
}
}
```
Replace the paths with your actual installation locations.You can run the verification script to ensure the setup is correct and then restart your client to load the MCP server. The provider loads context files from the configured contexts directory and registers itself so that all chats can access the same persistent rules and preferences.
Fetches the loaded context rules for a specific tool
Retrieves syntax conversion rules used by the provider
Lists all loaded context categories and their tools
Applies automatic syntax corrections across contexts
Initializes a chat session with memory service integration
Retrieves detailed status of session initialization
Dynamically create a new context file with validation
Update existing context rules with backup and validation
Add patterns to auto-trigger sections for memory integration
Analyze context effectiveness using memory-driven insights
Provide global optimization suggestions for contexts
Offer proactive context suggestions for workflow improvement
Automatically optimize contexts based on learning recommendations