SQLite, SQL Server, and PostgreSQL support
## Multi-Database MCP Server: Universal Database Connector The **Multi-Database MCP Server** provides unified database access for Google Antigravity, enabling operations across PostgreSQL, MySQL, MongoDB, Redis, and more from a single interface in your development environment. ### Why Multi-Database MCP? - **Unified Interface**: One API for multiple databases - **Cross-Database Queries**: Join data across different systems - **Connection Management**: Centralized connection handling - **Schema Discovery**: Auto-discover database schemas - **Migration Support**: Cross-database migrations ### Key Features #### 1. Universal Queries ```python # Query any database postgres_users = await mcp.query( connection="postgres-main", query="SELECT * FROM users WHERE status = $1", params=["active"] ) mongo_orders = await mcp.query( connection="mongo-orders", query={"collection": "orders", "filter": {"status": "pending"}} ) redis_cache = await mcp.query( connection="redis-cache", query={"command": "GET", "key": "user:123:profile"} ) ``` #### 2. Connection Management ```python # List connections connections = await mcp.list_connections() for conn in connections: print(f"Connection: {conn['name']} ({conn['type']})") # Test connection result = await mcp.test_connection(connection="postgres-main") print(f"Connected: {result['success']}") # Get connection stats stats = await mcp.get_connection_stats(connection="postgres-main") print(f"Active: {stats['active_connections']}") ``` #### 3. Cross-Database Operations ```python # Sync data between databases await mcp.sync( source={"connection": "postgres-main", "table": "users"}, target={"connection": "mongo-analytics", "collection": "users"}, transform=lambda row: { "_id": row["id"], "email": row["email"], "synced_at": datetime.utcnow() } ) # Cross-database lookup user = await mcp.query(connection="postgres-main", query="SELECT * FROM users WHERE id = $1", params=[123]) orders = await mcp.query(connection="mongo-orders", query={"collection": "orders", "filter": {"user_id": 123}}) ``` #### 4. Schema Operations ```python # Discover schemas schema = await mcp.discover_schema(connection="postgres-main") for table in schema["tables"]: print(f"Table: {table['name']}") # Compare schemas diff = await mcp.compare_schemas( source="postgres-main", target="postgres-replica" ) ``` ### Configuration ```json { "mcpServers": { "multi-database": { "command": "npx", "args": ["-y", "@anthropic/mcp-multi-db"], "env": { "CONNECTIONS_CONFIG": "/path/to/connections.json" } } } } ``` ### Use Cases **Microservices**: Access multiple service databases. **Data Migration**: Migrate data between database systems. **Analytics**: Aggregate data from multiple sources. **Development**: Work with dev, staging, and prod databases. The Multi-Database MCP enables universal database access within your development environment.
{
"mcpServers": {
"multi-database": {
"mcpServers": {
"multi-db": {
"args": [
"-y",
"@executeautomation/mcp-database-server"
],
"command": "npx"
}
}
}
}
}