S
Sqlite
reference
database
Database interaction and business intelligence capabilities
SQLite MCP Server
Overview
A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
Components
Resources
The server exposes a single dynamic resource:
: A continuously updated business insights memo that aggregates discovered insights during analysismemo://insights
- Auto-updates as new insights are discovered via the append-insight tool
Prompts
The server provides a demonstration prompt:
: Interactive prompt that guides users through database operationsmcp-demo
- Required argument:
- The business domain to analyzetopic
- Generates appropriate database schemas and sample data
- Guides users through analysis and insight generation
- Integrates with the business insights memo
- Required argument:
Tools
The server offers six core tools:
Query Tools
-
read_query
- Execute SELECT queries to read data from the database
- Input:
(string): The SELECT SQL query to executequery
- Returns: Query results as array of objects
-
write_query
- Execute INSERT, UPDATE, or DELETE queries
- Input:
(string): The SQL modification queryquery
- Returns:
{ affected_rows: number }
-
create_table
- Create new tables in the database
- Input:
(string): CREATE TABLE SQL statementquery
- Returns: Confirmation of table creation
Schema Tools
-
list_tables
- Get a list of all tables in the database
- No input required
- Returns: Array of table names
-
describe-table
- View schema information for a specific table
- Input:
(string): Name of table to describetable_name
- Returns: Array of column definitions with names and types
Analysis Tools
append_insight
- Add new business insights to the memo resource
- Input:
(string): Business insight discovered from data analysisinsight
- Returns: Confirmation of insight addition
- Triggers update of memo://insights resource
Usage with Claude Desktop
uv
# Add the server to your claude_desktop_config.json "mcpServers": { "sqlite": { "command": "uv", "args": [ "--directory", "parent_of_servers_repo/servers/src/sqlite", "run", "mcp-server-sqlite", "--db-path", "~/test.db" ] } }
Docker
# Add the server to your claude_desktop_config.json "mcpServers": { "sqlite": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "mcp-test:/mcp", "mcp/sqlite", "--db-path", "/mcp/test.db" ] } }
Building
Docker:
docker build -t mcp/sqlite .
Test with MCP inspector
uv add "mcp[cli]" mcp dev src/mcp_server_sqlite/server.py:wrapper
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Related Servers
Apache IoTDB
official
MCP Server for [Apache IoTDB](https://github.com/apache/iotdb) database and its tools
View DetailsGreptimeDB
official
Provides AI assistants with a secure and structured way to explore and analyze data in [GreptimeDB](https://github.com/GreptimeTeam/greptimedb).
View Details