MCP Context Provider
The stable, glowing orb at the center represents the persistent context that survives across chat sessions. The flowing data streams show how ongoing conversations connect to and draw from this stable core of information, preventing context loss.
A static MCP (Model Context Protocol) server that provides AI models with persistent tool context, preventing context loss between chat sessions. This server automatically loads and injects tool-specific rules, syntax preferences, and best practices at Claude Desktop startup.
Overview
The Context Provider acts as a persistent neural core for your AI interactions, eliminating the need to re-establish context in each new chat session by:
- 🔄 Persistent Context: Like the stable orb in the visualization, rules and preferences survive across Claude Desktop restarts
- ⚡ Automatic Injection: Context flows seamlessly into every conversation, just as the data streams connect to the central core
- 🎯 Tool-Specific: Each tool gets its own context rules and syntax preferences, creating specialized knowledge pathways
- 🔧 Auto-Corrections: Automatic syntax transformations (e.g., Markdown → DokuWiki) ensure consistency across all interactions
- 📈 Scalable: Easy to add new tools and context rules, expanding the knowledge network
- 🏢 Enterprise-Ready: Version-controlled context management provides organizational stability
The Neural Network Metaphor
Just like the image depicts, your MCP Context Provider functions as:
- Central Orb: The stable, persistent context core that maintains consistency
- Neural Pathways: Tool-specific context rules that create specialized knowledge channels
- Data Streams: Individual chat sessions that flow through and benefit from the persistent context
- Network Stability: Prevents the ephemeral nature of conversations from losing important contextual information
Quick Start
Option 1: Automated Installation (Recommended)
The easiest way to install MCP Context Provider is using the provided installation scripts:
Unix/Linux/macOS:
Windows:
The installation script automatically:
- Builds the latest DXT package from source
- Creates a Python virtual environment
- Installs all required dependencies
- Configures Claude Desktop settings
Option 2: Manual Installation from DXT
Option 3: Installation from Source
2. Configuration
Update your Claude Desktop configuration file:
Configuration File Location:
- Linux:
~/.config/claude/claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
For Virtual Environment Installation (Recommended):
For System Python Installation:
Important: Replace /path/to/mcp-context-provider
with the actual installation path.
3. Verify Installation
Run the verification script to ensure everything is configured correctly:
4. Restart Claude Desktop
After updating the configuration, restart Claude Desktop to load the MCP server.
How It Works
Architecture
- Context Provider Server: Python MCP server that loads JSON context files
- Context Files: Tool-specific rules stored in
/contexts
directory - Claude Desktop Integration: MCP server registered in configuration
- Automatic Loading: Context is injected at startup and persists across chats
Context Flow
Available Tools
Once loaded, the following tools are available in all chat sessions:
Core Context Tools:
get_tool_context
: Get context rules for specific toolget_syntax_rules
: Get syntax conversion ruleslist_available_contexts
: List all loaded context categoriesapply_auto_corrections
: Apply automatic syntax corrections
Phase 1 - Session Management:
execute_session_initialization
: Initialize session with memory service integrationget_session_status
: Retrieve detailed session initialization status
Phase 2 - Dynamic Context Management:
create_context_file
: Create new context files dynamically with validationupdate_context_rules
: Update existing context rules with backup and validationadd_context_pattern
: Add patterns to auto-trigger sections for memory integration
Phase 3 - Intelligent Learning (v1.6.0+):
analyze_context_effectiveness
: Analyze context effectiveness with memory-driven insightssuggest_context_optimizations
: Generate global optimization suggestions based on usage patternsget_proactive_suggestions
: Provide proactive context suggestions for workflow improvementauto_optimize_context
: Automatically optimize contexts based on learning engine recommendations
Screenshot showing the MCP Context Provider in action within Claude Desktop. The tool automatically detects and lists all available context categories (dokuwiki, terraform, azure, git, general_preferences) and provides interactive access to tool-specific rules and guidelines.
Context Files
The server loads context files from the /contexts
directory:
dokuwiki_context.json
: DokuWiki syntax rules and preferencesterraform_context.json
: Terraform naming conventions and best practicesazure_context.json
: Azure resource naming and compliance rulesgit_context.json
: Git commit conventions and workflow patternsgeneral_preferences.json
: Cross-tool preferences and standards
Context File Structure
Each context file follows this pattern:
Examples
DokuWiki Syntax Conversion
Input (Markdown):
Auto-converted to DokuWiki:
Azure Resource Naming
Input: storage_account_logs_prod
Auto-corrected to: stlogsprod
(following Azure naming conventions)
Git Commit Messages
Input: Fixed the login bug
Auto-corrected to: fix: resolve login authentication issue
Adding New Context
To add support for a new tool:
- Create a new JSON file:
contexts/{toolname}_context.json
- Follow the standard context structure
- Restart Claude Desktop to load the new context
The server automatically detects and loads any *_context.json
files in the contexts directory.
Benefits
For Developers
- No need to re-establish context in new chats
- Automatic syntax corrections save time
- Consistent formatting across all work
- Best practices automatically applied
For Teams
- Shared context rules across team members
- Version-controlled standards
- Consistent code and documentation formatting
- Enterprise compliance automatically enforced
For Organizations
- Centralized context management
- Scalable across multiple tools
- Audit trail of context changes
- Easy deployment and updates
🧠 Phase 3: Intelligent Learning System (v1.6.0+)
Revolutionary Learning Capabilities
Version 1.6.0 introduces the Synergistic Integration with Intelligent Learning system, transforming the MCP Context Provider from a static configuration tool into an intelligent, self-improving context evolution platform.
🎯 Key Learning Features
Intelligent Context Evolution
- Automatic Effectiveness Analysis: Contexts self-analyze based on usage patterns and memory data
- Smart Optimization Suggestions: AI-driven recommendations for context improvements
- Auto-Optimization: Contexts automatically improve through pattern learning and preference tuning
- Proactive Intelligence: Suggests missing tool contexts and workflow enhancements
Real Memory Service Integration
- Persistent Learning: Full integration with
mcp-memory-service
for persistent learning data - Usage Pattern Tracking: Comprehensive tracking of context modifications and effectiveness
- Memory-Driven Insights: Historical data analysis for continuous improvement
- Team Knowledge Propagation: Shared learning insights across team members
Advanced MCP Tools
4 new intelligent tools for context management:
analyze_context_effectiveness
: Memory-driven effectiveness analysissuggest_context_optimizations
: Global optimization recommendationsget_proactive_suggestions
: Workflow improvement suggestionsauto_optimize_context
: Automatic context optimization based on learning
🔄 Learning Workflow
📊 Learning Metrics
The system tracks and analyzes:
- Context Effectiveness Scores (0.0-1.0 scale)
- Usage Pattern Recognition (frequency, modifications, interactions)
- Session Performance Optimization (sub-second initialization targets)
- Memory-Driven Trend Analysis (historical usage and improvement data)
🚀 Phase 3 Setup
Prerequisites: Requires mcp-memory-service
integration
- Configure Memory Service (
.mcp.json
):
- Test Learning Features:
📚 Phase 3 Documentation
- Learning System Guide: Comprehensive guide to intelligent features
- API Reference: Complete API documentation for learning components
- Examples & Use Cases: Practical examples and enterprise use cases
🎉 Implementation Roadmap Complete
✅ Phase 1: Session initialization with memory service integration ✅ Phase 2: Dynamic context file creation and management ✅ Phase 3: Synergistic integration with intelligent learning
The MCP Context Provider now offers enterprise-ready intelligent context evolution with self-improving contexts that learn from usage patterns and automatically optimize through real memory service integration.
Advanced Usage
Custom Context Rules
Create your own context files by following the established pattern. The server supports:
- Regex-based auto-corrections
- Tool-specific preferences
- Conditional formatting rules
- Multi-tool context inheritance
Environment-Specific Context
Use environment variables to load different context sets:
Troubleshooting
Common Issues
- Context not loading: Check file path in Claude Desktop config
- Server not starting: Verify Python dependencies installed
- Rules not applying: Check JSON syntax in context files
See TROUBLESHOOTING.md for detailed solutions.
Documentation
- Context Guide: Complete context file reference
- Developer Guide: Creating custom contexts
- Examples: Real-world usage examples
- Troubleshooting: Common issues and solutions
📚 Wiki & Use Cases
Explore advanced integrations and real-world use cases in our Community Wiki:
- Wiki Homepage: Comprehensive guide to what the Context Provider is good for
- AppleScript with Memory Integration: Advanced workflow showcasing intelligent script management with persistent memory
- Integration Examples: Community-driven examples of Context Provider workflows
- Best Practices: Tips and patterns for maximizing Context Provider effectiveness
The wiki demonstrates how the Context Provider transforms from simple rule storage into intelligent, self-improving workflow automation.
DXT Package Distribution
The MCP Context Provider is available as a Desktop Extension (DXT) package for easy distribution and installation:
- Package:
mcp-context-provider-1.0.0.dxt
(18.6 MB) - Contents: Complete server with all dependencies bundled
- Platform: Windows, macOS, Linux with Python 3.8+
- Dependencies: Self-contained (no external pip requirements)
Building DXT Package
To build your own DXT package from source:
Distribution Notes
- The DXT package includes all Python dependencies (MCP SDK, Pydantic, etc.)
- Total unpacked size: ~45 MB including all dependencies
- Optimized for offline installation and deployment
- Compatible with corporate environments and air-gapped systems
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-context
- Add your context file to
/contexts
- Test with your Claude Desktop setup
- Submit a pull request
License
MIT License - see LICENSE file for details.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Provides persistent tool context that survives across Claude Desktop chat sessions, automatically injecting tool-specific rules, syntax preferences, and best practices. Eliminates the need to re-establish context in each new conversation.
Related MCP Servers
- AsecurityFlicenseAqualityProvides sophisticated context management for Claude, enabling persistent context across sessions, project-specific organization, and conversation continuity.Last updated -415
- -securityFlicense-qualityA Model Context Protocol server for Claude Desktop that provides structured memory management across chat sessions, allowing Claude to maintain context and build a knowledge base within project directories.Last updated -3
- -securityFlicense-qualityCreates and maintains a semantic knowledge graph of code that allows maintaining context across sessions with Claude, providing advanced search capabilities without requiring the entire codebase in the context window.Last updated -5
- -securityAlicense-qualityA Model Context Protocol server that provides persistent memory and conversation continuity for Claude Desktop and Claude Code, allowing users to save and restore project context when threads hit token limits.Last updated -MIT License