Skip to content

Conversation

stephaneminisini
Copy link

This PR adds the ability to pass arguments to the command line rather than using environment variables. This can be useful in case we want to run several mysql mcp servers on the same host.

- Add getopt-based command line parsing to get_db_config()
- Support short and long options for host, port, user, password, database
- Add charset and collation command line options
- Command line args take precedence over environment variables
- Add print_usage() function with help text
- Update README.md with command line usage documentation
- Add test fixtures and tests for command line argument parsing
- Fix deprecated get_server_info() calls to use server_info property
- Remove --help option and print_usage() function
- Remove help-related code from getopt parsing
- Update README to remove --help documentation
- MCP servers are not meant to be run directly from command line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant