- Home
- MCP servers
- SQLite
SQLite
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"berthojoris-sqlite-mcp": {
"command": "npx",
"args": [
"-y",
"@berthojoris/mcp-sqlite-server",
"sqlite:////path/to/database.sqlite",
"list,read,create,update,delete"
]
}
}
}You can securely expose and manage SQLite databases through a Model Context Protocol (MCP) server. This server provides a standardized interface to run queries, manage schema, and perform maintenance while enforcing fine-grained permissions and audit logging for secure, controlled access.
How to use
Connect to the SQLite MCP Server using an MCP client. You can either run the server directly via a command line, or configure your MCP client to connect and operate with a defined set of permissions.
Two practical usage patterns are shown below. Use the first to run immediately, or the second to integrate into your client configuration.
How to use with a client (quick start patterns)
# Run directly with npx (no installation required)
npx @berthojoris/mcp-sqlite-server sqlite:////path/to/database.sqlite list,read,create,update,delete
# Add to your MCP client configuration
{
"mcpServers": {
"sqlite": {
"command": "npx",
"args": ["-y", "@berthojoris/mcp-sqlite-server", "sqlite:////path/to/db.sqlite", "list,read,create,update,delete"]
}
}
}
How to install
Prerequisites: ensure you have Node.js (LTS version) and npm installed on your system.
Step 1: Run the server directly without installation (NPX) to try it out.
npx @berthojoris/mcp-sqlite-server sqlite:////path/to/your/database.sqlite list,read,utility
Step 2: Install globally so you can run the server from anywhere.
npm install -g @berthojoris/mcp-sqlite-server
mcp-sqlite-server sqlite:////path/to/your/database.sqlite list,read,create,update
Step 3: Install locally in a project.
npm install @berthojoris/mcp-sqlite-server
Configuration and usage details
Configuration is typically done in your MCP client config. The server supports a standard connection string format for SQLite and a set of permissions to control what actions are allowed.
Core features and permissions
The MCP server provides secure, granular access to SQLite operations with a comprehensive permission system. Permissions include: list, read, create, update, delete, execute, ddl, transaction, utility, and others. Each permission controls a specific set of SQL operations to prevent unauthorized actions.
Security and best practices
Follow security best practices: grant only the permissions you need, use parameterized queries, keep backups, monitor audit logs, and enforce rate limiting. The server includes SQL injection protection, query validation, and detailed audit trails to help you maintain a secure environment.
Common permission combinations
- Read-only access: list,read
- Full CRUD: list,read,create,update,delete
- Full database access: list,read,create,update,delete,execute,ddl,transaction,utility
- Analytics: list,read,utility
- Development: list,read,create,update,delete,ddl,transaction,utility
Available tools
sqlite_query
Execute SELECT queries with parameterized support
sqlite_insert
Insert single records into tables
sqlite_update
Update existing records
sqlite_delete
Delete records from tables
sqlite_schema
Get comprehensive schema information
sqlite_tables
List all tables in database
sqlite_relations
Analyze table relationships and foreign keys
sqlite_transaction
Execute multiple queries atomically
sqlite_backup
Create database backup
sqlite_bulk_insert
Bulk insert with relational support
sqlite_bulk_update
Bulk update with progress tracking
sqlite_bulk_delete
Bulk delete with cascade support
sqlite_ddl
Schema management (CREATE/ALTER/DROP)
sqlite_views
Create, drop, and manage database views
sqlite_indexes
Index management and optimization
sqlite_constraints
View constraints and foreign keys
sqlite_migrate
Data migration between tables
sqlite_backup_restore
Backup tables and restore from SQL files
sqlite_column_statistics
Column statistics and data profiling
sqlite_database_summary
Database summary and metadata
sqlite_schema_erd
Entity relationship diagram data
sqlite_schema_rag_context
RAG context for AI models
sqlite_analyze_query
Query analysis and execution plans
sqlite_optimization_hints
Query optimization suggestions
sqlite_database_health_check
Database health and integrity checks
sqlite_unused_indexes
Find unused or redundant indexes
sqlite_connection_pool_stats
Connection pool statistics