Amazon Bedrock AgentCore Runtime にデプロイされた MCP サーバーへ、stdio 経由で接続するプロキシです。
Claude Desktop や Cline などの MCP クライアントから、AgentCore Runtime 上の MCP サーバーをローカルのコマンドとして利用できます。
- AgentCore Runtime へのリクエスト転送(SigV4 認証付き)
- 起動時ハンドシェイク(
initialize)による疎通確認 - event-stream / SSE 応答の自動展開
- Runtime endpoint ARN / endpoint 名の指定に対応
- Go 1.25.6 以上
- AWS 認証情報(
~/.aws/credentials、環境変数、IAM ロール等)
go install github.com/mackee/acruntime2mcp@latestまたはソースからビルド:
git clone https://github.com/mackee/acruntime2mcp.git
cd acruntime2mcp
go build -o acruntime2mcp .acruntime2mcp arn:aws:bedrock-agentcore:ap-northeast-1:123456789012:runtime/my-runtime/runtime-endpoint/devendpoint ARN を渡すと、内部で runtime ARN と endpoint 名に自動分解されます。
acruntime2mcp --endpoint-name dev arn:aws:bedrock-agentcore:ap-northeast-1:123456789012:runtime/my-runtimeacruntime2mcp arn:aws:bedrock-agentcore:ap-northeast-1:123456789012:runtime/my-runtime| オプション | 説明 |
|---|---|
--endpoint-arn |
Runtime endpoint ARN を指定(内部で runtime ARN と endpoint 名に分解) |
--endpoint-name |
Endpoint 名を指定(Qualifier として使用) |
-h, --help |
ヘルプ表示 |
claude_desktop_config.json:
{
"mcpServers": {
"my-agent": {
"command": "acruntime2mcp",
"args": [
"arn:aws:bedrock-agentcore:ap-northeast-1:123456789012:runtime/my-runtime/runtime-endpoint/dev"
]
}
}
}- AgentCore Runtime に対して
initializeを実行し疎通を確認 - ハンドシェイク成功後に stdio 受付を開始
- MCP クライアントからのリクエスト(
tools/list,tools/call等)を AgentCore Runtime に転送 - 応答が event-stream / SSE 形式の場合は JSON に変換して返却
go test ./...AGENTCORE_ENDPOINT_ARN=arn:aws:bedrock-agentcore:ap-northeast-1:123456789012:runtime/my-runtime/runtime-endpoint/dev \
go test -run TestEndpointQualifiedInitializeAndToolsList -vMIT