Skip to main content
Glama
Dali5599

Mcp Server Sqlite Fast

by Dali5599

Mcp Server Sqlite Fast 🦈⭐

Stars License: MIT PRs Welcome TypeScript Model Context Protocol Engineered by Requin

High-performance Model Context Protocol (MCP) server providing secure read/write queries, schema introspection, and execution plan analysis for SQLite with zero external binary dependencies.


⚑ Highlights

  • Zero Native C++ Compilation Woes: Built on Node 24 native synchronous SQLite (node:sqlite), guaranteed instant startup without node-gyp errors.

  • Introspection & Schema Discovery: Auto-inspects tables, foreign keys, indexes, and column types.

  • Strict Read-Only Guardrails: Enforces safety constraints to prevent accidental database drops or mutations during agent autonomous exploration.

  • Explain Query Plan: Built-in EXPLAIN execution plan tool for database indexing recommendations.

  • Universal AI Agent Compatibility: Plug-and-play with Claude Code, Cursor, Windsurf, Zed, and any MCP-compliant client.


Related MCP server: sql-guard-mcp

πŸš€ Quickstart

1. Installation & Build

git clone https://github.com/Dali5599/mcp-server-sqlite-fast.git
cd mcp-server-sqlite-fast
npm install
npm run build

2. Configure with Claude Desktop or Claude Code

Add to your claude_desktop_config.json or mcp.json:

{
  "mcpServers": {
    "sqlite-fast": {
      "command": "node",
      "args": [
        "/path/to/mcp-server-sqlite-fast/dist/index.js"
      ]
    }
  }
}

πŸ› οΈ Available MCP Tools

Tool

Parameters

Description

list_tables

db_path

Lists all tables, views, and schemas in the SQLite database.

describe_table

db_path, table_name

Introspects table columns, primary keys, and foreign keys.

execute_query

db_path, query, params, read_only

Executes SQL queries with optional parameterized arguments.

explain_query

db_path, query

Analyzes execution plan to optimize indexing and query performance.


πŸ§ͺ Testing

npm test

All 5 automated unit tests execute with sub-millisecond latency.


πŸ“œ License

MIT License - Developed with precision by Dali & Requin Autonomous AI.

Available Tools

4 tools
describe_tableB

Introspect table schema, column types, primary keys, and foreign keys.

NameRequiredDescriptionDefault
db_pathYesPath to SQLite database file.
table_nameYesName of the table to inspect.

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. 'Introspect' signals a non-mutating read, and because there is no output schema, naming the returned fields (column types, PKs, FKs) is genuinely valuable. But it says nothing about behavior on a missing table or whether views/indexes are covered.

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?

One sentence, front-loaded with the verb and terminated by the concrete return fields. No waste, though the bare enumeration reads slightly like a field list rather than prose guidance.

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

Completeness4/5

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

For a two-parameter read-only introspection tool with no annotations and no output schema, the description covers the essential shape of what comes back. The gaps are edge-case behavior (nonexistent table, views) rather than anything blocking a correct call.

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

Parameters2/5

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

Schema description coverage is 100% and both parameters are documented there, so the description adds nothing. It never mentions db_path or table_name, leaving format expectations (relative vs absolute path, schema-qualified names) entirely to the schema, which is minimal.

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?

States a specific verb ('Introspect') plus resource ('table') and enumerates exactly what is surfaced: schema, column types, primary keys, foreign keys. That enumeration implicitly separates it from list_tables and execute_query, though no sibling is named explicitly.

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?

Usage is only implied by the verb: an agent would reasonably infer 'call this before writing a query against an unfamiliar table.' There is no explicit when-to-use, no statement of preferred alternative (e.g., list_tables to discover names first), and no prerequisites.

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

execute_queryC

Execute a read-only or read/write SQL query with safety constraints.

NameRequiredDescriptionDefault
queryYesSQL query string (SELECT, INSERT, UPDATE, etc.).
paramsNoOptional positional parameters for parameterized execution.
db_pathYesPath to SQLite database file.
read_onlyNoEnforce read-only constraint (default: true).

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and 'with safety constraints' is an unelaborated claim β€” it never says which constraints (multi-statement blocking, write gating, transaction behavior, error shapes). For a tool that can mutate a database, the side effects, reversibility and permission requirements are undisclosed.

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?

A single front-loaded sentence with no redundancy. However, the trailing phrase 'with safety constraints' is vague filler that signals a capability without describing it, so it doesn't fully earn its place.

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?

A mutation-capable, four-parameter tool with no annotations and no output schema needs the description to cover safety behavior, write-mode consequences and result shape. None of that is present, leaving the agent without enough context to invoke it 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 description coverage is 100%, so all four parameters are already documented in structured data, and the description adds no syntax, format or interaction detail beyond it. Baseline 3 applies since the schema does the heavy lifting.

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?

