What it is
The SQLite MCP Server is a Model Context Protocol server that provides database interaction and business intelligence capabilities through SQLite. It exposes six tools for querying, writing, creating tables, listing and describing schemas, and appending insights. It also offers a dynamic memo://insights resource and a mcp-demo prompt. The repository is under an archived servers repo.
Who it's for
- Developers connecting an MCP client such as Claude Desktop or VS Code to a SQLite database
- Users who want to analyze business data with SQL queries through an AI assistant
- Those wanting to try the MCP demo prompt for guided database analysis and insight generation
Requirements
Requirements
- An MCP client such as Claude Desktop or VS Code
- Either uv or Docker to run the server
- A SQLite database path supplied via the
--db-pathargument
Setup
Claude Desktop with uv
Add this to your claude_desktop_config.json, adjusting the directory path and database path.
json"mcpServers": { "sqlite": { "command": "uv", "args": [ "--directory", "parent_of_servers_repo/servers/src/sqlite", "run", "mcp-server-sqlite", "--db-path", "~/test.db" ] } }Claude Desktop with Docker
Add this to your claude_desktop_config.json to run the server in a container with a mounted volume.
json"mcpServers": { "sqlite": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "mcp-test:/mcp", "mcp/sqlite", "--db-path", "/mcp/test.db" ] } }VS Code with uv
Add to User Settings (JSON), or to .vscode/mcp.json in your workspace (the
mcpkey is needed in mcp.json).json{ "mcp": { "inputs": [ { "type": "promptString", "id": "db_path", "description": "SQLite Database Path", "default": "${workspaceFolder}/db.sqlite" } ], "servers": { "sqlite": { "command": "uvx", "args": [ "mcp-server-sqlite", "--db-path", "${input:db_path}" ] } } } }Build the Docker image
Build the image locally.
bashdocker build -t mcp/sqlite .
Examples
Run the MCP inspector
bashuv add "mcp[cli]"
mcp dev src/mcp_server_sqlite/server.py:wrapperWhat it does: Tests the server using the MCP inspector, as described in the README.
Read data with read_query
json{"query": "SELECT ..."}What it does: The read_query tool takes a query string containing a SELECT statement and returns results as an array of objects.
Describe a table
json{"table_name": "<table name>"}What it does: The describe-table tool takes a table_name and returns column definitions with names and types.
Record an insight
json{"insight": "<business insight discovered from data analysis>"}What it does: The append_insight tool adds an insight to the memo and triggers an update of the memo://insights resource.
Pros & cons
Pros
- Pro:Covers the full flow: read and write queries, table creation, schema listing, and description
- Pro:Built-in
memo://insightsresource aggregates insights found during analysis - Pro:Provides a
mcp-demoprompt that generates schemas and sample data for a chosen topic - Pro:Documented setup for both uv and Docker, in Claude Desktop and VS Code
Cons
- Con:Lives in the servers-archived repository, indicating it is archived
- Con:Setup requires editing JSON config files manually, including a path placeholder for the uv option
- Con:Write access (
write_query,create_table) is exposed as tools, and the README documents no restrictions on them
Images
