MCP.so
Sign In
E

Easy Sqlite Mcp

@chenkumi

About Easy Sqlite Mcp

A Model Context Protocol (MCP) server implemented in Node.js and TypeScript, designed to enable LLMs to interact directly with SQLite databases.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "easy-sqlite-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "easy-sqlite-mcp"
      ]
    }
  }
}

Tools

8

Open an SQLite database file at the specified path. Args: - file_path (string): Absolute or relative path to the .db / .sqlite file. Returns: { "success": boolean, "message": string } Examples: - "Open the users database" -> file_path="/data/users.db" Error Handling: - Returns success=false with message if the file cannot be opened.

Close the currently open SQLite database connection. Returns: { "success": boolean, "message": string } Error Handling: - Returns success=false if no database is currently open.

Get the current status of the SQLite database connection. Returns: { "isOpen": boolean, "filePath": string | null, "memoryUsage": number | null, "tables": number | null }

Execute a read-only SQL query (SELECT) on the currently open database. Args: - sql (string): The SQL SELECT statement to execute. - params (object, optional): Named parameters for the query. Use placeholder names without the SQL prefix in the params object, e.g. SQL ":id" uses params { "id": 1 }. Returns: { "columns": string[], "rows": unknown[][], "rowCount": number } Error Handling: - Throws if no database is open. Use sqlite_open first. - Returns SQL error message if the query is invalid.

Execute a write SQL statement (INSERT, UPDATE, DELETE, CREATE, DROP, ALTER) on the currently open database. Args: - sql (string): The SQL statement to execute. - params (object, optional): Named parameters for the statement. Use placeholder names without the SQL prefix in the params object, e.g. SQL ":id" uses params { "id": 1 }. Returns: { "changes": number, "lastInsertRowid": number } Error Handling: - Throws if no database is open. Use sqlite_open first. - Returns SQL error message if the statement is invalid.

List all user tables in the currently open SQLite database. Returns: { "tables": string[] } Error Handling: - Throws if no database is open. Use sqlite_open first.

Describe the schema of a specific table in the currently open SQLite database. Args: - table_name (string): Name of the table to describe. Returns: { "name": string, "columns": [ { "cid": number, "name": string, "type": string, "notnull": boolean, "defaultValue": unknown, "pk": boolean } ], "rowCount": number } Error Handling: - Throws if no database is open. Use sqlite_open first. - Returns error if the table does not exist.

Return the SQLite MCP manual. Use this first when you are unsure how to use sqlite_open, sqlite_query, sqlite_execute, or when an operation fails and you need the safe usage rules, placeholder rules, or database lifecycle guidance.

Overview

What is Easy Sqlite Mcp?

Easy Sqlite Mcp is a Model Context Protocol server implemented in Node.js and TypeScript, designed to enable LLMs to interact directly with SQLite databases. It supports two startup modes: manual mode (agent opens/closes databases) and fixed mode (a configured database opens automatically).

How to use Easy Sqlite Mcp?

Run via npx easy-sqlite-mcp. For manual mode, no environment variable; for fixed mode, set the SQLITE_PATH environment variable to a database file path. Configuration examples are provided for Claude Desktop, Codex, and OpenCode clients.

Key features of Easy Sqlite Mcp

  • Connection Management: sqlite_open, sqlite_close, sqlite_status (manual mode only for open/close)
  • Data Operations: sqlite_query (read-only SELECT), sqlite_execute (INSERT/UPDATE/DELETE/CREATE/DROP)
  • Schema Discovery: sqlite_list_tables, sqlite_describe_table (columns, types, row count)

Use cases of Easy Sqlite Mcp

  • An LLM assistant querying a local SQLite database to answer user questions
  • An agent performing data modifications (insert, update, delete) on a SQLite file
  • Automating schema exploration for SQLite databases during troubleshooting or data analysis

FAQ from Easy Sqlite Mcp

What is the difference between manual and fixed mode?

In manual mode the agent must explicitly call sqlite_open and sqlite_close; only one database can be open at a time. In fixed mode the database is opened automatically at startup and connection switching is disabled.

What are the runtime and dependency requirements?

Node.js >= 18, TypeScript, the @modelcontextprotocol/sdk, better-sqlite3 (synchronous SQLite driver), and Zod for parameter validation.

Where does the data reside?

The server operates on SQLite database files on the local filesystem. The agent or user provides the file path either at runtime (manual mode) or via the SQLITE_PATH environment variable (fixed mode).

Is there a limit on concurrent database connections?

Yes, in manual mode only one SQLite database file can be open at a time; opening another file automatically closes the previous connection. Fixed mode allows only the preconfigured database.

What transports or authentication methods are supported?

The README does not mention specific transports or authentication; it relies on the Model Context Protocol standard. The server does not describe any built-in auth mechanism.

Frequently asked questions

What is the difference between manual and fixed mode?

In manual mode the agent must explicitly call `sqlite_open` and `sqlite_close`; only one database can be open at a time. In fixed mode the database is opened automatically at startup and connection switching is disabled.

What are the runtime and dependency requirements?

Node.js >= 18, TypeScript, the `@modelcontextprotocol/sdk`, `better-sqlite3` (synchronous SQLite driver), and Zod for parameter validation.

Where does the data reside?

The server operates on SQLite database files on the local filesystem. The agent or user provides the file path either at runtime (manual mode) or via the `SQLITE_PATH` environment variable (fixed mode).

Is there a limit on concurrent database connections?

Yes, in manual mode only one SQLite database file can be open at a time; opening another file automatically closes the previous connection. Fixed mode allows only the preconfigured database.

What transports or authentication methods are supported?

The README does not mention specific transports or authentication; it relies on the Model Context Protocol standard. The server does not describe any built-in auth mechanism.

Comments

More Databases MCP servers