remote-mcp-agentcore-tutorial

MCP办公协作

提供方 dgallitelli

办公协作 stdio · 本地进程 OAuth 授权 社区 / 第三方 ClaudeZed
查看接入方式

A technical tutorial for deploying a remote MCP server on Amazon Bedrock AgentCore, offering IAM, OAuth, and gateway authentication options for teams that need to host MCP tools in the cloud.

一句话选型结论

按资料字段整理

remote-mcp-agentcore-tutorial 属于办公协作类 MCP 服务器,stdio · 本地进程,OAuth 授权,可直接接入 Claude、Zed,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类办公协作 传输方式stdio · 本地进程 鉴权OAuth 授权 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

办公协作
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

Local Deployment MCP Server Amazon Bedrock Python AgentCore Cloud Computing Serverless Deployment OAuth IAM

支持客户端

适用场景

Local DeploymentMCP ServerAmazon Bedrock

安装与配置

stdio · 本地进程 OAuth 授权
客户端在本机拉起子进程,数据不出本机
cd server python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python server.py

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
日程与消息

查日程、发消息、约会议。

表单与审批

填表单、走审批流。

团队协作

同步任务、汇总进展。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Zed,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在办公协作场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Zed 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
remote-mcp-agentcore-tutorial当前 未标注 stdio · 本地进程 本地部署 有 2026-03-24
CowAgent 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Karakeep MCP 未标注 未标注 未标注 无 2026-05-17
agentscope 未标注 stdio · 本地进程 本地部署 有 2026-04-11
note-gen 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Everywhere 未标注 stdio · 本地进程 本地部署 有 2026-04-12

服务器档案

办公协作
字段来自项目仓库与公开索引,中文说明由本站标注
提供方dgallitelli上游标注的维护方 dgallitelli
分类办公协作本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-03-24上游最后核验时间

详细介绍

8.9 KB
来自项目仓库与上游目录的原文,未做删改

Deploy a Remote MCP Server on Amazon Bedrock AgentCore

A tutorial for deploying an MCP (Model Context Protocol) server to Amazon Bedrock AgentCore with three authentication options — from quick IAM-based access to enterprise OAuth with centralized tool management.

The example server wraps DuckDuckGo search as two MCP tools (ddgs_search and ddgs_news), but the pattern works for any MCP server you want to host remotely.

Choose Your Authentication Option```mermaid

flowchart TD
START{"Do your users have<br/>AWS credentials?"}
START -- "Yes" --> OPT1["Option 1: IAM Credentials<br/>Simplest setup"]
START -- "No" --> Q2{"How many MCP servers<br/>do you need to expose?"}
Q2 -- "One" --> OPT2["Option 2: Identity Inbound Auth<br/>OAuth login, minimal infra"]
Q2 -- "Multiple" --> OPT3["Option 3: Gateway + OAuth<br/>Centralized enterprise access"]

click OPT1 &quot;option1-iam-credentials/&quot;
click OPT2 &quot;option2-identity-inbound-auth/&quot;
click OPT3 &quot;option3-gateway-oauth/&quot;

| | Option 1: IAM Credentials | Option 2: Identity Inbound Auth | Option 3: Gateway + OAuth |
|---|---|---|---|
| **User needs AWS creds?** | Yes | No | No |
| **Architecture** | Runtime only | Runtime + 1 Cognito pool | Gateway + Runtime + Identity + 2 Cognito pools |
| **Auth protocol** | SigV4 (IAM) | OAuth2 (JWT) | OAuth2 (JWT) |
| **Client proxy** | `mcp-proxy-for-aws` | None (native HTTP) | None (native HTTP) |
| **Multi-server** | No | No | Yes (Gateway aggregates tools) |
| **Setup complexity** | 2 CLI commands | ~3 API calls | ~7 API calls |
| **Best for** | Solo dev / internal team | Sharing one server externally | Enterprise multi-server |
| **Walkthrough** | Go → | Go → | Go → |

### Architecture at a Glance

**Option 1** — Direct to Runtime with SigV4:```mermaid
flowchart LR
    CC[&quot;Claude Code&quot;] -- stdio --&gt; PP[&quot;mcp-proxy-for-aws&quot;] -- &quot;SigV4&quot; --&gt; RT[&quot;AgentCore Runtime&quot;]

