Skip to main content
Glama
LuisGuar

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

ParametersJSON Schema
NameRequiredDescriptionDefault
insightYesBusiness insight discovered from data analysis

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears full disclosure burden. It only says 'Add', implying mutation, but does not explain side effects, whether the insight is appended or replaced, constraints like max length, or whether changes are reversible.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, front-loaded sentence with no unnecessary words. Every element (verb, object, target) earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given simple schema (one string) and no output schema, the description suffices minimally. However, it lacks context about what 'the memo' is, how to access or verify appended insights, and how this tool relates to the sibling database tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The tool description repeats 'business insight' from the schema's property description without adding extra semantic meaning or usage context beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Add' and resource 'business insight' targeting 'the memo', clearly indicating the action. Among sibling tools (read_query, write_query, etc.), none relate to adding insights, so it stands out distinctly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. While siblings are database-oriented, the description does not explicitly state scenarios, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_tableC

Create a new table in the SQLite database

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesCREATE TABLE SQL statement

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only says 'Create a new table' without disclosing behavioral traits: whether it fully executes the query, whether confirmation is shown, effects on existing data, or error handling. The word 'Create' implies mutation but no safety details are given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, concise and to the point. However, it could add more value in a sentence or two without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one parameter and no annotations or output schema, the description is insufficient. It doesn't address return value, error conditions, or how it differs from similar sibling tools. The agent lacks context to decide when to call this tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameter 'query' is already documented with description 'CREATE TABLE SQL statement'. The description adds no additional meaning beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Create a new table in the SQLite database', which is clear but generic. It does not distinguish this tool from siblings like 'write_query' that could also create tables, especially since SQLite allows table creation via arbitrary SQL.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives such as 'write_query' or 'read_query'. It does not mention prerequisites (e.g., database must already exist) or limitations (e.g., no support for temporary tables).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_tableA

Get the schema information for a specific table

ParametersJSON Schema
NameRequiredDescriptionDefault
table_nameYesName of the table to describe

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It does not state that the operation is read-only, what happens if the table doesn't exist, or any authentication requirements. The description adds minimal value beyond the obvious.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 8 words, directly stating the tool's purpose. No wasted words, and the key information is front-loaded. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and no output schema, the description is minimally adequate. It explains the purpose but does not describe the return format, error conditions, or that it is a read-only operation. Given the tool's simplicity, it is acceptable but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (the only parameter has a clear description). The tool description does not add any independent meaning beyond what the schema already provides. Baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'schema information for a specific table'. It distinguishes from sibling tools like list_tables (lists tables) and read_query (runs queries) by specifying the exact operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for retrieving table schema, but it provides no explicit guidance on when to use it versus alternatives (e.g., when to pick describe_table over read_query or list_tables). No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesA

List all tables in the SQLite database

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states 'list all tables' without indicating whether the operation is read-only, what the output format is (e.g., array of names, object), or if any system tables are included. The bare description adds minimal value beyond the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded and contains no extraneous words. It efficiently conveys the core purpose without any waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description is minimally adequate. It tells the agent what the tool does, but does not explain what 'list' returns (e.g., table names, details) or how the results are presented. Given the simplicity, the description is complete enough for basic use but lacks depth for an agent to fully anticipate the output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and schema description coverage is 100%. Since there are no parameters to document, the description does not need to add anything. The baseline of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (list) and resource (tables) with scope (in the SQLite database). It unambiguously distinguishes from sibling tools like create_table, describe_table, and read_query, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not explain that this is for discovering all tables (as opposed to describe_table for a specific table) or when not to use it. The sibling tools are not mentioned, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_queryB

Execute a SELECT query on the SQLite database

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSELECT SQL query to execute

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It states the tool executes a SELECT query but does not disclose key behaviors such as whether the query is sandboxed, what happens on error, performance limitations, or if the database state is modified in any way (e.g., side effects like triggers). The description is too brief to be transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no wasted words. It is appropriately front-loaded with the action. However, for a tool with zero annotations, this may be too brief to be adequately informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter, no annotations, no output schema, and no description of results or error handling, the description lacks completeness. It does not cover what the tool returns, how to handle errors, or any constraints on the query (e.g., only one query allowed). The sibling tools suggest write operations exist, but the description does not address potential misuse.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% as the one required parameter 'query' has a schema description 'SELECT SQL query to execute'. The description adds no additional meaning beyond what the schema provides, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Execute' and the resource 'SELECT query on the SQLite database'. It distinguishes from siblings like write_query and create_table by specifying SELECT queries only. However, it does not explicitly contrast with these siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for read-only SELECT queries, but no explicit guidance is given on when to use this versus write_query or other tools. The agent must infer usage from the tool name and sibling context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write_queryA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query to execute

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states the operation type without disclosing behavioral traits such as transaction handling, idempotency, return values, or potential side effects. This is insufficient for a write tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the action and resource. It is concise, but could be slightly more structured (e.g., separate usage notes). No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (1 param, no output schema, no annotations), the description is adequate but leaves gaps: it does not mention whether queries are auto-committed, if multiple statements are allowed, or what happens on failure. For a write tool, these are relevant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter 'query' described as 'SQL query to execute'. The description adds value by specifying that the query must be INSERT, UPDATE, or DELETE, constraining the input beyond the schema's generic description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb 'execute' and the resource 'INSERT, UPDATE, or DELETE query on the SQLite database', which is specific and clearly distinguishes from siblings like read_query. It leaves no ambiguity about the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (for write operations) by listing INSERT, UPDATE, DELETE. It does not explicitly state alternatives like read_query for reads, but the sibling tool names provide context. Lacks explicit 'when-not-to-use' or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.6.2
    • First observedappend_insight
    • First observedcreate_table
    • First observeddescribe_table
    • First observedlist_tables
    • First observedread_query
    • First observedwrite_query

TDQS

B3.4/5.0
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
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    A
    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.
    90,042
    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,090
    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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LuisGuar/mcp-server-sqlite'

If you have feedback or need assistance with the MCP directory API, please join our Discord server