aWiseKing

SQLite MCP Server

Community aWiseKing
Updated

This is a Model Context Protocol (MCP) server that provides access to a SQLite database. It allows AI assistants (like Trae) to query and modify SQLite databases directly.

SQLite MCP Server

This is a Model Context Protocol (MCP) server that provides access to a SQLite database. It allows AI assistants (like Trae) to query and modify SQLite databases directly.

Features

  • Read Queries: Execute SELECT queries to retrieve data.
  • Write Queries: Execute INSERT, UPDATE, DELETE queries to modify data.
  • Schema Inspection: List tables and describe table schemas.
  • Secure: Runs locally on your machine.

Prerequisites

  • Python 3.10 or higher
  • pip (Python package installer)

Installation

  1. Clone or download this repository.
  2. Install the required dependencies:
pip install -r requirements.txt

Usage

You can run the server directly from the command line:

python main.py --db path/to/your/database.sqlite

If the database file does not exist, it will be created automatically when you perform a write operation.

Configuration in Trae

To use this MCP server in Trae, you need to add it to your MCP configuration file.

  1. Open Trae.
  2. Go to Settings -> MCP Servers (or edit the configuration file directly if you know the location, typically ~/.config/trae/config.json or similar depending on OS).
  3. Add the following configuration:
{
  "mcpServers": {
    "sqlite": {
      "command": "python",
      "args": [
        "absolute/path/to/sqlite_mcp/main.py",
        "--db",
        "absolute/path/to/your/database.sqlite"
      ]
    }
  }
}

Note:

  • Replace absolute/path/to/sqlite_mcp/main.py with the full path to the main.py file in this project.
  • Replace absolute/path/to/your/database.sqlite with the full path to your SQLite database file.
  • On Windows, use double backslashes \\ or forward slashes / in paths (e.g., "C:\\Users\\Name\\sqlite_mcp\\main.py").

API Documentation

Tools

read_query

Executes a SELECT query on the SQLite database.

  • Input: query (string) - The SQL SELECT query.
  • Output: List of dictionaries representing the rows.
write_query

Executes an INSERT, UPDATE, or DELETE query.

  • Input: query (string) - The SQL modification query.
  • Output: Success message with row count.
list_tables

Lists all tables in the database.

  • Input: None.
  • Output: List of table names.
describe_table

Gets the schema for a specific table.

  • Input: table_name (string).
  • Output: List of column definitions.

MCP Server ยท Populars

MCP Server ยท New

    ForLoopCodes

    Context+

    Semantic Intelligence for Large-Scale Engineering. Context+ is an MCP server designed for developers who demand 99% accuracy. By combining RAG, Tree-sitter AST, Spectral Clustering, and Obsidian-style linking, Context+ turns a massive codebase into a searchable, hierarchical feature graph.

    Community ForLoopCodes
    Averyy

    PCB Parts MCP Server

    MCP server for searching electronic components for PCB assembly

    Community Averyy
    ZachHandley

    ZMCPTools

    A custom TypeScript MCP Server intended to be used with Claude Code

    Community ZachHandley
    mnemox-ai

    TradeMemory Protocol

    MCP server for AI trading memory โ€” outcome-weighted cognitive memory with 10 tools, 399 tests.

    Community mnemox-ai
    Invoke-RE

    BinjaLattice

    Plugin interface for remote communications with Binary Ninja database and MCP server for interfacing with LLMs.

    Community Invoke-RE