Automate Context Management for AI Tools
MCP server that provides AI models with persistent context for tools, rules, and syntax preferences that persist across chat sessions, preventing context loss
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Enhance AI model performance by providing persistent, context-aware information across sessions. This asset ensures consistent tool usage, syntax adherence, and automatic corrections for improved AI application development and deployment.
Outcomes
What it gets done
Install and configure a static MCP server for context provision.
Manage persistent context for tools, rules, and syntax preferences.
Apply automatic syntax corrections and enforce tool-specific rules.
Dynamically create, update, and optimize context files.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-mcp-context-provider | bash Capabilities
Tools your agent gets
Get context rules for a specific tool
Get syntax transformation rules
Show all loaded context categories
Apply automatic syntax corrections
Initialize a session with memory service integration
Get detailed session initialization status
Create new context files dynamically with validation
Update existing context rules with backup and validation
Overview
MCP Context Provider MCP Server
static MCP server providing persistent context for tools, rules, and syntax preferences when you need persistent context that survives Claude Desktop restarts and automatic enforcement of tool-specific rules
What it does
A static MCP server that provides persistent context for tools, rules, and syntax preferences. The server automatically loads context files from the /contexts directory and supports DokuWiki, Terraform, Azure, Git, and general preferences.
The server exposes 13 tools including get_tool_context, get_syntax_rules, list_available_contexts, apply_auto_corrections, execute_session_initialization, get_session_status, create_context_file, update_context_rules, add_context_pattern, analyze_context_effectiveness, suggest_context_optimizations, get_proactive_suggestions, and auto_optimize_context.
Features include persistent context that persists across Claude Desktop restarts, automatic enforcement of tool-specific rules and syntax preferences, automatic syntax transformations (e.g., Markdown → DokuWiki), context management with version control, dynamic creation and management of context files, and an intelligent learning system. Version 1.6.0+ includes an intelligent learning system that requires integration with mcp-memory-service for advanced capabilities.
Quick install (Unix/Linux/macOS):
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
./scripts/install.sh
Claude Desktop configuration:
{
"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"
}
}
}
}
Source README
A static MCP server that provides AI models with persistent context for tools, rules, and syntax preferences that persist across chat sessions, preventing context loss and enabling automatic corrections.
Installation
Automatic Installation (Unix/Linux/macOS)
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
./scripts/install.sh
Automatic Installation (Windows)
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
.\scripts\install.bat
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
dxt unpack mcp-context-provider-1.2.1.dxt ~/mcp-context-provider
cd ~/mcp-context-provider
python -m venv venv
source venv/bin/activate
pip install mcp>=1.9.4
From Source Code
git clone https://github.com/doobidoo/MCP-Context-Provider.git
cd MCP-Context-Provider
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Configuration
Claude Desktop (Virtual Environment)
{
"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"
}
}
}
}
Claude Desktop (System Python)
{
"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"
}
}
}
}
Available Tools
| Tool | Description |
|---|---|
get_tool_context |
Get context rules for a specific tool |
get_syntax_rules |
Get syntax transformation rules |
list_available_contexts |
Show all loaded context categories |
apply_auto_corrections |
Apply automatic syntax corrections |
execute_session_initialization |
Initialize a session with memory service integration |
get_session_status |
Get detailed session initialization status |
create_context_file |
Create new context files dynamically with validation |
update_context_rules |
Update existing context rules with backup and validation |
add_context_pattern |
Add patterns for automatic section triggering for memory integration |
analyze_context_effectiveness |
Analyze context effectiveness with memory-based insights |
suggest_context_optimizations |
Generate global optimization suggestions based on usage patterns |
get_proactive_suggestions |
Provide proactive context suggestions to improve workflow |
auto_optimize_context |
Automatically optimize contexts based on learning engine recommendations |
Features
- Persistent context that persists across Claude Desktop restarts
- Automatic enforcement of tool-specific rules and syntax preferences
- Context rules for DokuWiki, Terraform, Azure, Git, and other tools
- Automatic syntax transformations (e.g., Markdown → DokuWiki)
- Context management with version control for enterprise use
- Dynamic creation and management of context files
- Intelligent learning system that analyzes context effectiveness
- Integration with memory service for persistent learning data
- Automatic context optimization based on usage patterns
- Proactive suggestions to improve your workflow
Environment Variables
Required
CONTEXT_CONFIG_DIR- Path to the directory containing context configuration files
Optional
AUTO_LOAD_CONTEXTS- Enable automatic loading of context files on startupENVIRONMENT- Load context for a specific environment (e.g., 'prod')
Usage Examples
Get DokuWiki syntax rules for documentation formatting
Apply automatic syntax corrections to convert Markdown to DokuWiki format
Show all available tool contexts and their categories
Get Terraform naming conventions and best practices
Apply Azure resource naming compliance rules automatically
Notes
The server automatically loads context files from the /contexts directory and supports DokuWiki, Terraform, Azure, Git, and general preferences. Version 1.6.0+ includes an intelligent learning system that requires integration with mcp-memory-service for advanced capabilities. Context files follow a JSON structure with tool categories, syntax rules, preferences, and automatic corrections.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.