Skip to main content
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.

What is AWS Bedrock AgentCore MCP?

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.

Available Tools

The MCP server exposes the following tools:
ToolDescription
search_agentcore_docsSearch curated AgentCore documentation and return ranked results with contextual snippets
fetch_agentcore_docFetch full document content by URL for in-depth understanding of specific pages
manage_agentcore_runtimeGet step-by-step documentation on deploying and managing agents in AgentCore Runtime, including CLI workflows, code patterns, and troubleshooting
manage_agentcore_memoryGet documentation on creating and managing AgentCore Memory resources, covering short-term memory, long-term memory, and semantic memory strategies
manage_agentcore_gatewayGet documentation on deploying and managing MCP Gateways in AgentCore, including target management, authentication setup, and CLI commands

Prerequisites

Before you begin, ensure you have:
  1. TrueFoundry Account: A TrueFoundry account with a configured workspace
  2. MCP Gateway Access: Follow the MCP Gateway Getting Started guide to set up your MCP Server Group

Step 1: Create the MCP Server

The server wraps the official AWS Bedrock AgentCore MCP package and exposes it over HTTP using FastMCP.
#!/usr/bin/env python3
"""
AWS Bedrock AgentCore MCP Server HTTP Wrapper

Runs the AWS Bedrock AgentCore MCP server with HTTP transport.
"""

import os
import sys

# Ensure cache is ready before importing the server
from awslabs.amazon_bedrock_agentcore_mcp_server.utils import cache
cache.ensure_ready()

# Import the MCP server
from awslabs.amazon_bedrock_agentcore_mcp_server.server import mcp


def 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()
You can find the complete example code at: AWS AgentCore MCP Server Repository

Step 2: Run Locally

# Install dependencies
pip install -r requirements.txt

# Run the server
python main.py
Your MCP server will be available at http://localhost:3000/mcp.

Step 3: Deploy on TrueFoundry

Deploy this MCP server as a service on TrueFoundry:
  1. Create a new Service in your TrueFoundry workspace.
  2. Point to the GitHub repository or use the Dockerfile above.
  3. Optionally set environment variables for AWS access:
VariableDescriptionDefault
PORTPort to run the server on3000
HOSTHost to bind to0.0.0.0
FASTMCP_LOG_LEVELLog level (DEBUG, INFO, WARNING, ERROR)INFO
AWS_ACCESS_KEY_IDAWS Access Key ID-
AWS_SECRET_ACCESS_KEYAWS Secret Access Key-
AWS_REGIONAWS Region-
  1. Deploy the service. Once running, your deployment will look like this:
TrueFoundry deployment dashboard showing the AWS AgentCore MCP server running with active pods

Step 4: Register in TrueFoundry MCP Gateway

Once the service is deployed, register it with the TrueFoundry MCP Gateway:
  1. Navigate to MCP Server Groups in the TrueFoundry dashboard.
  2. Select your MCP Server Group (or create one following the Getting Started guide).
  3. Click Add MCP Server and fill in the following details:
FieldValue
Nameaws-agentcore-mcp
DescriptionAWS Bedrock AgentCore MCP server for searching and fetching AgentCore documentation
URLhttps://<your-service-endpoint>/mcp
TransportStreamable HTTP
AuthenticationNo Auth
TrueFoundry MCP server registration form showing name, description, URL, and transport configuration for the AWS AgentCore MCP server
  1. Save the configuration. The MCP Gateway will connect to your server and discover the available tools.

Step 5: Verify the Integration

After registration, navigate to your MCP server in the dashboard. You should see all 5 tools discovered and available:
TrueFoundry MCP Gateway showing the AWS AgentCore MCP server with 5 connected tools including search_agentcore_docs, fetch_agentcore_doc, manage_agentcore_runtime, manage_agentcore_memory, and manage_agentcore_gateway
You can click Try on any tool to test it directly from the dashboard.

Next Steps