Sponsored by Deepsite.site

Easy Sqlite Mcp

Created By
chenkumia month ago
A Model Context Protocol (MCP) server implemented in Node.js and TypeScript, designed to enable LLMs to interact directly with SQLite databases.
Overview

Easy SQLite MCP

A Model Context Protocol (MCP) server implemented in Node.js and TypeScript, designed to enable LLMs to interact directly with SQLite databases.

Modes

Easy SQLite MCP supports two startup modes. The server description is generated at startup so MCP clients and agents can clearly understand which mode is active.

Manual Mode

Manual mode is used when SQLITE_PATH is not provided.

In this mode, the agent must explicitly open and close a database:

  1. Call sqlite_open(path) before using database tools.
  2. Use query, execute, and schema discovery tools.
  3. Call sqlite_close when finished.

Only one SQLite database file can be open at a time. Opening another file closes the previous connection first.

Server description:

Manual: This is a SQLite tool. Before using it, call sqlite_open(path) to open a database file. After use, call sqlite_close to close it. Only one database file can be open at a time.

Available tools in Manual mode:

  • sqlite_open
  • sqlite_close
  • sqlite_status
  • sqlite_query
  • sqlite_execute
  • sqlite_list_tables
  • sqlite_describe_table

Fixed Mode

Fixed mode is used when SQLITE_PATH is provided as an environment variable.

In this mode, the server automatically opens the configured SQLite database during startup. The agent does not need to call sqlite_open, and connection switching is disabled.

Server description:

Fixed: This is a SQLite tool connected to Path:<SQLITE_PATH>

Available tools in Fixed mode:

  • sqlite_status
  • sqlite_query
  • sqlite_execute
  • sqlite_list_tables
  • sqlite_describe_table

Example:

SQLITE_PATH=/data/app.sqlite npx easy-sqlite-mcp

Features

This server provides SQLite tools covering all requirements from connection management to data querying:

  1. Connection Management:
    • sqlite_open: Open a specific SQLite database file path. Manual mode only.
    • sqlite_close: Close the current database connection. Manual mode only.
    • sqlite_status: Check connection status, file path, and database summary.
  2. Data Operations:
    • sqlite_query: Execute read-only SELECT queries and return results in a structured format.
    • sqlite_execute: Execute write or modification operations (e.g., INSERT, UPDATE, DELETE, CREATE, DROP).
  3. Schema Discovery:
    • sqlite_list_tables: List all user-defined tables in the database.
    • sqlite_describe_table: Get column information, types, and total row count for a specific table.

Installation and Execution

1. Run via npx

If the project is published on npm, you can start it directly using npx without prior installation:

npx easy-sqlite-mcp

2. Local Development and Build

To develop locally or build from source, follow these steps:

npm install
npm run build
npm run dev # Watch for changes and run in development mode

Claude Desktop Example

Manual mode:

{
  "mcpServers": {
    "easy-sqlite-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "easy-sqlite-mcp"
      ]
    }
  }
}

Fixed mode example:

{
  "mcpServers": {
    "easy-sqlite-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "easy-sqlite-mcp"
      ],
      "env": {
        "SQLITE_PATH": "/absolute/path/to/database.sqlite"
      }
    }
  }
}

Codex config.toml Example

Manual mode:

[mcp_servers.easy-sqlite-mcp]
args = ["-y", "easy-sqlite-mcp"]
command = "npx"
enabled = true

Fixed mode example:

[mcp_servers.easy-sqlite-mcp]
args = ["-y", "easy-sqlite-mcp"]
command = "npx"
enabled = true

[mcp_servers.easy-sqlite-mcp.env]
SQLITE_PATH = "/absolute/path/to/database.sqlite"

OpenCode opencode.jsonc Example

Manual mode:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "easy-sqlite-mcp": {
      "type": "local",
      "command": ["npx", "-y", "easy-sqlite-mcp"],
      "enabled": true,
    },
  },
}

Fixed mode example:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "easy-sqlite-mcp": {
      "type": "local",
      "command": ["npx", "-y", "easy-sqlite-mcp"],
      "enabled": true,
      "environment": {
        "SQLITE_PATH": "/absolute/path/to/database.sqlite"
      },
    },
  },
}

Tech Stack

  • Runtime: Node.js (>= 18)
  • Language: TypeScript
  • SDK: @modelcontextprotocol/sdk
  • Database: better-sqlite3 (High performance with support for synchronous operations)
  • Validation: Zod (Strict parameter validation)

Developed with the assistance of Antigravity.

Server Config

{
  "mcpServers": {
    "easy-sqlite-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "easy-sqlite-mcp"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
Tavily Mcp
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Playwright McpPlaywright MCP server