Option 2 — OAuth login, direct to Runtime:```mermaid
flowchart LR
CC["Claude Code"] -- "Bearer token" --> RT["AgentCore Runtime<br/>(JWT Authorizer)"]
CC -. "browser login" .-> CG["Cognito"]
RT -. "validate JWT" .-> CG


**Option 3** — OAuth login via Gateway:```mermaid
flowchart LR
    CC[&quot;Claude Code&quot;] -- &quot;Bearer token&quot; --&gt; GW[&quot;AgentCore Gateway&quot;]
    GW -- &quot;M2M token&quot; --&gt; RT[&quot;AgentCore Runtime&quot;]
    CC -. &quot;browser login&quot; .-&gt; CG[&quot;Cognito&quot;]

Common Setup

All three options share the same MCP server code. Complete these steps before choosing an option.

Prerequisites

  • Python 3.10+
  • Docker or Finch running locally (for container builds)
  • uv (recommended) — curl -LsSf https://astral.sh/uv/install.sh | sh

Step 1: Write the MCP Server

The server lives in server/server.py. It uses FastMCP with stateless_http=True for AgentCore compatibility:```python
mcp = FastMCP(
"ddgs-search",
host="0.0.0.0", # Bind to all interfaces (required in container)
port=8000, # Default port AgentCore expects
stateless_http=True, # Stateless HTTP transport
)

@mcp.tool()
def ddgs_search(query: str, max_results: int = 10) -> list[dict]:
"""Search the web using DuckDuckGo."""
with DDGS() as ddgs:
return list(ddgs.text(query, max_results=max_results))


### Step 2: Test Locally

**Terminal 1 — start the server:**```bash
cd server
python -m venv .venv &amp;&amp; source .venv/bin/activate
pip install -r requirements.txt
python server.py

Terminal 2 — run the test client:```bash
cd server
source .venv/bin/activate
python test_local.py


You should see two tools listed and search results returned. Once verified, pick your option above.

## Project Structure```
remote-mcp-agentcore-tutorial/
  server/
    server.py              # MCP server code (shared by all options)
    requirements.txt       # Python dependencies
    test_local.py          # Test client for local server
  option1-iam-credentials/
    README.md              # Walkthrough: SigV4 auth via mcp-proxy-for-aws
    setup.sh               # Deploy + configure Claude Code
    cleanup.sh             # Tear down resources
    test_remote.py         # Test with SigV4
  option2-identity-inbound-auth/
    README.md              # Walkthrough: OAuth via Cognito + JWT authorizer
    setup_cognito.py       # Create Cognito User Pool
    deploy_runtime.py      # Deploy with JWT authorizer
    cleanup.py             # Tear down Cognito + Runtime
    test_remote.py         # Test with Bearer token
  option3-gateway-oauth/
    README.md              # Walkthrough: Gateway + OAuth + credential provider
    setup.py               # Create Gateway infrastructure (7 resources)
    deploy_target.py       # Deploy MCP server as Gateway target
    cleanup.py             # Tear down everything
    test_remote.py         # Test via Gateway

Cost Considerations

All pricing is for us-east-1 as of March 2026. See the AgentCore pricing page and Cognito pricing page for the latest rates.

AgentCore Runtime (all options)

AgentCore Runtime uses consumption-based pricing — you pay only for active compute, not idle time.

Resource Rate Notes
vCPU $0.0895 / vCPU-hour Billed per second, 1s minimum
Memory $0.00945 / GB-hour Peak memory per second, 128 MB minimum
Storage Standard ECR/S3 rates Container images in ECR
Data transfer Standard EC2 rates Outbound data

What "consumption-based" means: during an MCP tool call, you're charged for the CPU and memory your container actually uses. Between calls, if nothing is running, there's no charge. Cold starts (30-60s on first invocation after idle) are not billed.

AgentCore Gateway (Option 3 only)

