No MCP server required! Databasemix saves MySQL table information in one file for easy AI integration
This is Onkai Yuta (@fat47) from the Service Reliability Group (SRG) of the Media Headquarters.
#SRG(Service Reliability Group) is a group that mainly provides cross-sectional support for the infrastructure of our media services, improving existing services, launching new ones, and contributing to OSS.
This article describes how using a tool called databasemix to consolidate MySQL table information into a single file can be useful for utilizing AI.
I hope this helps in some way.
What is databasemix?How to easily use AI to process databasemix outputConfiguration imageUse it with Claude CodeSummary and future expectations
What is databasemix?
What do you do when you want to reference MySQL table information from a coding assistance AI?
Copying and pasting database information is a hassle to enter every time, and you need to be careful to make sure the information you enter is up to date.
Direct access to the database via an MCP server requires careful consideration of security, and requires the effort of preparing an MCP server for each user.
By setting up a system using databasemix, which we will introduce here, you can create an environment where AI can always access the latest MySQL table information without the need for an MCP server.
databasemixMySQL Unconference #010 in@tom__boThis is an OSS released by Mr. and was developed based on the idea of repomix, and has the function of outputting MySQL information in one file.
You can select from user and role information, table configuration, MySQL server variables, etc. and output them to one file.
For more details, please refer to @tom__bo's blog.
How to easily use AI to process databasemix output
Configuration image

Databasemix is run on the EC2 server and the output file is placed on a GitHub repository. The output does not include DB user information or role information, only table configuration information.
Due to my environment, there are many DB clusters, which means that many markdown files are generated.
When using AI, it was troublesome to have separate files for each cluster, so we added a process to concatenate and output the table configuration information for all clusters as a single file (00_all-tables.md).
Use it with Claude Code
00_all-tables.mdExample) Rules in CLAUDE.md
Also, since table configuration information is updated daily, I added a process using Claude Code's Hooks function to always pull the latest information.
Example) Add a process to automatically pull files with a specific path when reading and grepping in ~/.claude/settings.json.
This will ensure that coding assistance AI such as Claude Code always references the latest table information when providing answers.

Summary and future expectations
By simply cloning the GitHub repository, the AI can now always access the latest MySQL table information.
I think the biggest advantage is that there is no need to prepare an MCP server, so I would like many users (product development teams) to use it in the future.
Also,Not currently supportedHowever, if IAM database authentication is supported when using Aurora MySQL,RDS Data APIIt will be possible to use this and run it directly from Github Actions without the need for a stepping stone.
I'm also looking forward to support for databases other than MySQL!
If you are interested in SRG, please contact us here.
