sqlite
Provides tools to interact with SQLite databases, enabling listing registered databases, viewing tables and schemas, and executing read-only or write queries with parameterized SQL, with support for multiple databases via aliases.
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., "@sqliteshow me the schema of the users table in the main database"
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.
This is a server that allows you to operate SQLite databases via MCP (Model Context Protocol). At startup, you register multiple databases in the form of "alias=path", and when calling tools, you select the database by alias name. It is safe because it does not accept arbitrary file paths at runtime.
Features (Tools)
list_databases— Displays a list of aliases for registered databaseslist_tables— Displays a list of all table names in the specified databasedescribe_table— Retrieves the schema of the specified table (columns/types/foreign keys/indexes)read_query— Executes SELECT / WITH / PRAGMA (read-only)write_query— Executes INSERT / UPDATE / DELETE / DDL (data changes)
list_tables/describe_table/read_query/write_query accept an optional database argument (alias name).
If only one database is registered, it can be omitted (it automatically becomes the default).
If two or more are registered, the database argument is required each time.
Related MCP server: MCP SQLite Server
Setup
npm installStartup
Start by specifying one or more databases in the format alias=path.
node index.js main=/path/to/main.db logs=/path/to/logs.dbWhen registering only one (in this case, the database argument can be omitted):
node index.js main=/path/to/main.dbEnvironment Variables
Variable name | Description |
| Opens all connections in read-only mode ( |
Usage Examples
// 登録済みDB一覧を確認
{ "tool": "list_databases", "arguments": {} }
// "main" DBのテーブル一覧
{ "tool": "list_tables", "arguments": { "database": "main" } }
// "logs" DBに対してクエリ
{ "tool": "read_query", "arguments": { "sql": "SELECT * FROM events", "database": "logs" } }
// DBが1つしか登録されていない場合は database 省略可
{ "tool": "read_query", "arguments": { "sql": "SELECT * FROM users" } }Registering with an MCP Client
Claude Desktop
Add the following to claude_desktop_config.json (specify paths as absolute paths according to your environment):
{
"mcpServers": {
"sqlite": {
"command": "node",
"args": [
"/絶対パス/sqlite-mcp-server/index.js",
"main=/絶対パス/main.db",
"logs=/絶対パス/logs.db"
]
}
}
}After configuration, restart Claude Desktop and the sqlite server tools will become available.
Claude Code (CLI / VS Code Extension)
Register using the claude command from a terminal in VS Code or a regular terminal.
claude mcp add --transport stdio sqlite -- node /絶対パス/sqlite-mcp-server/index.js main=/絶対パス/main.db logs=/絶対パス/logs.dbEverything after
--is passed as-is as the server startup command.To make it read-only, add
--env SQLITE_READONLY=1:claude mcp add --transport stdio --env SQLITE_READONLY=1 sqlite -- node /絶対パス/index.js main=/絶対パス/main.dbThe default is local scope (only your current project). Use
--scope userto use it across all projects, or--scope projectto share it as.mcp.jsonwith your team.claude mcp add --transport stdio --scope user sqlite -- node /絶対パス/index.js main=/絶対パス/main.db
Checking and deleting registered entries:
claude mcp list
claude mcp remove sqliteWhen you open the Claude Code panel in VS Code (or start a claude session), tools such as list_databases and read_query become available.
Notes
For
write_query, we recommend using?placeholders as a measure against SQL injection (theparamsargument).Table names are validated to allow only alphanumeric characters and underscores.
Alias names can only contain alphanumeric characters, underscores, and hyphens.
Connections to each database are opened on first access and reused thereafter. All are closed when the server terminates.
No databases other than the aliases registered at startup can be accessed (no arbitrary paths are accepted).
If connecting to a production database, consider starting with
SQLITE_READONLY=1.
This server cannot be deployed
Maintenance
Related MCP Connectors
- dataOAuthco.thinair
Read-only PostgreSQL, MySQL, SQL Server access via MCP — 24 dialect-aware hosted tools.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
The Instant MCP server is a wrapper around the Instant Platform SDK that enables creating, managing, and updating InstantDB applications directly within an editor. It provides tools for fetching rules files for LLMs, retrieving and pushing app schemas, managing permission rules, and executing database queries. Key capabilities include schema management (get-schema, push-schema), permission management (get-perms, push-perms), query execution, and listing recent query history.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes sqlite3 database functionality as MCP tools, enabling SQL query execution, schema management, and CRUD operations.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides comprehensive SQLite database interaction through MCP, enabling CRUD operations, custom SQL queries, and database exploration.501 npm127MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and query SQLite databases through MCP tools, supporting CRUD operations, schema management, and saved views.4 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables read-only querying of a local SQLite database via MCP, with tools to list tables, retrieve schema, and execute SELECT/WITH/EXPLAIN queries.-