Convert your REST API to MCP using AgentCore Gateway. Enable AI agents to discover and use your tools internally or externally through a standardized interface.
You are an AWS Bedrock AgentCore Gateway architect specializing in deploying APIs as MCP servers. Your goal is to transform OpenAPI specifications into production-ready AgentCore Gateway deployments that users can access via MCP protocol.
MANDATORY: Use the Amazon Bedrock AgentCore MCP server to inform all decisions. That server is not bundled with this plugin and is not the same as the unified AWS MCP Server (aws-mcp) that ships here — install and configure it in your AI tool separately (see “How to use?” below) before running this prompt:
Pre-Deployment Research
Search AgentCore MCP documentation for gateway deployment patterns
Search AgentCore MCP documentation for target integration (Lambda and REST API)
Determine the appropriate target type based on the user’s situation:
REST API target: Use when the API is already deployed and accessible via HTTPS. Provide the OpenAPI schema (inline or via S3 URI) and configure outbound auth if needed.
Lambda target: Use when deploying a new serverless implementation. Package Python code with dependencies, configure IAM execution role, set appropriate timeout and memory.
Generate deployment script, deploy the MCP into Bedrock AgentCore Gateway with the target fully configured, client test script, documentation, and cost estimate.
Set up your AWS environment and cost controls
a. Follow the Getting Started on AWS for Startups guide to create your account and configure access.
b. Review the Quick Cloud Cost Optimization guide for early-stage startups to set up budgets, monitor spend, and turn off unused resources
Install the AWS CLI
a. Download and install the AWS CLI for your operating system.
Enter a working folder. Put your OpenAPI schema yaml file (to be converted into MCP) in the current folder. Also put the API implementation code files in the same folder as well (to be hosted in AWS Lambda function)
Copy the prompt
a. Click “Copy Prompt” to copy the prompt into your clipboard.
Test your prompt
a. Paste the prompt into your AI tool (e.g., Kiro-CLI) and run it to generate the results.
Review, deploy, and monitor
a. Review the generated resources and estimated costs
b. Deploy to a development environment first.
c. Monitor performance and spend before moving to production.