Skip to main content
Glama
SQLite MCP Server

SQLite MCP Server

by LuisGuar

SQLite MCP Server

Overview

A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.

Related MCP server: MySQL-MCP

Components

Resources

The server exposes a single dynamic resource:

  • memo://insights: A continuously updated business insights memo that aggregates discovered insights during analysis

    • Auto-updates as new insights are discovered via the append-insight tool

Prompts

The server provides a demonstration prompt:

  • mcp-demo: Interactive prompt that guides users through database operations

    • Required argument: topic - The business domain to analyze

    • Generates appropriate database schemas and sample data

    • Guides users through analysis and insight generation

    • Integrates with the business insights memo

Tools

The server offers six core tools:

Query Tools

  • read_query

    • Execute SELECT queries to read data from the database

    • Input:

      • query (string): The SELECT SQL query to execute

    • Returns: Query results as array of objects

  • write_query

    • Execute INSERT, UPDATE, or DELETE queries

    • Input:

      • query (string): The SQL modification query

    • Returns: { affected_rows: number }

  • create_table

    • Create new tables in the database

    • Input:

      • query (string): CREATE TABLE SQL statement

    • Returns: Confirmation of table creation

Schema Tools

  • list_tables

    • Get a list of all tables in the database

    • No input required

    • Returns: Array of table names

  • describe-table

    • View schema information for a specific table

    • Input:

      • table_name (string): Name of table to describe

    • Returns: Array of column definitions with names and types

Analysis Tools

  • append_insight

    • Add new business insights to the memo resource

    • Input:

      • insight (string): Business insight discovered from data analysis

    • Returns: Confirmation of insight addition

    • Triggers update of memo://insights resource

Usage with Claude Desktop

uv

# Add the server to your claude_desktop_config.json
"mcpServers": {
  "sqlite": {
    "command": "uv",
    "args": [
      "--directory",
      "parent_of_servers_repo/servers/src/sqlite",
      "run",
      "mcp-server-sqlite",
      "--db-path",
      "~/test.db"
    ]
  }
}

Docker

# Add the server to your claude_desktop_config.json
"mcpServers": {
  "sqlite": {
    "command": "docker",
    "args": [
      "run",
      "--rm",
      "-i",
      "-v",
      "mcp-test:/mcp",
      "mcp/sqlite",
      "--db-path",
      "/mcp/test.db"
    ]
  }
}

Usage with VS Code

For quick installation, click the installation buttons below:

Install with UV in VS Code Install with UV in VS Code Insiders

Install with Docker in VS Code Install with Docker in VS Code Insiders

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is needed when using the mcp.json file.

uv

{
  "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}"
        ]
      }
    }
  }
}

Docker

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "db_path",
        "description": "SQLite Database Path (within container)",
        "default": "/mcp/db.sqlite"
      }
    ],
    "servers": {
      "sqlite": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-v",
          "mcp-sqlite:/mcp",
          "mcp/sqlite",
          "--db-path",
          "${input:db_path}"
        ]
      }
    }
  }
}

Building

Docker:

docker build -t mcp/sqlite .

Test with MCP inspector

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

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Available Tools

6 tools
append_insightB

Add a business insight to the memo

Inputs: insight (required).

create_tableC

Create a new table in the SQLite database

Inputs: query (required).

describe_tableA

Get the schema information for a specific table

Inputs: table_name (required).

list_tablesA

List all tables in the SQLite database

Inputs: no named parameters.

read_queryB

Execute a SELECT query on the SQLite database

Inputs: query (required).

write_queryA

Execute an INSERT, UPDATE, or DELETE query on the SQLite database

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation4/5

    The five database tools (read_query, write_query, create_table, list_tables, describe_table) have clearly distinct purposes. The append_insight tool is unrelated to SQLite but its description makes its purpose unambiguous, so no major confusion arises. However, it sits oddly beside the rest.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., read_query, create_table, append_insight). The pattern is uniform across the entire set, with no mixing of conventions.

    Tool Count5/5

    Six tools is a well-scoped count for a SQLite database server. Each tool covers a fundamental operation without being bloated or sparse.

    Completeness3/5

    The database tools cover essential operations (query, write, schema management), though missing operations like drop table or alter table. More critically, the append_insight tool is out of place for a SQLite server, creating a domain gap and distracting from the core purpose.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      B
      maintenance
      A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through SQLite. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
      92,139
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables SQL query execution, database management, and business intelligence capabilities through MySQL connections.
      1,462 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that provides database interaction capabilities through SQLite, enabling users to run SQL queries, analyze business data, and automatically generate business insight memos.
      19
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
      7
      MIT