# ofershap/mcp-server-sqlite [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/ofershap/mcp-server-sqlite  
**GitHub Stars:** 3  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ofershap-mcp-server-sqlite

## Description
SQLite operations — query databases, inspect schemas, explain queries, and export data.

## Tools
Capabilities this server exposes over MCP:

- **query** — Execute SQL (SELECT, PRAGMA, EXPLAIN, WITH). Returns results as a table.
- **schema** — Get full schema: all tables with columns, types, and row counts.
- **table_info** — Detailed info for a single table: columns, constraints, row count.
- **explain** — Run EXPLAIN QUERY PLAN to optimize queries.
- **list_databases** — List .db, .sqlite, .sqlite3 files in a directory.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-server-sqlite": {
    "command": "npx",
    "args": ["-y","mcp-sqlite-server"]
  }
}
```

## Documentation

## What ofershap/mcp-server-sqlite MCP server does

The ofershap/mcp-server-sqlite MCP server connects an MCP client to local SQLite database files. It is intended for inspecting database structure, running read-oriented SQL, and understanding how SQLite plans to execute a query. The server accepts database paths through tool requests and returns query results in a table format.

The project is implemented for a TypeScript and Node.js workflow and can be launched with the published `mcp-sqlite-server` package. It does not require credentials because it works with files available on the local machine.

## How it works

The server provides separate operations for database discovery, schema inspection, table details, SQL execution, and query-plan analysis. `list_databases` searches a directory for files ending in `.db`, `.sqlite`, or `.sqlite3`. `schema` reports every table along with its columns, types, and row counts. `table_info` narrows that view to one table and includes columns, constraints, and the row count.

The `query` operation supports `SELECT`, `PRAGMA`, `EXPLAIN`, and `WITH` statements in its default mode. Results are returned as a table for the calling assistant to interpret. The `explain` operation runs SQLite's `EXPLAIN QUERY PLAN`, which can help investigate how a query is likely to access tables and indexes.

## Setup and configuration

Install and run the ofershap/mcp-server-sqlite MCP server with:

```bash
npx -y mcp-sqlite-server
```

An MCP client can configure the server as a local stdio process using `npx` and the `mcp-sqlite-server` package. The README gives configuration examples for Cursor and Claude Desktop, and also states that the server can be configured in VS Code. Other MCP clients may use it if they support local stdio servers.

No API key, token, or other authentication setting is documented. The server reads local database files, so the client environment must be able to access the paths supplied to the tools.

## Tools and capabilities

- `query`: Runs supported SQL and returns tabular results.
- `schema`: Lists all tables with column definitions, types, and row counts.
- `table_info`: Shows one table's columns, constraints, and row count.
- `explain`: Runs `EXPLAIN QUERY PLAN` for query analysis.
- `list_databases`: Finds SQLite database files in a selected directory.

## Limitations and notes

Read-only behavior is enabled by default. In that mode, `query` accepts only `SELECT`, `PRAGMA`, `EXPLAIN`, and `WITH` statements. Passing `readonly=false` in the tool arguments enables write operations such as `INSERT`, `UPDATE`, and `DELETE`, so that setting should be used deliberately.

The documented interface is focused on SQLite files and does not describe connections to hosted database services. The listed tools also do not define a separate export operation; query results are returned to the MCP client as tables. The package is distributed under the MIT license.

_Full upstream README: https://allmcps.com/mcp/ofershap-mcp-server-sqlite/readme_

