Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Self-healing multi-agent system using ontologies and MCP to automatically adapt when database schemas change
Jump to setup instructionsNo tool list is on record. This does not mean the server has no tools. Tools were not run.
No setup evidence yet No matching config or report on record. This does not mean the server is incompatible.
Same catalog task: Manage databases & data.
MCP server for interacting with MySQL databases with write operations support
Same catalog task: Manage databases & data.
MCP server for DBX — query databases from Claude Code, Cursor, and other AI agents
Same catalog task: Manage databases & data.
Enhanced PostgreSQL MCP server with read and write capabilities. Based on @modelcontextprotocol/server-postgres by Anthropic.
GitHub checked 1h ago - refresh overdue
A production-ready self-healing multi-agent system that uses ontologies and MCP (Model Context Protocol) to automatically adapt when database schemas change.
This system solves a critical problem in modern AI agent deployments: when database schemas change, agent queries break. Instead of manually updating every agent and query, this system:
The result: agents continue working seamlessly even when databases evolve.
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Agents │─────▶│ MCP Server │─────▶│ Database │
│ (Analytics, │ │ (Ontology) │ │ (SQLite, │
│ Support) │ │ │ │ PostgreSQL)│
└─────────────┘ └──────┬───────┘ └─────────────┘
│
▼
┌─────────────────┐
│ Schema Monitor │
│ (SHA-256 Hash) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Diff Engine │
│ (Change Detect) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Ontology Remap │
│ (Claude AI) │
└─────────────────┘
pip install -r requirements.txt
# Create .env file
echo "ANTHROPIC_API_KEY=your_api_key_here" > .env
# Create sample database
python scripts/init_db.py
# Generate initial ontology
python scripts/setup_ontology.py
python examples/quickstart.py
You should see:
# In another terminal, modify the database schema
sqlite3 test_database.db "ALTER TABLE customers ADD COLUMN phone TEXT;"
# Watch the system automatically detect and heal
python examples/full_system.py
git clone https://github.com/yourusername/ontology-mcp-self-healing.git
cd ontology-mcp-self-healing
pip install -r requirements.txt
pip install -e .
# Build and run
docker-compose up -d
# View logs
docker-compose logs -f
Configuration is managed via config/config.yaml:
# Database Configuration
database:
type: sqlite # sqlite, postgresql, mysql
connection_string: sqlite:///./test_database.db
# Ontology Configuration
ontology:
main_file: ontologies/business_domain.owl
auto_reload: true
# Schema Monitoring
monitoring:
enabled: true
check_interval: 60 # seconds
detect_renames: true
# Auto-Healing
healing:
enabled: true
auto_approve: false # Set to true for automatic healing
claude_model: claude-3-5-sonnet-20241022
validation_enabled: true
# Alerts
alerts:
enabled: true
webhook_url: ${ALERT_WEBHOOK_URL} # Optional
from src.mcp_server.server import OntologyMCPServer
# Initialize server
server = OntologyMCPServer()
# Get available tools
tools = server.get_tools()
# Execute query
result = await server.execute_tool(
"query_order",
{"query": "all orders", "limit": 10}
)
from src.mcp_server.server import OntologyMCPServer
from src.agents.examples.analytics_agent import AnalyticsAgent
# Initialize MCP server
mcp_server = OntologyMCPServer()
# Create agent
agent = AnalyticsAgent(mcp_server, claude_api_key="your_key")
# Query using natural language
response = await agent.query("What are the total sales for last month?")
from src.system.self_healing import SelfHealingAgentSystem
# Initialize system
system = SelfHealingAgentSystem()
# Start monitoring and healing
system.start()
# System runs forever, auto-healing on schema changes
The MCP server loads OWL ontologies and generates tools dynamically:
Continuous monitoring using:
Intelligent diff computation:
AI-powered ontology healing:
# Build image
docker build -t ontology-mcp-self-healing .
# Run container
docker run -d \
-e ANTHROPIC_API_KEY=your_key \
-v $(pwd)/ontologies:/app/ontologies \
-v $(pwd)/logs:/app/logs \
ontology-mcp-self-healing
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f self-healing
# Stop services
docker-compose down
See docs/deployment.md for Kubernetes, Helm, and production best practices.
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=src --cov-report=html
# Run specific test
pytest tests/test_mcp_server.py -v
ontology-mcp-self-healing/
├── README.md
├── requirements.txt
├── setup.py
├── docker-compose.yml
├── Dockerfile
├── config/
│ └── config.yaml
├── ontologies/
│ └── business_domain.owl
├── src/
│ ├── mcp_server/ # MCP server implementation
│ ├── monitoring/ # Schema monitoring
│ ├── healing/ # Auto-healing
│ ├── system/ # Orchestration
│ └── agents/ # Agent implementations
├── tests/ # Test suite
├── examples/ # Example scripts
├── scripts/ # Setup scripts
└── docs/ # Documentation
New to this project? Follow our comprehensive SETUP_GUIDE.md for step-by-step instructions on:
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE file for details.
Want to publish this project? See GITHUB_SETUP.md for step-by-step instructions.
Made with ❤️ for the AI agent community
Loading reviews...
GitHub checked 1h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.