States a specific verb (execute) and resource (SQL query) and notes both read-only and read/write modes. It never names a sibling, so an agent must infer that it should not use this for schema inspection (list_tables/describe_table) or plan analysis (explain_query). Clear purpose, but no explicit differentiation.

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?

There is no guidance on when to use this tool versus list_tables, describe_table or explain_query, and no guidance on when to flip read_only to false. Usage is only implied by the verb. The read_only default is documented in the schema but the description doesn't explain the tradeoff.

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

explain_queryB

Get the SQLite EXPLAIN QUERY PLAN analysis to optimize indexing.

NameRequiredDescriptionDefault
queryYesSQL query to explain.
db_pathYesPath to SQLite database file.

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It implies a non-mutating analysis step, which is the key behavioral trait versus execute_query, but never states that the query is not actually executed, nor anything about permissions, cost, or safety. It adds partial behavioral signal only.

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?

A single front-loaded sentence with no filler; every clause earns its place. It is arguably too terse for what it must convey, but it is not padded.

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?

No output schema and no annotations, yet the description says nothing about what the EXPLAIN QUERY PLAN result looks like (plan rows), nor that the query is only analyzed rather than run. For an analysis tool whose output the agent must interpret, this leaves a meaningful gap.

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 both db_path and query are already documented in the schema. The description adds no format guidance, e.g. whether query may contain parameters or multiple statements. Baseline 3 applies.

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 names a specific verb ('Get') and a precise resource ('SQLite EXPLAIN QUERY PLAN analysis') with a stated purpose (optimize indexing). It is clearly distinct from list_tables and describe_table, though it never explicitly contrasts itself with execute_query, the closest sibling.

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 phrase 'to optimize indexing' implies the use case (query performance tuning), but there is no explicit statement of when to prefer this over execute_query or what preconditions apply. Usage is inferable rather than guided.

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

list_tablesB

List all tables, views, and row counts in a SQLite database.

NameRequiredDescriptionDefault
db_pathYesAbsolute or relative path to SQLite database file.

TDQS

B3.4/5.0
Behavior3/5

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

No annotations provided, so the description carries the burden. 'List' implies a read-only operation and it discloses the return content (tables, views, row counts), which is useful. It does not say whether row counts are exact or estimated (which can be expensive on large DBs), whether system/internal tables are included, or anything about permissions.

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?

A single front-loaded sentence that names the resource and the returned fields with zero filler. Nothing could be removed without losing information.

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

Completeness4/5

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

For a one-parameter read tool with no output schema, the description covers what is returned and the environment (SQLite). Minor gaps remain around row-count cost and inclusion of internal tables, but an agent has enough to invoke it correctly.

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 db_path is already documented as a path to the SQLite file. The description adds no further meaning such as whether the path must exist or how relative paths resolve, so the schema does all the work.

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?

States a specific verb (List) and enumerates exactly what it returns: tables, views, and row counts in a SQLite database. This naturally separates it from describe_table and execute_query, though it never names those siblings explicitly.

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 call this versus describe_table, execute_query, or explain_query, and no prerequisites or exclusions are stated. The agent must infer that this is the discovery step before describe_table.

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.

  1. 4 tool updatesv1.0.0
    • First observeddescribe_table
    • First observedexecute_query
    • First observedexplain_query
    • First observedlist_tables

TDQS

A3.5/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a distinct primary purpose: listing tables, describing schema, executing SQL, and explaining query plans. There is mild overlap because execute_query could run EXPLAIN statements, but the specialized explain_query makes the intent clear.

Naming Consistency5/5

All four tools follow a consistent snake_case verb_noun pattern: list_tables, describe_table, execute_query, explain_query. The convention is predictable throughout.

Tool Count5/5

Four tools are well-scoped for a focused SQLite query/analysis server. Each tool earns its place without redundant surface area.

Completeness4/5

The surface covers discovery, schema introspection, query execution, and query-plan optimization. Some database operations like index listing or explicit transaction management rely on execute_query, which is a minor gap rather than a blocker.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Lets AI agents query local SQLite database files read-only using Node's built-in sqlite module, providing tools for listing tables, describing schemas, and running SQL queries.
    3
    5 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to safely query and explore SQLite databases through read-only, guard-protected tools that block writes, sensitive table access, and runaway queries.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to safely explore and query databases across SQLite, PostgreSQL, MySQL, and MSSQL, with schema introspection, natural language queries, and data profiling.
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables AI assistants to safely run read-only SQL against SQLite databases through whitelist-validated queries, capped result sets, and confined file paths. It also exposes schema inspection so models can discover tables and columns before querying.
    2
    MIT