What is AWS Aurora DSQL MCP Server?
AWS Aurora DSQL MCP Server is an integration point between Aurora's PostgreSQL-compatible Distributed SQL engine and the Model Context Protocol (MCP). It allows LLM-powered applications to natively access, query, and manipulate distributed relational data in Aurora clusters through standardized MCP endpoints. By bridging distributed SQL with the MCP ecosystem, it empowers AI assistants and workflows to support complex, scalable analytical workloads directly on Aurora, leveraging advanced SQL features, concurrency, and high availability.
How to Configure
-
Prerequisites:
- An active Amazon Aurora PostgreSQL-compatible cluster with Distributed SQL enabled.
- Access to the cluster resource ARN and necessary AWS credentials.
- Python environment with
uv
installed.
-
Server Arguments (configure in your MCP client config file, such as
mcp.json
):{ "awslabs.aurora-dsql-mcp-server": { "command": "uvx", "args": ["awslabs.aurora-dsql-mcp-server@latest"], "env": { "AWS_PROFILE": "your-aws-profile", "AWS_REGION": "us-east-1", "AURORA_RESOURCE_ARN": "arn:aws:rds:us-east-1:123456789012:cluster:my-aurora-cluster", "AURORA_SECRET_ARN": "arn:aws:secretsmanager:us-east-1:123456789012:secret:mysecret", "AURORA_DATABASE": "your_database" } } }
-
Environment Variables:
AURORA_RESOURCE_ARN
: ARN of the Aurora cluster.AURORA_SECRET_ARN
: ARN of the secret containing database credentials.AURORA_DATABASE
: Target database name.AWS_PROFILE
: AWS CLI profile (or equivalent credentials via environment).
-
Deployment:
- Add the configuration to the appropriate MCP client config (
~/.aws/amazonq/mcp.json
,.cursor/mcp.json
, etc.). - Ensure IAM permissions allow Data API access to Aurora and Secrets Manager retrieval.
- Start your MCP client or code assistant to initiate the server connection.
- Add the configuration to the appropriate MCP client config (
How to Use
- Open your LLM-powered code assistant or MCP-capable tool (e.g., Amazon Q, Cursor, Cline).
- Ensure AWS Aurora DSQL MCP Server is enabled in the list of MCP servers.
- Use natural language or explicit prompts (e.g., "Using the Aurora DSQL MCP Server, execute an analytical query for...") to request data or perform operations.
- The MCP client will invoke server tools (e.g., sql_query, list_tables) as needed, returning results or actions into your workflow.
- Optionally, approve or review each server tool invocation per your client settings.
- Results (records, metadata, diagnostics) appear within your AI assistant's conversation or output panels.
Key Features
- Distributed SQL query execution with PostgreSQL compatibility on Aurora
- Secure, role-based access leveraging AWS credentials and Secrets Manager
- Fully integrated with the MCP ecosystem and LLM-driven agents
- Tools for database schema discovery, data exploration, and analytics
- Large-scale concurrency, transaction, and read scalability (Aurora DSQL advantages)
- Support for parameterized SQL inputs to reduce injection risks
- Seamless integration as part of conversational, autonomous, or background AI workflows
Use Cases
- Conversational Data Analytics: Enable AI chatbots to answer business questions using live distributed SQL queries.
- Automated ETL Pipelines: Trigger distributed transformations and aggregations as part of LLM-driven data workflows.
- Cloud-native Data Exploration: Allow developers and data scientists to explore distributed Aurora databases through natural language queries in IDEs.
- Auditing and Compliance: Use LLMs to automatically retrieve compliance reports or perform security reviews across distributed datasets.
- Dashboards and Reporting: Integrate with dashboard tools or BI agents to pull live data into visualizations and decision-making tools.
FAQ
Q1: Does this server support regular PostgreSQL clusters or only Aurora Distributed SQL?
A1: This server is specifically designed for Aurora PostgreSQL-compatible clusters with Distributed SQL enabled. Use the Aurora PostgreSQL MCP Server for standard Aurora or on-premise PostgreSQL.
Q2: What level of SQL syntax is supported?
A2: The server supports the full PostgreSQL dialect as implemented by Aurora DSQL, including advanced analytical and distributed query features. Some physical or system-level statements may be restricted for security reasons.
Q3: How does authentication and authorization work?
A3: The server relies on AWS IAM authentication with access to both the Aurora Data API and the Secrets Manager secret containing database credentials. All operations are authorized based on your configured IAM role and database permissions.
Q4: Can the MCP server modify database state or only perform read-only queries?
A4: By default, both read and write (INSERT, UPDATE, DELETE) operations are supported, subject to configuration. For increased safety, you may configure the server for read-only access via environment settings.
Q5: How can query performance issues be detected and resolved?
A5: The server returns execution diagnostics (timing, errors, status) for each tool invocation. For advanced tuning, standard Aurora/PostgreSQL monitoring (CloudWatch, Performance Insights) should be used directly.