Discover how to enhance your development workflow by integrating Amazon Q Developer CLI with the Dynatrace AI-powered observability platform using MCP. This powerful combination allows organizations to access real-time performance metrics, logs, and monitoring data without leaving the command line interface.
As software systems grow increasingly complex, developers need powerful tools that can seamlessly integrate various platforms and services. Amazon Q Developer CLI has revolutionized AI-assisted development by bringing intelligent code assistance directly to your terminal. Now you can use Model Context Protocol (MCP) to bring real-time observability data directly from Dynatrace into your workflow,
Whether you’re a developer, DevOps engineer, or SRE, this integration will help you make more informed decisions faster. Through simple natural language queries, you can monitor application performance and access logs, identify issues, and automate common observability tasks across both AWS and Dynatrace platforms, without leaving the terminal or your IDE of choice.
Let’s dive in and see how you can leverage the full potential of Amazon Q Developer CLI and Dynatrace MCP server in your development process. Read on to learn how to:
- Configure Amazon Q Developer CLI to work with MCP servers.
- Set up the Dynatrace MCP server for real-time observability data.
- Use natural language queries to monitor and troubleshoot applications across both AWS and Dynatrace platforms.
Breaking down the Amazon Q Developer CLI integration
Setting up this integration typically takes 15 to 30 minutes, with no additional AWS infrastructure required beyond an existing Amazon Q Developer CLI setup.
The architecture diagram below illustrates how MCP enables seamless integration between local development environments and AWS cloud services through Amazon Q Developer CLI. Through standardized MCP communication, a developer can use multiple operating systems to interact with Dynatrace observability tools and AWS offerings.

