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 "Install 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.497126MIT
- AlicenseAqualityCmaintenanceRead-only SQLite database explorer for MCP clients. Allows discovery of tables and columns via resources and running SELECT queries via a tool.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and query SQLite databases through MCP tools, supporting CRUD operations, schema management, and saved views.4MIT
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
GibsonAI MCP server: manage your databases with natural language
MCP server for managing Prisma Postgres.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nao9net/mcp-sqlite'
If you have feedback or need assistance with the MCP directory API, please join our Discord server