Home / MCP / SQLite MCP Server
Provides a Node.js MCP SQLite server backed by a file-based database for model context operations.
Configuration
View docs{
"mcpServers": {
"sqlite_desktop": {
"command": "/absolute/path/to/npx",
"args": [
"-y",
"mcp-server-sqlite-npx",
"/absolute/path/to/database.db"
],
"env": {
"PATH": "/absolute/path/to/executables",
"NODE_PATH": "/absolute/path/to/node_modules"
}
}
}
}You can run a Model Context Protocol SQLite server locally to provide a lightweight, file-based data source that you can query from MCP clients. This server runs via Node.js and offers an npx-based option for environments without Python. It integrates with Claude Desktop and can be tested with the MCP Inspector tool.
To use the MCP SQLite Server with a client like Claude Desktop, configure your MCP connection to launch the server process and point the client at the local database. You can run the server via different local runtimes depending on your environment. Start the server using your preferred command, then connect your MCP client to the configured data source to read or write model context data.
Prerequisites you need before installation:
Install or set up the MCP SQLite Server for Claude Desktop using the following command. This installs the MCP server package via Smithery for Claude Desktop integration.
npx -y @smithery/cli install mcp-server-sqlite-npx --client claudeIf you prefer manual configuration for Claude Desktop, add a configuration block to claude_desktop_config.json with the following structure. Adapt paths to your environment.
{
"mcpServers": {
"sqlite": {
"command": "/absolute/path/to/npx",
"args": [
"-y",
"mcp-server-sqlite-npx",
"/absolute/path/to/database.db"
],
"env": {
"PATH": "/absolute/path/to/executables",
"NODE_PATH": "/absolute/path/to/node_modules"
}
}
}
}If you are using macOS with nvm, a full example for Claude Desktop looks like this. Adjust usernames and paths to your environment.
{
"mcpServers": {
"sqlite": {
"command": "/Users/{username}/.nvm/versions/node/v22.12.0/bin/npx",
"args": [
"-y",
"mcp-server-sqlite-npx",
"/Users/{username}/projects/database.db"
],
"env": {
"PATH": "/Users/{username}/.nvm/versions/node/v22.12.0/bin:/usr/local/bin:/usr/bin:/bin",
"NODE_PATH": "/Users/{username}/.nvm/versions/node/v22.12.0/lib/node_modules"
}
}
}
}You can test the server using the MCP Inspector tool by running the inspector against the built server, then connecting to the database path you provided during startup.
npx @modelcontextprotocol/inspector node dist/index.js /absolute/path/to/database.dbOnce Claude Desktop is configured, you can start the server using the same runtime you used for your claude_desktop_config.json. The following example launches the Node runtime and the built server entry point.
{
"mcpServers": {
"sqlite": {
"command": "/absolute/path/to/node",
"args": [
"/absolute/path/to/dist/index.js",
"/absolute/path/to/database.db"
]
}
}
}When you are ready to publish, bump the version in package.json, install dependencies, and commit the release with a message like: Release 0.1.6.
Test the server by running the MCP Inspector against the built server and database path.
Configure Claude Desktop to connect to the MCP SQLite Server and manage the data source.