MCP Server Archived reference

SQLite

MCP server that lets AI clients run SQL against a SQLite database, inspect schemas, and collect business insights in a live memo resource.

  • 304 GitHub stars
docker build -t mcp/sqlite .
SQLite preview image

What it is

The SQLite MCP Server is a Model Context Protocol server that provides database interaction and business intelligence capabilities through SQLite. It exposes six tools for querying, writing, creating tables, listing and describing schemas, and appending insights. It also offers a dynamic memo://insights resource and a mcp-demo prompt. The repository is under an archived servers repo.

Who it's for

  • Developers connecting an MCP client such as Claude Desktop or VS Code to a SQLite database
  • Users who want to analyze business data with SQL queries through an AI assistant
  • Those wanting to try the MCP demo prompt for guided database analysis and insight generation

Requirements

Requirements

  • An MCP client such as Claude Desktop or VS Code
  • Either uv or Docker to run the server
  • A SQLite database path supplied via the --db-path argument

Setup

  1. Claude Desktop with uv

    Add this to your claude_desktop_config.json, adjusting the directory path and database path.

    json
    "mcpServers": {
      "sqlite": {
        "command": "uv",
        "args": [
          "--directory",
          "parent_of_servers_repo/servers/src/sqlite",
          "run",
          "mcp-server-sqlite",
          "--db-path",
          "~/test.db"
        ]
      }
    }
  2. Claude Desktop with Docker

    Add this to your claude_desktop_config.json to run the server in a container with a mounted volume.

    json
    "mcpServers": {
      "sqlite": {
        "command": "docker",
        "args": [
          "run",
          "--rm",
          "-i",
          "-v",
          "mcp-test:/mcp",
          "mcp/sqlite",
          "--db-path",
          "/mcp/test.db"
        ]
      }
    }
  3. VS Code with uv

    Add to User Settings (JSON), or to .vscode/mcp.json in your workspace (the mcp key is needed in mcp.json).

    json
    {
      "mcp": {
        "inputs": [
          {
            "type": "promptString",
            "id": "db_path",
            "description": "SQLite Database Path",
            "default": "${workspaceFolder}/db.sqlite"
          }
        ],
        "servers": {
          "sqlite": {
            "command": "uvx",
            "args": [
              "mcp-server-sqlite",
              "--db-path",
              "${input:db_path}"
            ]
          }
        }
      }
    }
  4. Build the Docker image

    Build the image locally.

    bash
    docker build -t mcp/sqlite .

Examples

Run the MCP inspector

bash
bash
uv add "mcp[cli]"
mcp dev src/mcp_server_sqlite/server.py:wrapper

What it does: Tests the server using the MCP inspector, as described in the README.

Read data with read_query

json
json
{"query": "SELECT ..."}

What it does: The read_query tool takes a query string containing a SELECT statement and returns results as an array of objects.

Describe a table

json
json
{"table_name": "<table name>"}

What it does: The describe-table tool takes a table_name and returns column definitions with names and types.

Record an insight

json
json
{"insight": "<business insight discovered from data analysis>"}

What it does: The append_insight tool adds an insight to the memo and triggers an update of the memo://insights resource.

Pros & cons

Pros

  • Pro:Covers the full flow: read and write queries, table creation, schema listing, and description
  • Pro:Built-in memo://insights resource aggregates insights found during analysis
  • Pro:Provides a mcp-demo prompt that generates schemas and sample data for a chosen topic
  • Pro:Documented setup for both uv and Docker, in Claude Desktop and VS Code

Cons

  • Con:Lives in the servers-archived repository, indicating it is archived
  • Con:Setup requires editing JSON config files manually, including a path placeholder for the uv option
  • Con:Write access (write_query, create_table) is exposed as tools, and the README documents no restrictions on them

Images