Deploy the AWS Bedrock AgentCore MCP server on TrueFoundry and register it with the MCP Gateway.
This guide walks you through deploying the AWS Bedrock AgentCore MCP Server on TrueFoundry and registering it with the TrueFoundry MCP Gateway. Once registered, your agents and AI coding assistants can search and fetch AWS Bedrock AgentCore documentation through a centralized, managed endpoint.
The AWS Bedrock AgentCore MCP server provides AI tools with direct access to Amazon Bedrock AgentCore documentation. It enables LLMs and coding assistants to search, retrieve, and understand AgentCore concepts — covering runtime deployment, gateway connectivity, memory management, and agent lifecycle workflows.
The AWS Bedrock AgentCore MCP server is a documentation-only tool. It does not provision AWS resources, deploy agents, or make API calls to AWS services on your behalf. Its sole purpose is to give AI assistants access to the AgentCore documentation so they can help you write code, understand concepts, and troubleshoot issues related to Amazon Bedrock AgentCore services such as Runtime, Memory, Code Interpreter, Browser, Gateway, Observability, and Identity.
The server wraps the official AWS Bedrock AgentCore MCP package and exposes it over HTTP using FastMCP.
Copy
Ask AI
#!/usr/bin/env python3"""AWS Bedrock AgentCore MCP Server HTTP WrapperRuns the AWS Bedrock AgentCore MCP server with HTTP transport."""import osimport sys# Ensure cache is ready before importing the serverfrom awslabs.amazon_bedrock_agentcore_mcp_server.utils import cachecache.ensure_ready()# Import the MCP serverfrom awslabs.amazon_bedrock_agentcore_mcp_server.server import mcpdef main(): """Run the AWS Bedrock AgentCore MCP server with HTTP transport.""" port = int(os.environ.get("PORT", "3000")) host = os.environ.get("HOST", "0.0.0.0") # Configure server settings mcp.settings.host = host mcp.settings.port = port # Disable DNS rebinding protection for production deployment # This allows requests from any host (e.g., gateway.truefoundry.ai) mcp.settings.transport_security.enable_dns_rebinding_protection = False print("=" * 60) print("AWS Bedrock AgentCore MCP Server") print("=" * 60) print(f"Host: {host}") print(f"Port: {port}") print(f"MCP endpoint: http://{host}:{port}/mcp") print("=" * 60) sys.stdout.flush() # Run the MCP server with streamable HTTP transport mcp.run(transport="streamable-http")if __name__ == "__main__": main()