Resource Rate
API invocations (ListTools, CallTool, Ping) $0.000005 / invocation
Search API (semantic tool search) $0.000025 / invocation
Tool indexing $0.0002 / tool-index / month

At these rates, 10,000 tool calls/month costs ~$0.05. Gateway cost is negligible for most workloads.

AgentCore Identity (Options 2 and 3)

When Identity is used through AgentCore Runtime or Gateway, there is no additional charge. Identity fees only apply when used standalone (outside Runtime/Gateway):

Resource Rate
OAuth token request $0.00001 / request
API key request $0.00001 / request

Amazon Cognito (Options 2 and 3)

Cognito pricing depends on the tier and authentication type:

Component Rate Free Tier
MAU (Essentials tier) $0.015 / MAU First 10,000 MAUs/month free
MAU (Lite tier) Lower First 10,000 MAUs/month free
M2M app client $6 / app client / month No free tier
M2M token request $0.00225 / 1,000 requests No free tier

Option 2 uses authorization_code flow (user login) — falls under MAU pricing, covered by the free tier for up to 10,000 users.

Option 3 uses two Cognito pools: inbound (user login, MAU pricing) and outbound (M2M client_credentials). The M2M component adds ~$6/month base for the app client plus token request fees.

Cost Comparison by Option

Estimated monthly cost for a light workload (1 developer, ~100 tool calls/day, ~3,000/month):

Component Option 1 Option 2 Option 3
AgentCore Runtime ~$0.50 ~$0.50 ~$0.50
AgentCore Gateway - - < $0.01
Cognito (MAU) - Free (< 10k) Free (< 10k)
Cognito (M2M) - - ~$6.01
AgentCore Identity - Free Free
Total ~$0.50 ~$0.50 ~$7.01

> Note: Runtime costs depend heavily on your MCP server's CPU/memory profile per invocation. A lightweight tool like DuckDuckGo search uses minimal resources. Compute-heavy tools (LLM calls, image processing) will cost more. The $0.50/month estimate assumes ~1 vCPU-second and ~256 MB per invocation.

New AWS Accounts

New AWS accounts receive up to $200 in AgentCore Free Tier credits to explore the service at no initial cost.

Troubleshooting

Symptom Cause Fix
Container build fails Docker/Finch not running Start Docker Desktop or finch vm start
agentcore launch permission error Missing IAM permissions Need bedrock-agentcore:* and ecr:*
Timeout on first call Cold start AgentCore Runtime cold starts take 30-60s
Claude Code OAuth doesn't open browser Old Claude Code version Update to v2.1.64+ for authServerMetadataUrl support
JWT validation fails Token audience mismatch Ensure allowedClients matches the Cognito app client ID
Gateway tools have wrong names Target prefix Tools are prefixed: ___ (triple underscore)

References

  • Amazon Bedrock AgentCore Runtime docs
  • AgentCore Gateway docs
  • AgentCore Identity docs
  • AgentCore Starter Toolkit
  • mcp-proxy-for-aws
  • Claude Code MCP configuration
  • MCP specification
  • AgentCore samples (GitHub)

License

This project is licensed under the Apache License 2.0 — see LICENSE for details.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
remote-mcp-agentcore-tutorial 怎么安装?

在客户端按下面的安装命令接入:cd server python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python server.py。装完在客户端配置里引用同一个包或端点。

remote-mcp-agentcore-tutorial 怎么在 Claude、Zed 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

remote-mcp-agentcore-tutorial 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

remote-mcp-agentcore-tutorial 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

remote-mcp-agentcore-tutorial 支持哪些客户端?

资料标注支持 Claude、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

remote-mcp-agentcore-tutorial 能提供哪些能力?

资料显示能力标签包括 Local Deployment、MCP Server、Amazon Bedrock、Python、AgentCore、Cloud Computing。具体工具清单以官方文档为准。

remote-mcp-agentcore-tutorial 需要什么运行环境?

运行时为 python;属于本地进程,需要在本机装好运行环境。

remote-mcp-agentcore-tutorial 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-03-24。