SQLite MCP Server
Provides tools for read-only SQLite database exploration: execute SELECT queries and return results as JSON or CSV, and render bar, line, or scatter charts as PNG images.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SQLite MCP Server show me monthly revenue from sales.db as a bar chart"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sqlite-mcp-server
A Model Context Protocol (MCP) server that enables MCP-compatible clients (e.g., Claude Desktop) to query and visualize SQLite databases using natural language.
Features
list_data— Execute a SELECT query and return results as JSONexport_csv— Execute a SELECT query and return results as CSVvisualize_data— Execute a SELECT query and render a bar, line, or scatter chart as a PNG image
Related MCP server: NL-to-SQL MCP
Requirements
Python 3.12+
Installation
git clone https://github.com/aktnk/sqlite-mcp-server.git
cd sqlite-mcp-server
uv syncMCP Client Setup
Copy config.sample.json to config.json and update the paths:
{
"mcpServers": {
"sqlite-explorer": {
"command": "uv",
"args": [
"--directory",
"/path/to/sqlite-mcp-server",
"run",
"main.py"
],
"env": {
"SQLITE_MCP_ALLOWED_DIRS": "/path/to/your/databases"
}
}
}
}Then add the contents to your MCP client's configuration file.
Claude Desktop:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration
Environment Variable | Default | Description |
| Current working directory | Colon-separated list of directories the server is allowed to access (e.g., |
Development
# Create a sample database for testing
uv run setup_db.py
# Run the server directly
uv run main.py
# Run with MCP Inspector (interactive tool testing)
uv run mcp dev main.pySecurity
All database access is strictly read-only. The following protections are in place:
Layer | What it prevents |
Read-only connection ( | INSERT / UPDATE / DELETE / DROP |
SQLite authorizer ( | ATTACH DATABASE, schema changes, |
Path validation | Path traversal ( |
Row limit (10,000 rows) | Denial-of-service via large result sets |
License
MIT License © 2026 Akira Tanaka
Available Tools
3 toolsexport_csvA
SQLiteからデータを取得し、CSV文字列として返します。
- db_path: .dbファイルのフルパス(許可ディレクトリ内のみ)
- sql: 実行するSELECTクエリ(最大10,000件)
Inputs: sql (required), db_path (required). Returns: result
list_dataB
SQLiteからデータを取得し、JSON形式のリストで返します。
- db_path: .dbファイルのフルパス(許可ディレクトリ内のみ)
- sql: 実行するSELECTクエリ(最大10,000件)
Inputs: sql (required), db_path (required). Returns: result
visualize_dataB
SQLiteからデータを取得し、グラフを生成して画像として返します。
- db_path: .dbファイルのフルパス(許可ディレクトリ内のみ)
- sql: 実行するSELECTクエリ(最大10,000件)
- x_col: X軸にするカラム名
- y_col: Y軸にするカラム名
- chart_type: 'bar' (棒), 'line' (折れ線), 'scatter' (散布図)
Inputs: sql (required), x_col (required), y_col (required), db_path (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
All three tools execute a SELECT query against the same database, but their output formats are clearly distinct: JSON list, CSV string, and chart image. An agent could still hesitate between list_data and export_csv for simple data retrieval, but the descriptions make the intended use cases reasonably clear.
All tool names follow a consistent snake_case verb_noun pattern: list_data, export_csv, visualize_data. There are no mixed conventions or vague names.
Three tools is on the low end but appropriate for a focused read/export/visualize SQLite server. Each tool has a distinct output role, though the surface is minimal.
The server covers querying, CSV export, and visualization, but lacks schema/table introspection and any write operations. Agents cannot discover table structures or modify data, which are notable gaps for a general SQLite server.
Maintenance
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Ask questions in plain language, get answers from your business database. No SQL required.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides SQLite database analytics operations through MCP, enabling AI assistants to connect, query, explore schema, and export data from SQLite databases.47-
- FlicenseNot gradedqualityDmaintenanceMCP server enabling natural-language querying of SQLite databases via schema discovery, GraphRAG retrieval, and safely guarded read-only SQL execution.-
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of SQLite databases through a secure MCP server that writes, runs, and explains SQL with a three-layer read-only guarantee.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that translates natural-language questions into SQL, validates every query structurally, and executes approved read-only queries against a SQLite database, returning results and rejections.MIT