Amazon Bedrock Converse API and Database MCP Server Integration
@aws-samples
关于 Amazon Bedrock Converse API and Database MCP Server Integration
暂无概览
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Amazon Bedrock Converse API and Database MCP Server Integration?
This sample integrates AWS Bedrock’s Converse API with relational databases (RDS PostgreSQL and SQLite) through the Model Context Protocol (MCP) Server. It enables natural language querying of databases in read-only mode using Bedrock foundation models, serving as a reference for adding Generative AI capabilities to database applications.
How to use Amazon Bedrock Converse API and Database MCP Server Integration?
Clone the repository, set up a Python virtual environment with Node.js (≥v10.13.0), install AWS CDK and dependencies, configure AWS CLI credentials, and install the PostgreSQL MCP server. Edit src/config/dbconfig.ini with RDS PostgreSQL credentials. Run python3 chat.py --db-type [sqlite / postgres] from the src directory to start a chat session. If no database type is given, SQLite is used by default.
Key features of Amazon Bedrock Converse API and Database MCP Server Integration
- Integration of RDS PostgreSQL and SQLite with AWS Bedrock Foundation Models via MCP
- Bedrock Converse API for real‑time, conversational interactions with databases
- Natural language database querying (read‑only) using Bedrock models
- Secure and efficient database operations handled by the MCP Server
- Foundation for cross‑database GenAI solutions
Use cases of Amazon Bedrock Converse API and Database MCP Server Integration
- Query an RDS PostgreSQL database using natural language instead of SQL
- Run read‑only queries against a local SQLite database through a chat interface
- Add Generative AI query capabilities to existing database‑driven applications
FAQ from Amazon Bedrock Converse API and Database MCP Server Integration
What prerequisites are required?
An AWS account with IAM permissions to create an RDS PostgreSQL database, access to Bedrock LLMs, a read‑only database user, Python with Boto3, an IDE (e.g., VS Code), a local SQLite database, and the AWS RDS root certificate.
Which database types are supported?
The sample directly supports RDS PostgreSQL and local SQLite. The pattern can be adapted for other database systems that support MCP Server integration.
How do I run the application?
After setup, execute python3 chat.py --db-type [sqlite / postgres] from the src directory. For PostgreSQL, ensure src/config/dbconfig.ini contains correct database connection details.
What costs are incurred by running this sample?
You will pay for the RDS PostgreSQL instance, Bedrock Claude model API usage, and any configured Bedrock Guardrails. Costs depend on usage and uptime; delete resources when done.
Is querying strictly read‑only?
Yes. The sample operates in query‑only mode. DDL operations are prevented at the LLM level via optional Bedrock Guardrails, and the database user provided should have read‑only privileges.
数据库 分类下的更多 MCP 服务器
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
评论