# Database MCP Sqlite

> Database MCP Sqlite is an open-source MCP server for databases. SQLite MCP server for a local database file, read-only with row and time limits. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/arifulislamat/database-mcp
- **MCP Registry name:** io.github.arifulislamat/database-mcp-sqlite
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-11-23

## About

The simplest of the five variants: one required setting, SQLITE_PATH, points at the database file, or you pass --dsn with an absolute path in the client config as the README's quick start does. There are no network credentials to manage.

The search_objects tool reveals the schema step by step and execute_sql runs SQL with a read-only guard, a row cap of 1000 and a 30-second timeout by default. The README's example config launches it with npx and @database-mcp/sqlite, with equivalents for uvx and a cargo-installed binary.

All builds share one conformance suite run against real databases in CI and carry the MIT licence.

## Features

- **File-based setup:** Needs only the path to a SQLite database file.
- **Schema discovery:** search_objects lists tables then columns, indexes and foreign keys.
- **Read-only guard:** execute_sql blocks writes by default.
- **Row and time caps:** Defaults of 1000 rows and 30 seconds.
- **No runtime required:** The Rust binary runs without Node or Python.
- **Registry listing:** Published in the MCP Registry with npm, PyPI and cargo options.

## Good for

- Let an assistant inspect an app's local SQLite file
- Query exported data without a database server
- Check table structure while debugging
- Prototype SQL against sample data

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add database-mcp-sqlite --env SQLITE_PATH='<SQLITE_PATH>' -- npx -y @database-mcp/sqlite
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add database-mcp-sqlite --env SQLITE_PATH='<SQLITE_PATH>' -- npx -y @database-mcp/sqlite
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.database-mcp-sqlite]
command = "npx"
args = ["-y", "@database-mcp/sqlite"]
env = { SQLITE_PATH = "<SQLITE_PATH>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e SQLITE_PATH='<SQLITE_PATH>' database-mcp-sqlite npx -- -y @database-mcp/sqlite

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "database-mcp-sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/sqlite"
      ],
      "env": {
        "SQLITE_PATH": "<SQLITE_PATH>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 2 tools changes data. From the server's own tool labels and tool names; not verified by us.

- `execute_sql` (name suggests: changes): Run SQL against the database, read-only by default.
- `search_objects` (name suggests: reads): List tables, or show columns, indexes and foreign keys for a table.

## FAQ

### What do I configure?

Set SQLITE_PATH, or pass --dsn with the file path.

### Does Database MCP Sqlite support writes?

Not by default; it starts read-only.

### Is Node required?

Not if you install the Rust binary with cargo; otherwise use npm or PyPI.

### Where is the source?

The arifulislamat/database-mcp repository, MIT licensed.

### Is Database MCP Sqlite free?

Yes. Database MCP Sqlite is open source, so you can use and self-host it for free.

### How do I add Database MCP Sqlite to Claude Code?

Run this command in your terminal: claude mcp add database-mcp-sqlite --env SQLITE_PATH='<SQLITE_PATH>' -- npx -y @database-mcp/sqlite

### What are the best alternatives to Database MCP Sqlite?

The closest alternatives to Database MCP Sqlite are Midplane, Datatomcp, Gulliver, GaussDB Read-Only MCP and Zektor.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Datatomcp](https://ai-powered.com/mcp/datatomcp-2): Datatomcp is a freemium MCP server for analytics and data.
- [Gulliver](https://ai-powered.com/mcp/gulliver): Gulliver is an open-source MCP server for databases.
- [GaussDB Read-Only MCP](https://ai-powered.com/mcp/gaussdb-read-only-mcp): GaussDB Read-Only MCP is an open-source MCP server for databases.
- [Zektor](https://ai-powered.com/mcp/zektor): Zektor is a freemium MCP server for databases.
- [Sqlite Graph MCP](https://ai-powered.com/mcp/sqlite-graph-mcp): Sqlite Graph MCP is an MCP server for databases.
- [Trino](https://ai-powered.com/mcp/trino-2): Trino is an open-source MCP server for databases.
- [APoint MS SQL](https://ai-powered.com/mcp/apoint-ms-sql): APoint MS SQL is a free MCP server for databases.

---
Source: https://ai-powered.com/mcp/database-mcp-sqlite
