db-mcp
Verified Safeby neverinfamous
Overview
An enterprise-grade Model Context Protocol (MCP) server providing advanced database operations, AI-native functionalities like vector search, and OAuth 2.1 authentication for SQLite databases.
Installation
docker run -i --rm -v $(pwd):/workspace writenotenow/db-mcp:latest --sqlite-native /workspace/database.dbEnvironment Variables
- DB_MCP_TOOL_FILTER
- TOOL_FILTER
- DATABASE_URI
- SQLITE_DATABASE
- SQLITE_PATH
- POSTGRES_URI
- POSTGRESQL_URI
- MYSQL_URI
- MONGODB_URI
- MONGO_URI
- REDIS_URI
- DBMCP_PORT
- DBMCP_OAUTH_ENABLED
- KEYCLOAK_URL
- KEYCLOAK_REALM
- KEYCLOAK_CLIENT_ID
- KEYCLOAK_CLIENT_SECRET
- LOG_LEVEL
Security Notes
The project demonstrates a strong commitment to security, including explicit SQL injection prevention via parameter binding, OAuth 2.1 compliance (RFC 9728/8414), strict TypeScript usage to prevent common bugs, and secure handling of sensitive configurations (e.g., environment variables for secrets, redaction in logs). CORS defaults to restrictive `origin: false`. CodeQL static analysis is integrated. No 'eval' or malicious patterns were found in the provided source code.
Similar Servers
sqlite-mcp
A Model Context Protocol (MCP) server that enables LLMs to interact with SQLite databases by providing tools and resources for querying and managing data.
sqlite-mcp-server
Provides an MCP interface for an SQLite database, offering a wide range of data management, advanced analytics, JSON processing, text/vector search, and geospatial capabilities.
mcp-sqlite-tools
A Model Context Protocol (MCP) server for LLMs to safely and efficiently interact with local SQLite databases, providing comprehensive operations from schema management to query execution and transactions.
DatabaseMcpServer
Provides a robust and secure database access layer for AI assistants, supporting 19 types of databases with single-instance multi-database dynamic switching and over 50 tools for data and schema management.