MCP SQLite Server

MCP SQLite Server

A Model Context Protocol server for interacting with SQLite databases.

65
Stars
10
Forks
65
Watchers
1
Issues
MCP SQLite Server enables comprehensive interaction with SQLite databases via the Model Context Protocol. It allows users to perform full CRUD operations, explore database schema, and execute custom SQL queries in a standardized, MCP-compatible way. Designed for integration with modern IDEs, it streamlines database management and introspection for developers and AI model workflows.

Key Features

Full CRUD operations for SQLite tables
Database schema exploration and introspection
Custom SQL query execution
Protocol-based tool integration
VSCode and Cursor IDE compatibility
Modular and extendable command-line interface
Structured JSON tool call format
Filtered record querying with limits and offsets
Automatic database connection via argument path
Table schema retrieval

Use Cases

Automating database management from IDEs
Integrating SQLite workflows into AI models and agents
Rapid prototyping of database-backed applications
Context-aware tool use in AI coding assistants
Data analysis via standardized protocol commands
Scripting repeatable database operations
Schema investigation before application development
Facilitating collaborative database editing
Building extensions for protocol-driven tools
Monitoring and maintaining SQLite databases remotely

README

🐇 MCP SQLite Server

This is a Model Context Protocol (MCP) server that provides comprehensive SQLite database interaction capabilities.

cursor-settings

Maintained by

Features

  • Complete CRUD operations (Create, Read, Update, Delete)
  • Database exploration and introspection
  • Execute custom SQL queries

Setup

Define the command in your IDE's MCP Server settings:

e.g. Cursor:

json
{
    "mcpServers": {
        "MCP SQLite Server": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-sqlite",
                "<path-to-your-sqlite-database.db>"
            ]
        }
    }
}

e.g. VSCode:

json
{
    "servers": {
        "MCP SQLite Server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-sqlite",
                "<path-to-your-sqlite-database.db>"
            ]
        }
    }
}

cursor-settings

Your database path must be provided as an argument.

Available Tools

Database Information

db_info

Get detailed information about the connected database.

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "db_info",
    "arguments": {}
  }
}

list_tables

List all tables in the database.

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "list_tables",
    "arguments": {}
  }
}

get_table_schema

Get detailed information about a table's schema.

Parameters:

  • tableName (string): Name of the table

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "get_table_schema",
    "arguments": {
      "tableName": "users"
    }
  }
}

CRUD Operations

create_record

Insert a new record into a table.

Parameters:

  • table (string): Name of the table
  • data (object): Record data as key-value pairs

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "create_record",
    "arguments": {
      "table": "users",
      "data": {
        "name": "John Doe",
        "email": "john@example.com",
        "age": 30
      }
    }
  }
}

read_records

Query records from a table with optional filtering.

Parameters:

  • table (string): Name of the table
  • conditions (object, optional): Filter conditions as key-value pairs
  • limit (number, optional): Maximum number of records to return
  • offset (number, optional): Number of records to skip

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "read_records",
    "arguments": {
      "table": "users",
      "conditions": {
        "age": 30
      },
      "limit": 10,
      "offset": 0
    }
  }
}

update_records

Update records in a table that match specified conditions.

Parameters:

  • table (string): Name of the table
  • data (object): New values as key-value pairs
  • conditions (object): Filter conditions as key-value pairs

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "update_records",
    "arguments": {
      "table": "users",
      "data": {
        "email": "john.updated@example.com"
      },
      "conditions": {
        "id": 1
      }
    }
  }
}

delete_records

Delete records from a table that match specified conditions.

Parameters:

  • table (string): Name of the table
  • conditions (object): Filter conditions as key-value pairs

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "delete_records",
    "arguments": {
      "table": "users",
      "conditions": {
        "id": 1
      }
    }
  }
}

Custom Queries

query

Execute a custom SQL query against the connected SQLite database.

Parameters:

  • sql (string): The SQL query to execute
  • values (array, optional): Array of parameter values to use in the query

Example:

