mirror of
https://github.com/executeautomation/mcp-database-server.git
synced 2025-12-09 21:12:57 +08:00
feat: Add AWS IAM authentication support for MySQL
- Add @aws-sdk/rds-signer dependency for RDS auth token generation - Extend CLI arguments with --aws-iam-auth and --aws-region options - Implement automatic AWS RDS auth token generation in MySQL adapter - Auto-enable SSL for AWS IAM authentication (required by RDS) - Add comprehensive error handling for AWS credential issues - Update documentation with AWS IAM authentication examples - Maintain backward compatibility with existing authentication methods Resolves the need for secure AWS RDS connections without hardcoded passwords.
This commit is contained in:
44
readme.md
44
readme.md
@@ -94,6 +94,8 @@ Optional parameters:
|
||||
|
||||
### MySQL Database
|
||||
|
||||
#### Standard Authentication
|
||||
|
||||
To use with a MySQL database:
|
||||
|
||||
```
|
||||
@@ -111,6 +113,23 @@ Optional parameters:
|
||||
- `--ssl`: Enable SSL connection (true/false or object)
|
||||
- `--connection-timeout`: Connection timeout in milliseconds (default: 30000)
|
||||
|
||||
#### AWS IAM Authentication
|
||||
|
||||
For Amazon RDS MySQL instances with IAM database authentication:
|
||||
|
||||
```
|
||||
node dist/src/index.js --mysql --aws-iam-auth --host <rds-endpoint> --database <database-name> --user <aws-username> --aws-region <region>
|
||||
```
|
||||
|
||||
Required parameters:
|
||||
- `--host`: RDS endpoint hostname
|
||||
- `--database`: Name of the database
|
||||
- `--aws-iam-auth`: Enable AWS IAM authentication
|
||||
- `--user`: AWS IAM username (also the database user)
|
||||
- `--aws-region`: AWS region where RDS instance is located
|
||||
|
||||
Note: SSL is automatically enabled for AWS IAM authentication
|
||||
|
||||
## Configuring Claude Desktop
|
||||
|
||||
### Direct Usage Configuration
|
||||
@@ -164,6 +183,19 @@ If you installed the package globally, configure Claude Desktop with:
|
||||
"--user", "your-username",
|
||||
"--password", "your-password"
|
||||
]
|
||||
},
|
||||
"mysql-aws": {
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"-y",
|
||||
"@executeautomation/database-server",
|
||||
"--mysql",
|
||||
"--aws-iam-auth",
|
||||
"--host", "your-rds-endpoint.region.rds.amazonaws.com",
|
||||
"--database", "your-database-name",
|
||||
"--user", "your-aws-username",
|
||||
"--aws-region", "us-east-1"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,6 +248,18 @@ For local development, configure Claude Desktop to use your locally built versio
|
||||
"--user", "your-username",
|
||||
"--password", "your-password"
|
||||
]
|
||||
},
|
||||
"mysql-aws": {
|
||||
"command": "node",
|
||||
"args": [
|
||||
"/absolute/path/to/mcp-database-server/dist/src/index.js",
|
||||
"--mysql",
|
||||
"--aws-iam-auth",
|
||||
"--host", "your-rds-endpoint.region.rds.amazonaws.com",
|
||||
"--database", "your-database-name",
|
||||
"--user", "your-aws-username",
|
||||
"--aws-region", "us-east-1"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user