

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用网 AgentCore 关
<a name="gateway-using"></a>

使用目标[设置网关后](gateway-building.md)，您可以将应用程序或代理配置为通过[模型上下文协议 (MCP) ](https://modelcontextprotocol.io/docs/getting-started/intro) 使用网关。MCP 为代理发现和调用工具提供了一种标准化的方式。

**注意**  
AgentCore Gateway 支持以下 MCP 版本：2026-07-28、2025-11-25、2025-06-18 和 2025-03-26。  
版本`2026-07-28`是无状态协议修订版。客户不进行`initialize`握手。每个请求在`MCP-Protocol-Version`标头和`_meta`字段 (`io.modelcontextprotocol/protocolVersion`) 中都带有其协议版本。网关通过`server/discover`发现功能。版本`2025-11-25`及更早版本继续使用`initialize`握手。

您可以对 AgentCore 网关使用以下 MCP 操作：


| 操作 | 说明 | 
| --- | --- | 
| tools/call | 使用提供的参数调用特定工具 | 
| tools/list | 列出网关提供的所有可用工具 | 
| prompts/list | 列出网关提供的所有可用提示 | 
| prompts/get | 检索使用提供的参数呈现的特定提示模板 | 
| resources/list | 列出网关提供的所有可用资源 | 
| resources/read | 通过 URI 读取特定资源的内容 | 
| resources/templates/清单 | 列出网关提供的所有可用资源模板 | 
| elicitation/create | 在工具调用（服务器启动）期间请求客户端提供更多输入 | 
| sampling/createMessage | 在工具调用（服务器启动）期间请求客户端完成 LLM | 
| notifications/progress | 报告长时间运行的工具调用（服务器启动）的进度 | 
| notifications/message | 在工具执行期间（服务器启动）从服务器发送日志消息 | 

在版本上`2026-07-28`，服务器启动的交互（`elicitation/create`和`sampling/createMessage`）使用多往返请求 (MRTR) 模式：

1. 服务器返回一个`resultType`设置为的临时结果`input_required`。

1. 客户端在重试原始请求时提供所请求的输入。

网关仅为选择接收通知的请求发送通知（`notifications/progress`和`notifications/message`）。在版本`2025-11-25`及更早版本中，网关将这些交互作为服务器发起的公开消息传输。

以下主题介绍如何调用您的 AgentCore 网关：

**Topics**
+ [对网关和 AgentCore 网关目标进行授权和身份验证](gateway-using-auth.md)
+ [列出 AgentCore 网关中的可用工具](gateway-using-mcp-list.md)
+ [在 AgentCore 网关中调用工具](gateway-using-mcp-call.md)
+ [列出 AgentCore 网关中的可用提示](gateway-using-mcp-prompts-list.md)
+ [从 AgentCore 网关获取提示](gateway-using-mcp-prompts-get.md)
+ [列出 AgentCore 网关中的可用资源](gateway-using-mcp-resources-list.md)
+ [从 AgentCore 网关读取资源](gateway-using-mcp-resources-read.md)
+ [列出 AgentCore 网关中的资源模板](gateway-using-mcp-resources-templates-list.md)
+ [在网关中使用激励 AgentCore](gateway-mcp-elicitation.md)
+ [从您的 AgentCore 网关接收进度通知](gateway-mcp-progress.md)
+ [从您的 AgentCore 网关接收日志消息](gateway-mcp-logging.md)
+ [在 AgentCore 网关中使用采样](gateway-mcp-sampling.md)
+ [使用自然语言查询在 AgentCore 网关中搜索工具](gateway-using-mcp-semantic-search.md)
+ [创建使用您的 AgentCore 网关的代理](gateway-agent-integration.md)