Multi-DB Support and Schema-Specific Permissions #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two major features to the MCP-Server-MySQL:
These changes address the limitation where the server could only connect to a single database at a time, which was hindering progress on several projects.
Changes
New Features
Multi-DB Mode
MYSQL_DB
is empty, the server can connect to all databases the MySQL user has access toSchema-Specific Permissions
SCHEMA_INSERT_PERMISSIONS
SCHEMA_UPDATE_PERMISSIONS
SCHEMA_DELETE_PERMISSIONS
SCHEMA_DDL_PERMISSIONS
database1:true,database2:false
DDL Operations Support
ALLOW_DDL_OPERATION
global permission flagImplementation Details
index.ts
to support multi-DB connections and schema-specific permissionsDocumentation
Testing
Added new test cases:
Security Considerations
Backwards Compatibility
This change is fully backwards compatible. Existing configurations will continue to work as before, with the new features being opt-in.