TL;DR
이 글은 기존 MCP 서버를 Amazon Bedrock AgentCore Runtime에 배포하고 Amazon Quick의 채팅 에이전트와 Flows에서 재사용하는 연결 절차를 안내합니다. FastMCP 서버는 stateless_http=True와 streamable-http로 실행하며, AgentCore Gateway가 Amazon Quick의 MCP 요청을 받아 AgentCore Runtime으로 전달합니다. 사용자 요청에는 Amazon Cognito 기반 Inbound Auth를 적용하고 Gateway에서 MCP 서버로 나가는 호출에는 AgentCore Identity와 OAuth 2.0 기반 Outbound Auth를 적용한 뒤, Amazon Quick Connector에서 Gateway 엔드포인트를 Action으로 등록합니다. 이 구조는 도구를 애플리케이션마다 다시 구현하지 않고 조직 내 여러 에이전트와 고객 경험에서 같은 MCP 서버를 사용하게 하지만, AWS 리소스와 인증 계층을 모두 설정하고 사용 후 의존성 역순으로 정리해야 합니다.
섹션별 상세
mcp_server_project/
├── mcp_server.py # Main MCP server code
├── requirements.txt # Dependencies
└── __init__.py # Python package marker
File: requirements.txt
mcp>=1.10.0
boto3
bedrock-agentcore
bedrock-agentcore-starter-toolkit>=0.1.21
strands-agents
uv venv sample-venv # Create Virtual Environment
source sample-venv/bin/activate # Activate Virtual Environment
uv pip install -r requirements.txt # Install the dependenciesMCP 서버 프로젝트의 기본 파일 구조와 의존성을 정의한 뒤 uv로 가상 환경을 만들고 패키지를 설치합니다.
from mcp.server.fastmcp import FastMCP
mcp = FastMCP(host="0.0.0.0", stateless_http=True)
@mcp.tool()
def getOrder() -> int:
"""Get an order"""
return 123
@mcp.tool()
def updateOrder(orderId: int) -> int:
"""Update existing order"""
return 456
if __name__ == "__main__":
mcp.run(transport="streamable-http")FastMCP로 getOrder와 updateOrder 도구를 등록하고 무상태 HTTP 기반 streamable-http 전송으로 MCP 서버를 실행합니다.
# Configure your AgentCore project
agentcore configure --entrypoint mcp_server.py --name simple_mcp_server
agentcore launchAgentCore starter kit으로 진입점과 런타임 이름을 설정한 뒤 MCP 서버를 AgentCore Runtime에 배포합니다.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "MCPServerRuntimePermissions",
"Effect": "Allow",
"Action": [
"bedrock-agentcore:InvokeAgentRuntime",
"bedrock-agentcore:InvokeRegistryMcp",
"secretsmanager:GetSecretValue"
],
"Resource": [
"arn:aws:bedrock-agentcore:::runtime/",
"arn:aws:bedrock-agentcore:::runtime//runtime-endpoint/*"
]
}
]
}AgentCore Gateway가 MCP 서버 런타임을 호출하고 Secrets Manager 값을 읽도록 IAM 권한을 부여합니다.
https://bedrock-agentcore.us-east-1.amazonaws.com/runtimes/{encoded_agentcore_runtime_mcp_server_arn}/invocations?qualifier=DEFAULTURL로 인코딩한 AgentCore Runtime MCP 서버 ARN을 사용해 Gateway의 MCP 대상 엔드포인트를 구성합니다.








이미지 분석

사용자 요청은 Amazon Quick 내부의 MCP Client에서 시작해 AgentCore Gateway로 전달되고, Gateway에서 AgentCore Runtime의 MCP Server로 이어집니다. Amazon Cognito는 Inbound Auth를, AgentCore Identity는 Outbound Auth를 맡으며 Runtime 쪽에는 Observability가 배치되어 글에서 설명한 사용자 인증·기계 간 인증·도구 실행 흐름을 한 화면에 연결합니다.
Amazon Quick의 Chat agents와 Connectors가 AgentCore Gateway를 거쳐 AgentCore Runtime의 MCP Server와 Tool #1·Tool #2에 연결되는 구조도입니다.

