Amazon Bedrock Converse API and Database MCP Server Integration
by aws-samples
This sample demonstrates integrating AWS Bedrock's Conversational AI with relational databases using the Model Context Protocol (MCP) Server. It enables natural language interactions with databases in query-only mode, leveraging Bedrock's Converse API.
Last updated: N/A
What is Amazon Bedrock Converse API and Database MCP Server Integration?
This is a reference implementation for integrating AWS Bedrock's Conversational AI capabilities with relational databases through the Model Context Protocol (MCP) Server architecture. It allows natural language querying of databases in read-only mode.
How to use Amazon Bedrock Converse API and Database MCP Server Integration?
Clone the repository, set up your development environment (VS Code, Node.js, AWS CDK, AWS CLI, Python), configure the database connection, and run the chat application with the appropriate database type option (SQLite or PostgreSQL). You can then query the database using natural language.
Key features of Amazon Bedrock Converse API and Database MCP Server Integration
Integration of RDS PostgreSQL and SQLite with AWS Bedrock using MCP
Bedrock Converse API integration with MCP Server
Natural language querying of databases (read-only)
Secure and efficient database operations through MCP Server
Adding GenAI capabilities to existing applications
Foundation for cross-database GenAI solution
Use cases of Amazon Bedrock Converse API and Database MCP Server Integration
Adding natural language query capabilities to existing database applications
Building conversational interfaces for data access
Creating GenAI-powered database solutions
Enabling cross-database querying with a unified interface
FAQ from Amazon Bedrock Converse API and Database MCP Server Integration
What AWS services are used in this sample?
What AWS services are used in this sample?
Bedrock Converse API, Bedrock Model (Anthropic Claude Sonnet 3.5 or other LLMs), Bedrock Guardrails, and RDS Postgres.
What databases are supported?
What databases are supported?
The sample focuses on RDS PostgreSQL & SQLite, but the pattern can be adapted for other databases that support MCP Server integration.
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
MCP is a protocol for managing context and state in conversational AI applications, enabling natural language interactions with databases.
Is the database access read-only?
Is the database access read-only?
Yes, this sample demonstrates read-only querying of databases using natural language.
How do I set up the database connection?
How do I set up the database connection?
You need to configure the dbconfig.ini file with the database user, password, host, port, database name, and SSL certificate path.