The SQLite MCP Server provides database interaction and business intelligence capabilities through SQLite, enabling:
Query Execution: Run both read-only (
SELECT
) and write operations (INSERT
,UPDATE
,DELETE
)Schema Management: Create tables, list all tables, and describe table schemas
Business Insights: Generate automated insights that are appended to a continuously updated central memo (
memo://insights
)Interactive Analysis: Utilize the
mcp-demo
prompt for guided database operations and insight generationConfiguration: Includes automatic database creation and setup for integration with Claude Desktop
Built for the Bun JavaScript runtime environment, using it for dependency management, script execution, and server operation.
Includes ESLint integration through built-in scripts for running checks and automatically fixing issues.
Includes specific support for macOS with automatic configuration of Claude Desktop files in the macOS-specific application support directory.
Provides tools for interacting with SQLite databases, including executing SQL queries, creating tables, viewing schema information, and analyzing data to generate business insights.
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.
Installation
Install Bun if you haven't already
Clone this repository
Install dependencies:
bun installRun the setup script to configure the server in Claude Desktop:
bun run setup
The setup script will automatically add the server configuration to your Claude Desktop config file, located at:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Components
Resources
The server exposes a single dynamic resource:
memo://insights
: A continuously updated business insights memo that aggregates discovered insights during analysisAuto-updates as new insights are discovered via the append-insight tool
Prompts
The server provides a demonstration prompt:
mcp-demo
: Interactive prompt that guides users through database operationsRequired argument:
topic
- The business domain to analyzeGenerates appropriate database schemas and sample data
Guides users through analysis and insight generation
Integrates with the business insights memo
Tools
The server offers six core tools:
Query Tools
read-query
Execute SELECT queries to read data from the database
Input:
query
(string): The SELECT SQL query to execute
Returns: Query results as array of objects
write-query
Execute INSERT, UPDATE, or DELETE queries
Input:
query
(string): The SQL modification query
Returns:
{ affected_rows: number }
create-table
Create new tables in the database
Input:
query
(string): CREATE TABLE SQL statement
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:
table_name
(string): Name of table to describe
Returns: Array of column definitions with names and types
Analysis Tools
append-insight
Add new business insights to the memo resource
Input:
insight
(string): Business insight discovered from data analysis
Returns: Confirmation of insight addition
Triggers update of memo://insights resource
Development
Project Structure
src/index.ts
: Main server implementationsrc/logger.ts
: Logging utilityscripts/setup.ts
: Claude Desktop configuration script
Logging
The server maintains detailed logs in:
server.log
: Located in the project root directoryLogs include timestamps, log levels (DEBUG, INFO, WARN, ERROR, FATAL), and structured metadata
Database
The SQLite database file is created at:
data.sqlite
: Located in the project root directoryCreated automatically if it doesn't exist
Available Scripts
bun run setup
: Configure the server in Claude Desktopbun run lint
: Run ESLint checksbun run lint:fix
: Fix ESLint issues automaticallybun run inspect
: Run the MCP inspector
License
This MCP server is licensed under the MIT License. See the LICENSE file for details.
local-only server
The server can only run on the client's local machine because it depends on local resources.
A Model Context Protocol server that provides database interaction capabilities through SQLite, enabling users to run SQL queries, analyze business data, and automatically generate business insight memos.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA 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.Last updated -69,123MIT License
- -securityFlicense-qualityA Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.Last updated -3
- -securityFlicense-qualityA Model Context Protocol server that enables SQL operations (SELECT, INSERT, UPDATE, DELETE) and table management through a standardized interface with SQLite databases.Last updated -25
- AsecurityAlicenseAqualityA Model Context Protocol server that allows users to store, retrieve, update, and delete memories using SQLite storage.Last updated -57MIT License