json
{
  "method": "tools/call",
  "params": {
    "name": "query",
    "arguments": {
      "sql": "SELECT * FROM users WHERE id = ?",
      "values": [1]
    }
  }
}

Built with


Appreciation

If you enjoy this library please consider sending me a tip to support my work 😀

🍵 tip me here

Star History

Star History Chart

Repository Owner

jparkerweb
jparkerweb

User

Repository Details

Language JavaScript
Default Branch main
Size 435 KB
Contributors 1
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

JavaScript
100%

Tags

Topics

aitooling cursor database development mcp nodejs sqlite windsurf

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP libSQL by xexr

    MCP libSQL by xexr

    Secure, protocol-compliant libSQL database server for MCP-enabled clients.

    MCP libSQL by xexr provides a Model Context Protocol (MCP) server designed for secure database access and management via libSQL. It enables database operations—such as querying, table management, and schema inspection—through standardized MCP tools, ensuring compatibility with clients like Claude Desktop and Cursor. The project emphasizes robust security validation, audit logging, and comprehensive error handling. Users benefit from production-ready deployment, extensive test coverage, and streamlined integration with MCP-compatible platforms.

    • 16
    • MCP
    • Xexr/mcp-libsql
  • SkySQL MCP Server

    SkySQL MCP Server

    Serverless MariaDB database management with AI-powered agents via Model Context Protocol.

    SkySQL MCP Server implements the Model Context Protocol to provide a robust interface for launching and managing serverless MariaDB and MySQL database instances. It offers capabilities to interact with AI-powered agents for intelligent database operations, execute SQL queries, and manage credentials and security settings. Integration with tools like MCP CLI, Smithery.ai, and Cursor.sh is supported for interactive usage. Designed for efficiency and scalability, it enables streamlined database workflows with advanced AI assistance.

    • 2
    • MCP
    • skysqlinc/skysql-mcp
  • Nile MCP Server

    Nile MCP Server

    A Model Context Protocol (MCP) server for managing databases on the Nile platform through standardized interfaces.

    Nile MCP Server implements the Model Context Protocol to enable seamless integration between LLM applications and the Nile database platform. It provides standardized APIs for database and credential management, SQL execution, and region discovery. Written in TypeScript, the server focuses on type safety, comprehensive error handling, and robust input validation. It supports easy installation and integration with Claude Desktop for advanced AI workflows.

    • 16
    • MCP
    • niledatabase/nile-mcp-server
  • Code Declaration Lookup MCP Server

    Code Declaration Lookup MCP Server

    Fast, language-agnostic code declaration search and lookup server via MCP.

    Provides a Model Context Protocol (MCP) server that indexes code declarations using universal ctags and SQLite with FTS5 full-text search. Offers search and listing functionality for functions, classes, structures, enums, and other code elements across any language supported by ctags. Enables seamless integration with coding agents for dynamic indexing, respects .gitignore, and supports ctags file ingestion and management.

    • 2
    • MCP
    • osinmv/function-lookup-mcp
  • XiYan MCP Server

    XiYan MCP Server

    A server enabling natural language queries to SQL databases via the Model Context Protocol.

    XiYan MCP Server is a Model Context Protocol (MCP) compliant server that allows users to query SQL databases such as MySQL and PostgreSQL using natural language. It leverages the XiYanSQL model, providing state-of-the-art text-to-SQL translation and supports both general LLMs and local deployment for enhanced security. The server lists available database tables as resources and can read table contents, making it simple to integrate with different applications.

    • 218
    • MCP
    • XGenerationLab/xiyan_mcp_server
  • Bear MCP Server

    Bear MCP Server

    Read-only Model Context Protocol server for Bear note integration

    Bear MCP Server provides a Model Context Protocol (MCP) interface to access notes and tags stored in the Bear note-taking app. It enables AI assistants, including Claude, to securely interact with Bear notes through read-only operations, connecting directly to the Bear SQLite database without the risk of modifying user data. The server exposes tools for searching, opening, and listing notes and tags, ensuring all access is non-destructive.

    • 14
    • MCP
    • bart6114/my-bear-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results