mcp-sqlite

mcp-sqlite

MCP.Pizza Chef: jparkerweb

Point it at a single SQLite file on your computer and your assistant gains eight tools: list the tables, inspect a table's layout, read rows with filters, add rows, change them, remove them, and run any query you describe in words. Setup is a short snippet in Cursor, VS Code, or Claude Desktop, and there is no account or key — only the path to the file. Nothing here is read-only, so aim it at a copy before you let it edit anything.

Data
Spreadsheets

Use This MCP server To

Ask which tables live inside my database file Pull the ten most recent orders without writing a query Fix a typo in one customer record Count how many rows match a condition I describe Add a handful of test rows to a table Get a plain summary of what a table actually holds

README

🐇 MCP SQLite Server

This is a Model Context Protocol (MCP) server that provides comprehensive SQLite database interaction capabilities.

cursor-settings

Maintained by
eQuill Labs

Features

  • Complete CRUD operations (Create, Read, Update, Delete)
  • Database exploration and introspection
  • Execute custom SQL queries

Setup

Define the command in your IDE's MCP Server settings:

e.g. Cursor:

{
    "mcpServers": {
        "MCP SQLite Server": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-sqlite",
                "<path-to-your-sqlite-database.db>"
            ]
        }
    }
}

e.g. VSCode:

{
    "servers": {
        "MCP SQLite Server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-sqlite",
                "<path-to-your-sqlite-database.db>"
            ]
        }
    }
}

cursor-settings

Your database path must be provided as an argument.

Available Tools

Database Information

db_info

Get detailed information about the connected database.

Example:

{
  "method": "tools/call",
  "params": {
    "name": "db_info",
    "arguments": {}
  }
}
list_tables

List all tables in the database.

Example:

{
  "method": "tools/call",
  "params": {
    "name": "list_tables",
    "arguments": {}
  }
}
get_table_schema

Get detailed information about a table's schema.

Parameters:

  • tableName (string): Name of the table

Example:

{
  "method": "tools/call",
  "params": {
    "name": "get_table_schema",
    "arguments": {
      "tableName": "users"
    }
  }
}

CRUD Operations

create_record

Insert a new record into a table.

Parameters:

  • table (string): Name of the table
  • data (object): Record data as key-value pairs

Example:

{
  "method": "tools/call",
  "params": {
    "name": "create_record",
    "arguments": {
      "table": "users",
      "data": {
        "name": "John Doe",
        "email": "john@example.com",
        "age": 30
      }
    }
  }
}
read_records

Query records from a table with optional filtering.

Parameters:

  • table (string): Name of the table
  • conditions (object, optional): Filter conditions as key-value pairs
  • limit (number, optional): Maximum number of records to return
  • offset (number, optional): Number of records to skip

Example:

{
  "method": "tools/call",
  "params": {
    "name": "read_records",
    "arguments": {
      "table": "users",
      "conditions": {
        "age": 30
      },
      "limit": 10,
      "offset": 0
    }
  }
}
update_records

Update records in a table that match specified conditions.

Parameters:

  • table (string): Name of the table
  • data (object): New values as key-value pairs
  • conditions (object): Filter conditions as key-value pairs

Example:

{
  "method": "tools/call",
  "params": {
    "name": "update_records",
    "arguments": {
      "table": "users",
      "data": {
        "email": "john.updated@example.com"
      },
      "conditions": {
        "id": 1
      }
    }
  }
}
delete_records

Delete records from a table that match specified conditions.

Parameters:

  • table (string): Name of the table
  • conditions (object): Filter conditions as key-value pairs

Example:

{
  "method": "tools/call",
  "params": {
    "name": "delete_records",
    "arguments": {
      "table": "users",
      "conditions": {
        "id": 1
      }
    }
  }
}

Custom Queries

query

Execute a custom SQL query against the connected SQLite database.

Parameters:

  • sql (string): The SQL query to execute
  • values (array, optional): Array of parameter values to use in the query

Example:

{
  "method": "tools/call",
  "params": {
    "name": "query",
    "arguments": {
      "sql": "SELECT * FROM users WHERE id = ?",
      "values": [1]
    }
  }
}

Built with


Appreciation

If you enjoy this library please consider sending me a tip to support my work 😀

mcp-sqlite FAQ

Do I need an access key or an account?
No. The only thing you supply is the location of your database file on your own machine, given once in the settings snippet. Nothing leaves your computer.
Which apps does it work in?
Any assistant that can launch a local tool from a small settings snippet — Cursor and VS Code are shown in the instructions, and Claude Desktop works the same way.
Can it delete or overwrite my data?
Yes, easily. Alongside the update and delete tools there is a free-form query tool that will run whatever it is given, including commands that drop an entire table. There is no read-only mode, no preview, and no confirmation prompt, so work on a duplicate of your file.
Can I use this to tidy up a messy list of records?
Yes. You can ask it to find rows matching a description, correct values in place, and delete the ones you no longer want, all in conversation rather than by writing queries.
The instructions mention an option to skip rows — does it work?
Only partly. In the code, skipping rows is applied only when you have also set a maximum number of rows to return. Ask for a skip on its own and it is quietly ignored, so always pair it with a limit.
Can it connect to a database on a server?
No. It handles one local SQLite file, chosen when the tool starts. Switching to a different file means editing the settings snippet and restarting your assistant.
How hard is the setup?
Easy. Paste a few lines into your assistant's tool settings with the path to your database file; nothing needs to be built or installed by hand.