Enterprise-grade SQLite with AI features
## SQLite Advanced MCP Server: Enhanced Local Database The **SQLite Advanced MCP Server** provides enhanced SQLite operations for Google Antigravity, enabling advanced querying, full-text search, and JSON extensions directly from your development environment. ### Why SQLite Advanced MCP? - **Zero Config**: No server setup required - **Full-Text Search**: FTS5 extension for text search - **JSON Support**: JSON1 extension for JSON data - **Portable**: Single file database - **Fast**: Excellent performance for local data ### Key Features #### 1. Advanced Queries ```python # Full-text search result = await mcp.query(""" SELECT id, title, snippet(articles_fts, 1, '<b>', '</b>', '...', 32) as snippet FROM articles_fts WHERE articles_fts MATCH ? ORDER BY rank LIMIT 20 """, params=["machine learning"]) for row in result: print(f"Article: {row['title']}") print(f"Snippet: {row['snippet']}") ``` #### 2. JSON Operations ```python # Query JSON data result = await mcp.query(""" SELECT id, json_extract(data, '$.name') as name, json_extract(data, '$.settings.theme') as theme FROM users WHERE json_extract(data, '$.status') = ? """, params=["active"]) # Update JSON await mcp.execute(""" UPDATE users SET data = json_set(data, '$.settings.notifications', ?) WHERE id = ? """, params=[True, 123]) ``` #### 3. Virtual Tables ```python # Create FTS table await mcp.execute(""" CREATE VIRTUAL TABLE IF NOT EXISTS docs_fts USING fts5( title, content, tags, content='documents', content_rowid='id' ) """) # Populate FTS index await mcp.execute(""" INSERT INTO docs_fts(docs_fts) VALUES('rebuild') """) ``` #### 4. Database Operations ```python # Get database info info = await mcp.get_db_info() print(f"Size: {info['size']} bytes") print(f"Tables: {info['table_count']}") # Backup database await mcp.backup(destination="/backups/mydb-backup.sqlite") # Vacuum database await mcp.vacuum() ``` ### Configuration ```json { "mcpServers": { "sqlite-advanced": { "command": "npx", "args": ["-y", "@anthropic/mcp-sqlite-advanced"], "env": { "SQLITE_DATABASE": "/path/to/database.sqlite", "SQLITE_EXTENSIONS": "fts5,json1" } } } } ``` ### Use Cases **Local Development**: Development and testing databases. **Embedded Apps**: Desktop and mobile applications. **Data Analysis**: Local data exploration. **Prototyping**: Quick prototype development. The SQLite Advanced MCP enables enhanced local database operations within your development environment.
{
"mcpServers": {
"sqlite-advanced": {
"mcpServers": {
"sqlite-advanced": {
"env": {
"SQLITE_DB_PATH": "./database.db"
},
"args": [
"-y",
"sqlite-mcp-server"
],
"command": "npx"
}
}
}
}
}