This guide helps AI development environments (Kiro, Claude Code, VS Code, etc.) understand how to build with and use the Agent Access MCP Server.
Agent Access lets AI agents interact with Windows desktop applications running on Amazon WorkSpaces Applications (AppStream 2.0). Agents connect via the Model Context Protocol (MCP) and can take screenshots, click, type, scroll, and perform keyboard shortcuts — automating any desktop workflow.
┌─────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ AI Agent │────▶│ MCP Transport │────▶│ Agent Access │────▶│ Windows Desktop │
│ (IDE/SDK) │◀────│ (SigV4 signed) │◀────│ MCP Server │◀────│ (AppStream) │
└─────────────┘ └──────────────────┘ └──────────────────┘ └─────────────────┘
Agents connect directly to the MCP endpoint over Streamable HTTP, with mcp-proxy-for-aws SigV4-signing each request. Every sample in this repo uses this path.
https://agentaccess-mcp.{region}.api.aws/mcp
Available regions:
| Region | Endpoint |
|---|---|
| US East (N. Virginia) | agentaccess-mcp.us-east-1.api.aws |
| US East (Ohio) | agentaccess-mcp.us-east-2.api.aws |
| US West (Oregon) | agentaccess-mcp.us-west-2.api.aws |
| Canada (Central) | agentaccess-mcp.ca-central-1.api.aws |
| Europe (Frankfurt) | agentaccess-mcp.eu-central-1.api.aws |
| Europe (Ireland) | agentaccess-mcp.eu-west-1.api.aws |
| Europe (London) | agentaccess-mcp.eu-west-2.api.aws |
| Europe (Paris) | agentaccess-mcp.eu-west-3.api.aws |
| Asia Pacific (Tokyo) | agentaccess-mcp.ap-northeast-1.api.aws |
| Asia Pacific (Seoul) | agentaccess-mcp.ap-northeast-2.api.aws |
| Asia Pacific (Mumbai) | agentaccess-mcp.ap-south-1.api.aws |
| Asia Pacific (Singapore) | agentaccess-mcp.ap-southeast-1.api.aws |
| Asia Pacific (Sydney) | agentaccess-mcp.ap-southeast-2.api.aws |
Requests must be SigV4-signed with service name agentaccess-mcp. Required IAM action: agentaccess-mcp:*.
Each MCP session is bound to a desktop via a streaming URL (from appstream:CreateStreamingURL) passed as a header:
X-Amzn-AgentAccess-Streaming-Session-Url: <streaming-url>
The MCP server exposes these tools for desktop interaction:
Capture the current screen state. Returns a PNG image.
{"name": "screenshot", "arguments": {}}Click at screen coordinates.
{"name": "left_click", "arguments": {"x": 500, "y": 300}}Double-click at coordinates.
{"name": "double_click", "arguments": {"x": 500, "y": 300}}Triple-click (select line/paragraph).
{"name": "triple_click", "arguments": {"x": 500, "y": 300}}Type a string of text.
{"name": "type_text", "arguments": {"text": "Hello World"}}Press key combinations. Supports modifiers (ctrl, alt, shift, super) and special keys (Return, Escape, Tab, F1-F12).
{"name": "key", "arguments": {"keys": "ctrl+s"}}Common combinations:
ctrl+c/ctrl+v— copy/pastectrl+a— select allctrl+z— undoalt+F4— close windowsuper— open Start Menusuper+r— open Run dialogalt+Tab— switch windowsReturn— press EnterEscape— dismiss dialog
Scroll at coordinates.
{"name": "scroll", "arguments": {"x": 500, "y": 400, "direction": "down", "amount": 3}}Pause execution (useful for waiting for applications to load).
{"name": "wait", "arguments": {"seconds": 5}}from strands import Agent
from strands.models.bedrock import BedrockModel
from strands.tools.mcp import MCPClient
from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client
mcp_client = MCPClient(lambda: aws_iam_streamablehttp_client(
endpoint="https://agentaccess-mcp.us-east-1.api.aws/mcp",
aws_service="agentaccess-mcp",
aws_region="us-east-1",
headers={"X-Amzn-AgentAccess-Streaming-Session-Url": streaming_url},
))
model = BedrockModel(model_id="global.anthropic.claude-sonnet-4-6")
agent = Agent(model=model, tools=[mcp_client])
agent("Open Notepad and type 'Hello World'")Any IDE that supports MCP servers via stdio can connect using mcp-proxy-for-aws:
pip install mcp-proxy-for-awsAdd an MCP server to your IDE's config with:
{
"type": "stdio",
"command": "mcp-proxy-for-aws",
"args": [
"https://agentaccess-mcp.us-east-1.api.aws/mcp",
"--service", "agentaccess-mcp",
"--region", "us-east-1"
]
}Where to put this depends on your IDE:
- Kiro:
.kiro/settings/mcp.json→ undermcpServers.<name> - Claude Code:
.claude/settings.json→ undermcpServers.<name> - VS Code:
.vscode/mcp.json→ underservers.<name>
Optional flags:
--profile <name>— use a specific AWS profile--region <region>— match your fleet's region--metadata "aws.agentaccess/streamingSessionUrl=<URL>"— pass an explicit streaming URL
- Minimize screenshots — they're expensive (large image payloads). Take one, perform 3-5 actions, then screenshot to verify.
- Use exact tool names —
left_click, notclick.key("ctrl+a"), notctrl_a. - Handle dialogs — applications may show update prompts, recovery dialogs, or setup wizards. Use
key("Escape")orkey("alt+F4")to dismiss. - Use Run dialog for launching apps —
key("super+r")→type_text("notepad")→key("Return")is more reliable than Start Menu search. - Batch actions — don't screenshot after every single action. Group related actions together.
- Don't repeat failures — if an approach fails twice, try a completely different method.
- Session starts when the first MCP
initializerequest is received with a streaming URL. - Session is active while the MCP connection is open. Tools can be called repeatedly.
- Session ends when the MCP connection closes or the streaming URL expires (default: 1 hour, max: 16 hours).
- Desktop state persists within a session — applications stay open, files remain on disk.
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized |
SigV4 signing failed | Check AWS credentials |
403 Forbidden |
Missing IAM permissions | Add agentaccess-mcp:* to policy |
DCV proxy not initialized |
No streaming URL provided | Pass the streaming URL header |
dcv session not ready |
Desktop still booting | Retry — agent retries automatically for up to 10 minutes |
backend unavailable |
Transient service issue | Retry (auto-retried 10 times) |
pip install strands-agents mcp-proxy-for-aws boto3
The MCP server prefixes all tool names with agentaccess___ (e.g., agentaccess___screenshot, agentaccess___left_click). Use the unprefixed names — the mcp-proxy-for-aws transport handles the prefix transparently.
After creating a streaming URL, the DCV desktop session takes 5-30 seconds to connect. During this time, tools/call returns "Unknown tool" errors. Implement retry logic in your agent, or use lib/agent_common.py, which retries the MCP connection automatically.
CI (.github/workflows/ci.yml) runs a fast, dependency-free gate on every push
and pull request to main:
- Byte-compiles all Python under
agents/,lib/,scripts/,mcp_servers/, and the repo root (syntax / Python-version check on 3.10 and 3.12). - Validates every
agents/**/skills/*.jsonfile parses as JSON.
Run the exact same checks locally before opening a PR:
./scripts/ci_local.shExit status 0 means both checks pass — the same contract as CI. The script
needs only Python (no venv, AWS credentials, or runtime dependencies). Override
the interpreter with PYTHON_CMD=python3.10 ./scripts/ci_local.sh to match a
specific CI matrix version.
This gate intentionally does not install dependencies or run the agents — it catches syntax errors and malformed skill files, not runtime behavior. Full behavioral testing requires a live forwarding/desktop fleet.
A demo agent is a thin agent.py that calls agent_common.run_standard_agent,
plus a prompts/ directory (system_prompt.md, task_prompt.md) and an
optional skills/<name>.json. Copy an existing agent (e.g. agents/paint_demo)
as a starting point, then run ./scripts/ci_local.sh to confirm it compiles and
its skill JSON is valid. See agents/mcp_forwarding_demo for an example that
drives forwarded MCP tools.