sqlite-mcp-server
by NANDINIGC22
Overview
Provides a dynamic SQLite database server as an MCP tool, allowing creation, table management, data insertion, and natural language querying of databases.
Installation
python server.pySecurity Notes
CRITICAL security risks identified: 1. Arbitrary File System Access: The `mcp.json` explicitly grants full file system access to `C:/`, which is extremely dangerous and allows the server to read, write, or delete any file on the drive. 2. SQL Injection (create_table): The `columns` parameter in `create_table` is directly concatenated into the SQL query without proper sanitization, allowing malicious SQL injection via crafted column names or types. 3. SQL Injection (insert_records): The keys of `records` (used as column names) in `insert_records` are directly concatenated into the SQL query, making it vulnerable to injection if an attacker controls the record keys. 4. SQL Injection (prompt_query): The `table_name` parameter in `nl_to_sql` (called by `prompt_query`) is directly inserted into the `SELECT` query, creating a severe SQL injection vulnerability where an attacker can execute arbitrary SQL commands by manipulating the table name. 5. Hardcoded Path: `BASE_DIR` is hardcoded to a Windows path (`C:\AIProjects\MCPPROJECTS`), which is poor practice and reduces portability.
Similar Servers
mcp-sqlite-tools
An MCP server enabling AI assistants to perform comprehensive, secure, and efficient SQLite database operations on local files, including data manipulation, schema changes, and transaction management.
python-mcp-server
This repository demonstrates how to implement a Model Context Protocol (MCP) server in Python, showcasing STDIO, Server-Sent Events (SSE), and Streamable HTTP connection modes for integrating AI tools.
mcp-sqlite
An MCP server enabling interaction with SQLCipher-encrypted SQLite databases, offering features for schema exploration, data querying, and CRUD operations.
sqlite-mcp
Enables Large Language Models to query a local SQLite database for information via the Model Context Protocol (MCP).