SQLite MCP Server
Provides access to SQLite databases, allowing AI assistants to execute read and write queries, list tables, and inspect table schemas.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SQLite MCP ServerShow me the first 10 rows from the products table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
SELECTqueries to retrieve data.Write Queries: Execute
INSERT,UPDATE,DELETEqueries to modify data.Schema Inspection: List tables and describe table schemas.
Secure: Runs locally on your machine.
Related MCP server: SQLite MCP Server
Prerequisites
Python 3.10 or higher
pip(Python package installer)
Installation
Clone or download this repository.
Install the required dependencies:
pip install -r requirements.txtUsage
You can run the server directly from the command line:
python main.py --db path/to/your/database.sqliteIf 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.
Open Trae.
Go to Settings -> MCP Servers (or edit the configuration file directly if you know the location, typically
~/.config/trae/config.jsonor similar depending on OS).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.pywith the full path to themain.pyfile in this project.Replace
absolute/path/to/your/database.sqlitewith 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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
- OleanderOAuthdev.oleander
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.7MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with SQLite databases by connecting to database files, listing tables, describing schemas, and executing queries.6782MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query databases via natural language using the Model Context Protocol, with automatic schema discovery, SQL query execution, and read-only safety checks.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to connect to and query an SQLite database through the Model Context Protocol, allowing natural language interaction with database tables and data.-