amazon-workspaces-agent-access
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAmazon WorkSpaces Applications — Agent Access
Amazon WorkSpaces Applications — Agent Access
Domain expertise for connecting AI agents to remote Windows desktops on Amazon WorkSpaces Applications (AppStream 2.0) via the managed Agent Access MCP server, and for driving those desktops reliably.
How it works: Agent Access is MCP-only — there is no AWS CLI/SDK command that calls the desktop tools. Agents connect to over Streamable HTTP, SigV4-signed with service name , and call MCP tools (, , , ...) to drive the desktop. The AWS CLI/SDK is used only for setup — , fleet/stack configuration. handles the SigV4 signing.
https://agentaccess-mcp.{region}.api.aws/mcpagentaccess-mcpscreenshotleft_clicktype_textappstream create-streaming-urlmcp-proxy-for-awsRecommended setup: use (Python) as the transport; it signs each request and manages the DELETE lifecycle. Any MCP client that supports Streamable HTTP + SigV4 works. When running the AWS CLI/SDK setup steps (create-streaming-url, stack/fleet configuration), the AWS MCP server is recommended for sandboxed execution and audit logging.
mcp-proxy-for-aws本技能提供专业指导,帮助AI代理通过托管的Agent Access MCP服务器连接到Amazon WorkSpaces Applications(AppStream 2.0)上的远程Windows桌面,并实现对这些桌面的可靠驱动。
工作原理: Agent Access是仅支持MCP的服务——没有AWS CLI/SDK命令可直接调用桌面工具。代理通过可流式传输的HTTP连接到,使用服务名称进行SigV4签名,并调用MCP工具(、、等)来驱动桌面。AWS CLI/SDK仅用于配置步骤——、集群/堆栈配置。负责处理SigV4签名。
https://agentaccess-mcp.{region}.api.aws/mcpagentaccess-mcpscreenshotleft_clicktype_textappstream create-streaming-urlmcp-proxy-for-aws推荐配置: 使用(Python)作为传输层;它会为每个请求签名并管理DELETE生命周期。任何支持可流式传输HTTP + SigV4的MCP客户端均可使用。当运行AWS CLI/SDK 配置步骤(创建流式URL、堆栈/集群配置)时,推荐使用AWS MCP服务器进行沙箱执行和审计日志记录。
mcp-proxy-for-awsGuardrail — where this skill's own files live (MCP vs local install)
防护规则——本技能文件的存储位置(MCP vs 本地安装)
This skill can be loaded two ways, and they resolve the skill's own bundled files from different places. Determine how the skill was loaded before reading a reference:
- Loaded through the AWS MCP tool: The skill is not installed on the local filesystem. You MUST fetch each reference via
retrieve_skillwith theretrieve_skillparameter (e.g.file), and use the returned content. Do NOTfile="references/connection-setup.md"these paths locally — they do not exist on disk.file_read - Installed locally (e.g. or
.kiro/skills/amazon-workspaces-agent-access/): Read files from the local skill directory using relative paths.~/.claude/skills/amazon-workspaces-agent-access/
This distinction applies only to the skill's own packaged files. User data and session artifacts are always read from and written to the user's working directory. Never fetch or write customer data through .
retrieve_skill本技能可通过两种方式加载,其捆绑文件的读取路径不同。在查阅参考文档前,请先确定技能的加载方式:
- 通过AWS MCP 工具加载: 技能未安装在本地文件系统中。您必须通过
retrieve_skill工具并指定retrieve_skill参数(例如file)获取每个参考文档,并使用返回的内容。请勿在本地使用file="references/connection-setup.md"读取这些路径——它们在磁盘上不存在。file_read - 本地安装(例如或
.kiro/skills/amazon-workspaces-agent-access/):使用相对路径从本地技能目录读取文件。~/.claude/skills/amazon-workspaces-agent-access/
此区别仅适用于技能自身的打包文件。用户数据和会话工件始终从用户工作目录读取和写入。切勿通过获取或写入客户数据。
retrieve_skillKey facts agents get wrong (load the reference before answering in detail)
代理容易出错的关键要点(详细解答前请先查阅参考文档)
These are HTTP headers / metadata on the MCP connection — not tool parameters, and there is no tool. Do not invent tools or parameters; the desktop tools are exactly those in tools-reference.md.
connect_to_desktop-
Connect mode. Selected by theHTTP header (value
X-Amzn-AgentAccess-Connect-Mode, the default, orBLOCKING) — sent on the MCP request alongside the streaming-URL/SAML auth. It is NOT a JSON tool argument.POLLING-
❌ WRONG (common hallucination): calling atool with a
connect_to_desktopparameter, or aconnection_mode: "POLLING"/session_id/application_idargument. None of those exist.user_id -
✅ RIGHT: set theheader. Then
X-Amzn-AgentAccess-Connect-Mode: POLLINGinitially returns only thetools/listtool; the agent callsconnection_statusrepeatedly until its returned state isconnection_status, and only then doesCONNECTEDreturn the full desktop tool set (tools/list,screenshot, ...). (details: connection-modes.md)left_clickpython# Correct POLLING usage — the mode is an HTTP header on the MCP connection: async with aws_iam_streamablehttp_client( endpoint="https://agentaccess-mcp.us-east-1.api.aws/mcp", # use YOUR fleet's region aws_service="agentaccess-mcp", aws_region="us-east-1", # region must match the fleet (else 400) headers={ "X-Amzn-AgentAccess-Streaming-Session-Url": streaming_url, "X-Amzn-AgentAccess-Connect-Mode": "POLLING", # header, not a tool arg }, ) as (read, write, _): async with ClientSession(read, write) as session: await session.initialize() # tools/list now returns ONLY connection_status until the desktop is up: while json.loads((await session.call_tool("connection_status", {})).content[0].text)["state"] != "CONNECTED": await asyncio.sleep(2) tools = await session.list_tools() # now the full desktop tool set
-
-
Streaming session (non-domain-joined) is theheader. Domain-joined fleets instead pass the SAML assertion + stack ARN via MCP
X-Amzn-AgentAccess-Streaming-Session-Urlkeys_metaandaws.agentaccess/workspacesApplicationsSamlAssertion. (details: connection-setup.md)aws.agentaccess/workspacesApplicationsStackArn -
Expire-on-delete is theheader (
X-Amzn-AgentAccess-Expire-Streaming-Session-On-Delete/true; defaultfalse). Expiry happens on the client's explicit HTTPfalse—DELETEsends it automatically on clean close. (details: session-lifecycle.md)mcp-proxy-for-aws -
Forwarded tools are namespaced by server:(e.g.
forwarded___<server-name>___<tool-name>) — notforwarded___filesystem___read_file. (details: tool-forwarding.md)forwarded___<tool-name> -
requires
COMPUTER_INPUTto also be ENABLED in the stack'sCOMPUTER_VISION. (details: enabling-agent-access.md)AgentAccessConfig
这些是MCP连接的HTTP头/元数据——并非工具参数,且不存在工具。请勿虚构工具或参数;桌面工具完全与tools-reference.md中列出的一致。
connect_to_desktop-
连接模式:通过**HTTP头选择(值为
X-Amzn-AgentAccess-Connect-Mode,默认值,或BLOCKING)——与流式URL/SAML认证一起在MCP请求中发送。它不是**JSON工具参数。POLLING-
❌ 错误(常见幻觉):调用带有参数或
connection_mode: "POLLING"/session_id/application_id参数的user_id工具。这些均不存在。connect_to_desktop -
✅ 正确:设置头。此时
X-Amzn-AgentAccess-Connect-Mode: POLLING最初仅返回**tools/list工具**;代理需反复调用connection_status,直到其返回状态为connection_status,只有此时CONNECTED才会返回完整的桌面工具集(tools/list、screenshot等)。(详情:connection-modes.md)left_clickpython# Correct POLLING usage — the mode is an HTTP header on the MCP connection: async with aws_iam_streamablehttp_client( endpoint="https://agentaccess-mcp.us-east-1.api.aws/mcp", # use YOUR fleet's region aws_service="agentaccess-mcp", aws_region="us-east-1", # region must match the fleet (else 400) headers={ "X-Amzn-AgentAccess-Streaming-Session-Url": streaming_url, "X-Amzn-AgentAccess-Connect-Mode": "POLLING", # header, not a tool arg }, ) as (read, write, _): async with ClientSession(read, write) as session: await session.initialize() # tools/list now returns ONLY connection_status until the desktop is up: while json.loads((await session.call_tool("connection_status", {})).content[0].text)["state"] != "CONNECTED": await asyncio.sleep(2) tools = await session.list_tools() # now the full desktop tool set
-
-
流式会话(非域加入)使用头。域加入集群则通过MCP
X-Amzn-AgentAccess-Streaming-Session-Url键_meta和aws.agentaccess/workspacesApplicationsSamlAssertion传递SAML断言和堆栈ARN。(详情:connection-setup.md)aws.agentaccess/workspacesApplicationsStackArn -
删除即过期是头(值为
X-Amzn-AgentAccess-Expire-Streaming-Session-On-Delete/true;默认值为false)。过期发生在客户端显式发送HTTPfalse请求时——DELETE会在正常关闭时自动发送该请求。(详情:session-lifecycle.md)mcp-proxy-for-aws -
转发工具按服务器命名空间区分:(例如
forwarded___<server-name>___<tool-name>)——并非forwarded___filesystem___read_file。(详情:tool-forwarding.md)forwarded___<tool-name> -
需要同时启用
COMPUTER_INPUT:需在堆栈的COMPUTER_VISION中启用两者。(详情:enabling-agent-access.md)AgentAccessConfig
Routing
路由指引
| User need | Read |
|---|---|
Enable agent access on a stack ( | enabling-agent-access.md |
| Connect an agent to the MCP server — endpoint, SigV4, streaming URL (non-domain-joined), or Active Directory SAML/Domain Join | connection-setup.md |
Choose BLOCKING vs POLLING; poll | connection-modes.md |
| The computer-use tool set (mouse, keyboard, screenshot) and their parameters | tools-reference.md |
| Automate reliably — screenshot budget, action batching, trusting UI actions, coordinate planning, dialog recovery | automation-best-practices.md |
Expose your own MCP servers on the fleet as | tool-forwarding.md |
| Session lifecycle — cleanup, expire-on-delete, idle timeout, one-agent-per-session | session-lifecycle.md |
Debug an error (exact string → cause → fix): | troubleshooting.md |
| 用户需求 | 查阅文档 |
|---|---|
在堆栈上启用代理访问( | enabling-agent-access.md |
| 将代理连接到MCP服务器——端点、SigV4、流式URL(非域加入)或Active Directory SAML/域加入 | connection-setup.md |
选择BLOCKING与POLLING模式;轮询 | connection-modes.md |
| 计算机操作工具集(鼠标、键盘、截图)及其参数 | tools-reference.md |
| 实现可靠自动化——截图预算、操作批处理、信任UI操作、坐标规划、对话框恢复 | automation-best-practices.md |
将您自己的MCP服务器在集群上暴露为 | tool-forwarding.md |
| 会话生命周期——清理、删除即过期、空闲超时、单代理单会话 | session-lifecycle.md |
调试错误(错误字符串→原因→修复): | troubleshooting.md |
Security Considerations
安全注意事项
- The agent acts under the caller's AWS identity. Every MCP request is SigV4-signed with service ; the desktop session runs with those credentials. Grant only the specific
agentaccess-mcpactions the agent calls (e.g.agentaccess-mcp,InvokeMcp,GetScreenshot,LeftClick) and scope them with theTypeTextcondition key — avoid a blanketagentaccess-mcp:StackArnoragentaccess-mcp:*. Prefer IAM roles over long-lived users. (Full action list + example: connection-setup.md → IAM permissions.)Resource: * - Screenshots can capture sensitive data. captures whatever is on the desktop — treat screenshots as potentially containing PII or secrets. If screenshot storage is enabled, the S3 bucket must enforce encryption at rest and in transit and least-privilege access: grant the AppStream service principal only what it needs and the connecting agent only
COMPUTER_VISION(see enabling-agent-access.md).s3:PutObject - Enable only the capabilities you need. ,
COMPUTER_INPUT, andCOMPUTER_VISIONare independent — do not enable input/forwarding on stacks that only need vision.FORWARD_MCP_TOOLS - Tool forwarding executes code on the fleet. Forwarded MCP servers run on the instance under the session context. Install only trusted servers system-wide, gate with , and scope the
FORWARD_MCP_TOOLSIAM action byCallForwardedTool(see tool-forwarding.md).agentaccess-mcp:StackArn - Keep a human in the loop where warranted. lets an observer watch the live session and stop the agent. Treat agent-driven desktop actions as capable of arbitrary UI operations.
UserControlMode: VIEW_STOP - Audit with CloudTrail. Agent session events are logged; tool calls are CloudTrail data events and require a trail configured to log them. Create a trail with data events enabled, encrypt it with SSE-KMS, and add CloudWatch alarms for anomalous patterns (e.g. high screenshot volume, unexpected
agentaccess-mcp, repeated auth failures). If screenshot storage is enabled, turn on S3 server access logging for the bucket.TypeText - Protect federation material. For domain-joined (SAML) fleets, safeguard the IdP signing certificate and the IAM SAML provider/role trust policy, and do not log the SAML assertion. Traffic is HTTPS + SigV4 — never disable TLS verification.
- Treat typed input as potentially sensitive. can enter secrets (passwords, tokens); these may then appear in screenshots, screenshot-storage S3, and CloudTrail data events. Avoid typing long-lived secrets into the desktop where possible, and restrict who can read those sinks.
type_text - Refer to the current Agent Access documentation and AWS security best practices for the latest guidance.
Note: Regional endpoints, feature availability, and quotas change. When precision matters, confirm against the current Agent Access MCP server documentation. The references focus on the values and gotchas that are easy to get wrong.
- 代理调用者的AWS身份决定其操作权限:每个MCP请求均使用服务进行SigV4签名;桌面会话将使用这些凭据运行。仅授予代理所需的特定
agentaccess-mcp操作权限(例如agentaccess-mcp、InvokeMcp、GetScreenshot、LeftClick),并使用TypeText条件键限定范围——避免使用宽泛的agentaccess-mcp:StackArn或agentaccess-mcp:*。优先使用IAM角色而非长期用户。(完整操作列表+示例:connection-setup.md → IAM权限。)Resource: * - 截图可能包含敏感数据:会捕获桌面上的所有内容——需将截图视为可能包含PII或机密信息。如果启用了截图存储,S3存储桶必须强制实施静态和传输加密,并遵循最小权限访问原则:仅授予AppStream服务主体所需的权限,仅授予连接代理
COMPUTER_VISION权限(请参阅enabling-agent-access.md)。s3:PutObject - 仅启用所需功能:、
COMPUTER_INPUT和COMPUTER_VISION是独立的——对于仅需要视觉功能的堆栈,请勿启用输入/转发功能。FORWARD_MCP_TOOLS - 工具转发会在集群上执行代码:转发的MCP服务器在实例上的会话上下文下运行。仅在系统范围内安装受信任的服务器,使用进行管控,并通过
FORWARD_MCP_TOOLS限定agentaccess-mcp:StackArnIAM操作的范围(请参阅tool-forwarding.md)。CallForwardedTool - 必要时保留人工干预环节:允许观察者查看实时会话并停止代理。需将代理驱动的桌面操作视为能够执行任意UI操作的行为。
UserControlMode: VIEW_STOP - 使用CloudTrail进行审计:代理会话事件会被记录;工具调用属于CloudTrail 数据事件,需要配置相应的跟踪来记录它们。创建启用数据事件的跟踪,使用SSE-KMS加密,并为异常模式(例如高截图量、意外的
agentaccess-mcp、重复认证失败)添加CloudWatch告警。如果启用了截图存储,请为存储桶开启S3服务器访问日志。TypeText - 保护联合身份验证材料:对于域加入(SAML)集群,需妥善保护IdP签名证书和IAM SAML提供商/角色信任策略,且不要记录SAML断言。流量采用HTTPS + SigV4——切勿禁用TLS验证。
- 输入内容可能包含敏感信息:可输入机密信息(密码、令牌);这些信息可能会出现在截图、截图存储S3和CloudTrail数据事件中。尽可能避免在桌面中输入长期机密,并限制可访问这些存储位置的人员。
type_text - 请参考最新的Agent Access文档和AWS安全最佳实践获取最新指导。
注意: 区域端点、功能可用性和配额会发生变化。如需精确信息,请对照最新的Agent Access MCP服务器文档确认。参考文档重点关注容易出错的参数和注意事项。