SQLite MCP Server

SQLite MCP Server

Enables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.

Category
Visit Server

README

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured