Provides database operation tools for connecting to and managing MongoDB databases with support for OAuth 2.0 authentication and granular access control
Provides database operation tools for connecting to and managing MySQL databases with support for OAuth 2.0 authentication and granular access control
Provides database operation tools for connecting to and managing PostgreSQL databases with support for OAuth 2.0 authentication and granular access control
Provides database operation tools for connecting to and managing Redis databases with support for OAuth 2.0 authentication and granular access control
Provides database operation tools for connecting to and managing SQLite databases with support for OAuth 2.0 authentication and granular access control
db-mcp
β οΈ UNDER DEVELOPMENT - This project is actively being developed and is not yet ready for production use.
A multi-database Model Context Protocol (MCP) server written in TypeScript, featuring OAuth 2.0 authentication, tool filtering, and granular access control.
Features
π OAuth 2.0 Authentication - Secure access with token-based authentication
π‘οΈ Tool Filtering - Control which database operations are exposed
π₯ Access Control - Limit users to read-only operations or specific databases
ποΈ Multi-Database Support - Connect to multiple database types simultaneously
β‘ Code Mode Architecture - Built using the MCP SDK for maximum flexibility
Architecture
This server is built in Code Mode using the official MCP TypeScript SDK, rather than using stdio-based configuration. This architectural choice enables:
Capability | Benefit |
Dynamic Tool Registration | Register/unregister database tools at runtime based on user permissions |
OAuth 2.0 Integration | Implement authentication middleware before tool execution |
Per-Request Context | Access user identity, scopes, and database restrictions per request |
Tool Filtering | Programmatically control which tools are available to each user |
Multi-Tenancy | Support multiple users with different database access levels |
Supported Databases
Database | Status | Priority |
SQLite | π Planned | High |
MySQL | π Planned | High |
PostgreSQL | π Planned | High |
MongoDB | π Planned | High |
Redis | π Planned | High |
SQL Server | π Planned | Low |
Installation
Usage
OAuth 2.0 Access Control
The server supports granular access control through OAuth 2.0 scopes:
Scope | Description |
| Read-only access to all databases |
| Read and write access to all databases |
| Full administrative access |
Planned Features
Database-level restrictions - Limit users to specific databases
Table-level restrictions - Limit users to specific tables within databases
Operation-level filtering - Allow/deny specific SQL operations
Roadmap
Core MCP server implementation
SQLite adapter
MySQL adapter
PostgreSQL adapter
MongoDB adapter
Redis adapter
OAuth 2.0 integration
Tool filtering system
Access control layer
SQL Server adapter
Contributing
Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.
Security
For security concerns, please see our Security Policy.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Code of Conduct
Please read our Code of Conduct before participating in this project.