왼쪽 요청 경로에는 /mcp, OAuth token, AWS IAM, streamable-http connection이 표시되어 MCP 클라이언트와 Gateway 사이의 접근 방식을 나타냅니다. Gateway는 AgentCore Identity의 secure token vault와 token caching 등을 활용한 뒤 MCP server target에 Outbound OAuth token을 전달하므로, 글의 Inbound Auth와 Outbound Auth 분리를 구체화합니다.
MCP Client가 OAuth token과 AWS IAM을 사용해 AgentCore Gateway에 도구 목록 조회와 도구 호출을 요청하고, Gateway가 Outbound OAuth token으로 MCP Server target을 호출하는 흐름도입니다.
용어 해설
- Model Context Protocol (MCP)
- — Model Context Protocol (MCP)는 Foundation Model이나 AI 에이전트가 외부 데이터와 도구에 표준 방식으로 접근하도록 만드는 프로토콜입니다. 파일, 데이터베이스, API를 연결하고 도구 호출 규격을 통일해 여러 클라이언트가 동일한 MCP 서버를 재사용하도록 합니다.
- AgentCore Gateway
- — AgentCore Gateway는 Amazon Quick과 AgentCore Runtime에 배포된 MCP 서버 사이에서 요청을 전달하는 관리형 연결 계층입니다. Inbound Auth로 클라이언트 요청을 검증하고 Outbound Auth로 MCP 서버를 호출하며, IAM 역할과 OAuth 2.0 설정을 통해 접근 범위를 통제합니다.
- 인바운드 인증(Inbound Auth)
- — Inbound Auth는 Amazon Quick에서 AgentCore Gateway로 들어오는 요청의 사용자 인증과 접근 권한 확인을 담당합니다. 이 글에서는 Amazon Cognito의 Discovery URL과 Client ID를 Gateway에 등록하고 JWT를 검증하는 방식으로 구성합니다.
- 아웃바운드 인증(Outbound Auth)
- — Outbound Auth는 AgentCore Gateway가 AgentCore Runtime의 MCP 서버를 호출할 때 사용하는 서버 간 인증과 권한 부여 흐름입니다. AgentCore Identity에 Amazon Cognito의 OAuth Client 정보를 등록하고 OAuth 2.0 토큰을 발급받아 MCP 서버 요청에 전달합니다.
- 무상태 HTTP(stateless_http)
- — stateless_http=True는 MCP 서버가 요청 사이의 세션 상태를 서버에 유지하지 않는 실행 방식입니다. AgentCore Runtime에서 MCP 서버를 호환시키기 위해 FastMCP 생성 시 이 옵션을 켜고 streamable-http 전송으로 0.0.0.0:8000/mcp 경로를 제공합니다.
기술
- Amazon Quick
- Amazon Bedrock AgentCore
- AgentCore Gateway
- AgentCore Runtime
- Amazon Cognito
- AgentCore Identity
- OAuth 2.0
- IAM
- Amazon CloudWatch
- Python
- AWS CLI
- Amazon Bedrock
- Anthropic models
- Docker
- FastMCP
- MCP library
- boto3
- bedrock-agentcore-starter-toolkit
- strands-agents
- uv
활용 사례
- Amazon Quick chat agents에서 주문 조회와 주문 변경 같은 MCP 도구 호출
- Amazon Quick Flows에서 외부 데이터와 전문 하위 에이전트 기능 사용
- 조직 내 여러 AI 에이전트가 공통 MCP 서버의 도구를 재사용
- 고객이 별도 커넥터 구축 없이 Amazon Quick 안에서 기존 제품 기능 사용
AI 요약 · 북마크 · 개인 피드 설정 — 무료
출처 · 인용 안내
인용 시 "요약 출처: AI Trends (aitrends.kr)"를 표기하고, 사실 확인은 원문 보기 기준으로 진행해 주세요. 자세한 기준은 운영 정책을 참고해 주세요.