Implement multi-database support and insights management#8
Implement multi-database support and insights management#8dale-stewart wants to merge 1 commit intoexecuteautomation:mainfrom
Conversation
- Added support for multiple databases via a JSON configuration file, allowing simultaneous access to SQLite, SQL Server, PostgreSQL, and MySQL. - Introduced an insights database for storing business insights, with functionality to append and list insights. - Updated various handlers and tools to require a `dbId` parameter for database operations. - Enhanced README documentation to reflect new features and usage instructions for multi-database configuration and insights management. - Version updated to 1.1.0 in package.json and package-lock.json.
|
@dale-stewart - Love the idea, can you please help me update the Documentation of the change like how you mentioned in the Thanks, |
|
@dale-stewart with this would I able to run 2 mcp servers for two different MySQL connections? |
|
It would manage two connections from a single MCP server instance. My original motivation for doing this is that I could not get multiple instances of this MCP server working correctly with Cursor at the same time - it would get confused about which instance it was talking to. I haven't had any more time to work on this, so I've just been using the existing MCP server version one database at a time instead. |
| dbMetadatas[dbId] = { ...adapter.getMetadata(), description }; | ||
| } catch (error) { | ||
| throw new Error(`Failed to initialize database: ${(error as Error).message}`); | ||
| throw new Error(`Failed to initialize database '${dbId}': ${(error as Error).message}`); |
There was a problem hiding this comment.
| throw new Error(`Failed to initialize database '${dbId}': ${(error as Error).message}`); | |
| // throw new Error(`Failed to initialize database '${dbId}': ${(error as Error).message}`); |
Since I have multiple connections that are not always available, it would be cool if the init fails silently so I can work with the other DBs. AI can discover available dbIDs easily.
dbIdparameter for database operations.I've found this tool very useful in my work, but I am only able to use one instance of the server at a time. Because I wanted to access multiple databases simultaneously, I thought I would add that capability. I'm sure this could use some refinement, but I thought I would offer this pull request to start the conversation.