Before you begin
To complete the walkthrough, teams must first meet the following prerequisites:
- Install Amazon Q Developer CLI.
- Configure AWS CLI with the appropriate credentials (an Amazon Builder account or enterprise license is required).
- Have a Dynatrace account or get a free 15-day trial.
- Have or create a Dynatrace OAuth Client. For the needed scopes, see the Dynatrace MCP readme.
Walking through the Amazon Q Developer CLI installation process
MCP configuration in Amazon Q Developer CLI is managed through JSON files. The interface supports two levels of MCP configuration:
- Global configuration:
~/.aws/amazonq/mcp.json– Applies to all workspaces - Workspace configuration:
.amazonq/mcp.json– Specific to the current workspace
AWS MCP server setup
Once the Amazon Q Developer CLI is installed, configure it to use AWS MCP Server.
- Open a terminal, and create the following file:
vi ~/.aws/amazonq/mcp.json - Paste the following configuration into the file:
{
"mcpServers": {
"awslabs.core-mcp-server": {
"command": "uvx",
"args": [
"awslabs.core-mcp-server@latest"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
},
"autoApprove": [],
"disabled": false
}
}
}
Dynatrace MCP server setup
Add the configuration for the Dynatrace MCP server to mcp.json. Navigate to the Environment Variable section to set up the environment variables for Dynatrace with the needed OAuth Client Scopes. Extending our example from above, the MCP configuration file would look like this:
{
"mcpServers": {
"awslabs.core-mcp-server": {
"command": "uvx",
"args": [
"awslabs.core-mcp-server@latest"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
},
"autoApprove": [],
"disabled": false
},
"dynatrace-mcp": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"OAUTH_CLIENT_ID": "",
"OAUTH_CLIENT_SECRET": "",
"DT_ENVIRONMENT": ""
}
}
}
}
Verify the MCP server integration with Amazon Q Developer CLI
After configuring both AWS and Dynatrace MCP servers, verify that the integration is working properly. Run the command “q chat” in the terminal to start an interactive session with Amazon Q Developer CLI.
$ q chat To learn more about MCP safety, see https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-security.html ✓ dynatrace_mcp loaded in 3.48 s ✓ 1 of 1 mcp servers initialized Welcome to █████╗ ███╗ ███╗ █████╗ ███████╗ ██████╗ ███╗ ██╗ ██████╗ ██╔══██╗████╗ ████║██╔══██╗╚══███╔╝██╔═══██╗████╗ ██║ ██╔═══██╗ ███████║██╔████╔██║███████║ ███╔╝ ██║ ██║██╔██╗ ██║ ██║ ██║ ██╔══██║██║╚██╔╝██║██╔══██║ ███╔╝ ██║ ██║██║╚██╗██║ ██║▄▄ ██║ ██║ ██║██║ ╚═╝ ██║██║ ██║███████╗╚██████╔╝██║ ╚████║ ╚██████╔╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚══▀▀═╝ ╭───────────────────────── Did you know? ─────────────────────────╮ │ │ │ /usage shows you a visual breakdown of your current │ │ context window usage │ │ │ ╰─────────────────────────────────────────────────────────────────╯ /help all commands • ctrl + j new lines • ctrl + k fuzzy search ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The CLI is now connected to both AWS and Dynatrace MCP servers, allowing you to inquire about functionality across both AWS and Dynatrace platforms.
Testing AWS connectivity
Here are some questions you can ask q chat to verify and the expected result (note they may not be the same for everyone).
Tip: Amazon Q supports just typing “/mcp” or “/tools” and it will show you which servers are available and which tools it can call at a glance.
> Are you connected to AWS? Yes, I am connected to AWS. I can help you interact with AWS services through the AWS CLI. I can make AWS API calls using the use_aws tool, which allows me to perform operations like: • Describing EC2 instances • Listing S3 buckets • Managing IAM users and roles • Working with other AWS services like Lambda, DynamoDB, etc. Is there a specific AWS task or service you'd like me to help you with? I can run AWS CLI commands on your behalf to retrieve information or make changes to your AWS resources. > Are you connected to Dynatrace? Yes, I am connected to Dynatrace through the Dynatrace MCP integration. I have access to several Dynatrace-specific tools that allow me to: • Get logs for monitored entities • Retrieve entity details • List and get details about vulnerabilities • Execute and verify DQL (Dynatrace Query Language) statements • Send Slack messages via Dynatrace's Slack connector • Get ownership information for entities • View and manage problem details • Work with Kubernetes events • Create notification workflows Would you like me to perform any specific Dynatrace-related tasks for you? For example, I could get information about the connected Dynatrace environment, list current problems, or help you with DQL queries.
Now, we’re connected to both AWS and Dynatrace MCP servers, which means you can look at various AWS- and Dynatrace-related tasks, such as checking resources, identifying problems, getting logs, and more. Here are some sample prompts below:
Infrastructure monitoring
"Show me all EC2 instances that have high CPU usage in the last hour and correlate this with Dynatrace performance metrics" "List any auto-scaling events from AWS and check if they match performance degradation patterns in Dynatrace"
Application performance
"Compare the response times of our Lambda functions between AWS CloudWatch and Dynatrace monitoring" "Show me the slowest API Gateway endpoints and their corresponding service flows in Dynatrace"
Security analysis
"Find all security groups with open ports and cross-reference with Dynatrace security vulnerabilities" "Check SSL certificate expiration dates across our AWS resources and validate them against Dynatrace security monitoring"
Log analysis
"Find all error patterns in CloudWatch logs and match them with problem patterns detected by Dynatrace" "Show me application errors that appear in both AWS logs and Dynatrace problem detection"
Cost management
"Generate a report comparing our AWS resource costs with their performance metrics from Dynatrace" "Identify underutilized AWS services based on both CloudWatch and Dynatrace usage patterns"
If you want to avoid unwanted server activations and unnecessary charges during development, you can clean up with the following:
Open a terminal and navigate to the following file. Remove the MCP configurations you added as part of this setup and save them. This will ensure both AWS and Dynatrace MCP servers are not loaded when you start “q chat”.
vi ~/.aws/amazonq/mcp.json
AI-assisted development is now a reality
The integration of Dynatrace MCP with Amazon Q Developer CLI marks a significant advancement in AI-assisted development. By providing standardized access to external tools and data sources, developers can work with their production environment much more efficiently and with context-awareness. Whether you’re working on remediating problems, database optimization, code analysis, or full stack development, the combination of Amazon Q Developer CLI and Dynatrace MCP offers a powerful platform for modern development and DevOps practices.
Follow the stories: Scaling AI-assisted development with Dynatrace MCP
As the integration of AI tools like Amazon Q Developer CLI and Dynatrace MCP evolves, developers and organizations can expect even greater capabilities to streamline workflows and enhance observability. These advancements not only allow real-time insights but also empower teams to make informed decisions faster, with minimal overhead.
Interested in learning more about how Dynatrace can help you in your AI-assisted development? Check out these resources:
- Part 1 of our agentic AI series introduces MCP, A2A, and the future of automation.
- Part 2 of this agentic AI series explores how monitoring A2A and MCP communications results in better, more effective agentic AI.
- Part 3 of this series covers AI agent observability and monitoring, and how to scale and monitor Amazon Bedrock Agents.
- Full-stack observability for AI with NVIDIA Blackwell and NVIDIA NIM is covered in part 4 of this series.
- Check out Dynatrace MCP and the Dynatrace AI Observability solution for AI agent monitoring and MCP monitoring at scale.
Looking for answers?
Start a new discussion or ask for help in our Q&A forum.
Go to forum