Supports OAuth authentication with Auth0 for securing the MCP server deployment, including Dynamic Client Registration and token-based authentication
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cost Explorer MCP Servercompare this month's AWS costs to last month's"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cost Explorer MCP Server - Agentcore Runtime Deployment
This directory contains the Cost Explorer MCP Server configured for deployment to Amazon Bedrock Agentcore Runtime with streamable HTTP support on port 8000.
ποΈ Architecture
Original: STDIO-based MCP server for local development
Converted: Streamable HTTP server for Agentcore Runtime deployment
Protocol: MCP (Model Context Protocol)
Transport: Streamable HTTP on port 8000
Deployment: Agentcore Runtime (no Agentcore memory)
π Project Structure
π Quick Start
1. Prerequisites
2. Test Locally First
In another terminal:
3. Deploy to Agentcore Runtime
The script will:
Check prerequisites
Configure the deployment
Deploy to Agentcore Runtime
Save the Agent ARN to
agent_arn.txt
4. Test Remote Deployment
π§ Manual Deployment Steps
If you prefer manual deployment:
1. Configure Deployment
Follow the prompts:
Protocol: MCP
Entry point: mcp_server.py
Authentication: Choose OAuth or Cognito based on your needs
2. Deploy
π Authentication Setup
Option 1: Cognito User Pool (Recommended)
Create a Cognito User Pool in AWS Console
Configure the user pool for your application
Use the provided credentials during deployment configuration
Option 2: OAuth with Auth0
Set up Auth0 application with Dynamic Client Registration
Configure OAuth settings during deployment
Use Auth0 tokens for authentication
π§ͺ Testing
Local Testing
Remote Testing
π οΈ Available Tools
The Cost Explorer MCP Server provides these tools:
get_today_date - Get current date for relative queries
get_dimension_values - Get available values for dimensions (SERVICE, REGION, etc.)
get_tag_values - Get available tag values
get_cost_and_usage - Retrieve cost and usage data with filtering
get_cost_and_usage_comparisons - Compare costs between periods
get_cost_comparison_drivers - Analyze cost change drivers
get_cost_forecast - Generate cost forecasts
π° Cost Considerations
Important: Each AWS Cost Explorer API call costs $0.01. The server includes optimizations to minimize API calls, but be aware of potential charges when using the tools extensively.
π Troubleshooting
Local Server Issues
Deployment Issues
Remote Connection Issues
Verify BEARER_TOKEN is valid and not expired
Check AGENT_ARN format and encoding
Ensure OAuth/Cognito is properly configured
Verify server deployment status
π References
π Support
For issues with:
MCP Server: Check the original cost-explorer-mcp-server documentation
Agentcore Runtime: Refer to AWS Bedrock Agentcore documentation
Authentication: Check your OAuth/Cognito configuration
AWS Costs: Review AWS Cost Explorer API pricing and usage