agentcore-mcp-oauth-facade

agentcore-mcp-oauth-facade is a skill for Claude Code, Codex from aws-samples/sample-agent-skills-for-builders. It costs 122 tokens per session (2,175 once invoked), scanned A, original, Apache-2.0.

A guide for placing an OAuth and MCP compatibility layer in front of an Amazon Bedrock AgentCore Gateway or Runtime. OAuth is the standard process for delegated login, while MCP is a protocol that lets AI clients connect to tools.

In plain words
What is it for?
Use it when connecting clients such as Claude Code, Cursor, Amazon Quick, or mcp-remote to AgentCore through Cognito-issued tokens and an OAuth facade.
Why use it?
It addresses connection problems when clients cannot discover OAuth settings, register themselves, keep sessions, receive event-stream responses, or see the full tool list.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it when connecting clients such as Claude Code, Cursor, Amazon Quick, or mcp-remote to AgentCore through Cognito-issued tokens and an OAuth facade.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade
About the project

Sample Agent Skills for Builders is a collection of reusable skills that extend AI coding agents with AWS, CDK, security, testing, and engineering workflows. Developers can install the skills for practical AWS development tasks or use the repository as a model for creating their own agent skills. The catalogue entries are skills and instructions from this collection.

aws-samples/sample-agent-skills-for-builders · 47 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aws-samples/sample-agent-skills-for-builders --skill agentcore-mcp-oauth-facade
Clone the repo
git clone --depth 1 https://github.com/aws-samples/sample-agent-skills-for-builders

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agentcore-mcp-oauth-facade

README.md
[![agentmods](https://agentmods.dev/badge/skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade/github.svg)](https://agentmods.dev/skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade)
Your own site
<a href="https://agentmods.dev/skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade"><img src="https://agentmods.dev/badge/skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agentcore-mcp-oauth-facade

Your own site · 80×15
<a href="https://agentmods.dev/skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade"><img src="https://agentmods.dev/badge/skills/aws-samples/sample-agent-skills-for-builders/agentcore-mcp-oauth-facade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,175 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00122 $0.02175
Opus 5 $0.00061 $0.01087
Sonnet 5 $0.00024 $0.00435
Haiku 4.5 $0.00012 $0.00217

Measured 10d ago against content hash 2c8f220eec03, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

agentcore-mcp-oauth-facade scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

5. **Test with a real strict MCP client, not curl.** curl doesn't demand
skills/agentcore-mcp-oauth-facade/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AgentCore MCP OAuth Facade

Bedrock AgentCore Gateway and Runtime expose MCP endpoints, but real-world MCP clients expect a complete OAuth 2.0 + MCP implementation: RFC 9728 protected resource metadata, RFC 8414 authorization server metadata, Dynamic Client Registration, arbitrary loopback redirect URIs, Mcp-Session-Id continuity, SSE responses, and un-paginated tool lists. Neither Cognito nor AgentCore Gateway provides all of that out of the box.

This skill captures a production-tested pattern: a small stateless Lambda facade (CloudFront → HTTP API → Lambda) that bridges every gap while never issuing tokens itself — Cognito remains the issuer, and the Gateway's JWT authorizer validates tokens unchanged.

MCP client (Claude Code / Cursor / Quick / mcp-remote)
    │  OAuth discovery, /oauth/authorize, /oauth/token, /register, /mcp
    ▼
OAuth Facade  (CloudFront → HTTP API $default stage → Lambda)
    │  injects routing session-id, rewrites tool names, aggregates pages,
    │  re-wraps JSON as SSE, synthesizes Mcp-Session-Id
    ▼
AgentCore Gateway (CUSTOM_JWT authorizer) ──► Lambda target ──► tools

When to Apply

Reference this skill when:

  • Putting Bedrock AgentCore Gateway or Runtime behind OAuth for third-party MCP clients (Claude Code, Cursor, Amazon Quick, anything built on mcp-remote).
  • An MCP client's connect wizard fails with a manual-credentials form (e.g. Quick's "Fix highlighted fields") — almost always a broken discovery chain.
  • Tools past the first 30 are missing from tools/list — Gateway pagination that the client never follows.
  • Tool calls intermittently return 404 "no valid session" or -32602 Unknown tool after migrating from an MCP Runtime to AgentCore Gateway.
  • Cognito must serve clients that expect DCR (RFC 7591) or arbitrary redirect_uri values.

Not for: general AgentCore service setup (Gateway targets, Runtime deployment, IAM) — see the aws-agentic-ai skill for that.

How It Works

The facade solves three groups of problems. Each has a deep-dive reference:

Read the full file on GitHub · 167 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 167 lines · 122 tokens per session scan A 2c8f220eec03

Subscribe to this mod's changes

agentcore-mcp-oauth-facade is a skill published in the GitHub repository aws-samples/sample-agent-skills-for-builders (47 stars, last pushed 14d ago), licensed Apache-2.0. It adds 122 tokens to every session and 2,175 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

agui-dotnet-protobuf

Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…

ag-ui-protocol/ag-ui · 162 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

fastapi-router-py

Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.

microsoft/skills · 46 tokens

migrate-segw-to-rap

Reverse-engineer a SEGW-built OData V2 service (MPC/DPC/MPCEXT/DPCEXT) into a modern RAP V4 service — tables, CDS views (interface + projection), behavior definitions, draft entities, service definition + binding. Use when asked to "migrate this SEGW service to RAP", "convert OData V2 to V4 RAP", "modernize this…

arc-mcp/arc-1 · 106 tokens

telnyx-messaging-hosted-curl

Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.

team-telnyx/ai · 45 tokens