AWS-Auth
Provides an MCP server for AWS SSO authentication and cloud resource management, letting AI agents manage profiles, verify identity, and interact with EC2/EKS.
List all local AWS profiles, the active default profile, and configured regions (
aws_list_profiles)Switch the default AWS credentials profile to a named profile (
aws_switch_profile)Get current AWS caller identity via STS, including Account ID and IAM Role/User ARN (
aws_get_caller_identity)Retrieve raw AWS session environment variables for isolated subprocess execution (
aws_get_session_env)Check if AWS credentials are valid and auto-refresh them using the cached SSO refresh token if expired (
aws_ensure_credentials)List EC2 instances in a specified region using the given profile (
aws_list_ec2_instances)List EKS clusters in a region and optionally configure local kubeconfig automatically (
aws_list_eks_clusters)Configure local kubeconfig to connect to a specific EKS cluster (
aws_update_kubeconfig)
Provides tools for listing Amazon EKS clusters and updating the local Kubernetes kubeconfig to switch context to a selected EKS cluster.
Enables updating the local Kubernetes kubeconfig context for AWS EKS clusters, allowing quick context switching for kubectl.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AWS-Auth check my current AWS profile"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
⚡ AWS-Auth
Fast, Intelligent AWS SSO Authentication & Model Context Protocol (MCP) Server
Eliminate AWS SSO login fatigue. Zero configuration boilerplate, smart role prioritization, atomic credential caching, and native AI pair-programming integration.
Quick Start • Why aws-auth? • AI / MCP Integration • Features • Documentation
┌───────────────────────┐ ┌────────────────────────┐ ┌───────────────────────┐
│ IAM Identity Center │ ────> │ aws-auth │ ────> │ ~/.aws/credentials │
│ (AWS SSO OIDC) │ │ (Smart Role Selector) │ │ (Strict 0600 POSIX) │
└───────────────────────┘ └───────────┬────────────┘ └───────────┬───────────┘
│ │
┌───────────▼────────────┐ ┌───────────▼───────────┐
│ MCP Server (stdio) │ │ Terraform / K8s / CLI │
│ (Claude / Cursor / AI) │ │ (Instant Compatibility)│
└────────────────────────┘ └───────────────────────┘💡 Why aws-auth vs Alternatives?
Feature |
| Official |
|
|
Zero-Config Account Discovery | ✅ Automatic | ❌ Requires manual | ⚠️ Partial | ❌ Manual |
Model Context Protocol (MCP) | ✅ Native built-in | ❌ None | ❌ None | ❌ None |
1-Second MRU / Pinned Logins | ✅ Smart Prioritization | ❌ None | ⚠️ History prompt | ❌ None |
Real-time Substring & Alias Filter | ✅ Instant typing | ❌ None | ✅ Yes | ❌ None |
Direct | ✅ Atomic & | ❌ Token cache only | ⚠️ Shell wrapper | ⚠️ Keychain wrapper |
Legacy & GUI Tool Compatibility | ✅ 100% Out of Box | ⚠️ Many tools fail | ⚠️ Requires wrapper | ⚠️ Requires wrapper |
WSL2 -> Windows Browser Bridge | ✅ Automatic | ❌ Fails / manual copy | ⚠️ Partial | ❌ No |
EC2 SSM & EKS Context Switching | ✅ Built-in | ❌ Separate tools | ❌ Separate tools | ❌ No |
👉 Read the full Feature Comparison Guide.
Related MCP server: MCP SysOperator
✨ Key Features
🎯 AWS Best-Practice Named Profiles: Credentials are kept in named profile sections (e.g.,
[staging-admin]) and scoped to your terminal session viaexport AWS_PROFILE, preventing unsafe overwrites to[default].⚡ Zero-Boilerplate Discovery: No need to maintain hundreds of lines in
~/.aws/config. Enter your SSO Start URL once, and all authorized accounts and roles are loaded dynamically.⭐ Smart Role Prioritization (MRU): Automatically pins your most recently used roles (e.g.
QA Admin,Prod Admin) to#1and#2. PressingEnterlogs you in within 1 second.🔍 Interactive Substring Search: Type any keyword (
prod,qa,admin,gpu,eks) at the selection prompt to instantly filter dozens of accounts.🤖 Native Model Context Protocol (MCP) Server: Expose AWS profile switching, caller identity, and EC2/EKS exploration to LLM pair programmers (Claude Desktop, Cursor, Antigravity, Gemini).
🔒 Enterprise-Grade Security: Strict POSIX
0600file permissions, atomic file replacement (os.replace), and 300-second expiration safety margins.🌐 WSL2 Seamless Browser Bridge: Automatically detects WSL2 and opens authorization URLs directly in your Windows host browser.
☸️ DevOps Acceleration: Instant EC2 SSM shell sessions and 1-click Amazon EKS kubeconfig context switching.
📦 Installation
Option 1: Standalone Binary (Recommended)
Download the latest pre-compiled binary from GitHub Releases:
Windows (PowerShell 1-Liner)
Run in PowerShell to automatically download the binary, configure PATH, and set up shell integration:
irm https://raw.githubusercontent.com/N0mansky/aws-auth/main/install.ps1 | iexOr manual download via PowerShell:
curl.exe -L https://github.com/N0mansky/aws-auth/releases/latest/download/aws-auth-windows-amd64.exe -o aws-auth.exeLinux (x86_64)
curl -L https://github.com/N0mansky/aws-auth/releases/latest/download/aws-auth-linux-amd64 -o aws-auth
chmod +x aws-auth && sudo mv aws-auth /usr/local/bin/macOS (Universal)
curl -L https://github.com/N0mansky/aws-auth/releases/latest/download/aws-auth-macos-universal -o aws-auth
chmod +x aws-auth && sudo mv aws-auth /usr/local/bin/Option 2: Clone & Install from Source (Automated Shell Setup)
install.sh and install.ps1 automatically configure the shell integration wrapper in your shell profile:
git clone https://github.com/N0mansky/aws-auth.git
cd aws-auth
./install.sh # Linux / macOS / WSL2 (configures ~/.zshrc, ~/.bashrc)
powershell .\install.ps1 # Windows (PowerShell - configures $PROFILE)
.\install.bat # Windows (Command Prompt)Option 3: Install via pip
pip install git+https://github.com/N0mansky/aws-auth.git🐚 Shell Integration (AWS_PROFILE)
To enable seamless session scoping without child-process limitations, install.sh and install.ps1 automatically install a shell wrapper.
If you installed manually or via pip, add this block to your ~/.zshrc, ~/.bashrc, or ~/.profile:
# >>> aws-auth shell wrapper >>>
# Auto-export active profile on shell startup if present
if [ -f ~/.aws-auth/current_profile ]; then
export AWS_PROFILE=$(< ~/.aws-auth/current_profile)
fi
# Scopes active profile to current terminal session via AWS_PROFILE
aws-auth() {
command /usr/local/bin/aws-auth "$@"
local ret=$?
if [ $ret -eq 0 ] && [ -f ~/.aws-auth/current_profile ]; then
export AWS_PROFILE=$(< ~/.aws-auth/current_profile)
fi
return $ret
}
# <<< aws-auth shell wrapper <<<Reload your shell or run source ~/.zshrc (or source ~/.bashrc). Terminal prompts like Starship (☁️ <profile>) and tools like kubectl or aws will instantly reflect your active profile!
🚀 Quick Start
1. Interactive Login
aws-authAvailable account-role combinations (Showing 1-10 of 18):
+-----+------------------------------+-----------------+------------------------------+-------------+
| # | Account | Account ID | Role | Region |
+-----+------------------------------+-----------------+------------------------------+-------------+
| 1 | ⭐ Production-App (PROD) | (111222333444) | AdministratorAccess | us-east-1 |
| 2 | ⭐ Staging-Web (QA) | (555666777888) | AdministratorAccess | us-east-1 |
| 3 | Analytics-Data | (999888777666) | AdministratorAccess | us-east-1 |
...
Select number 1-10 (default: 1) (type keyword to filter): [ENTER]
✅ Profile 'production-app-admin' saved to ~/.aws/credentials.
✅ Active profile set to: production-app-admin (scoped via AWS_PROFILE)2. Configure Portal & Custom Aliases
aws-auth --configureCustomize environment labels and preferred accounts in ~/.aws-auth/config.json:
{
"sso_start_url": "https://my-company.awsapps.com/start",
"sso_region": "us-east-1",
"preferred_accounts": ["Staging-Web", "Production-App"],
"aliases": {
"555666777888": "QA",
"111222333444": "PROD"
}
}🤖 AI Agent Integration (Model Context Protocol)
aws-auth runs as a high-performance MCP Server over stdio.
Add to Claude Desktop (claude_desktop_config.json) or Cursor:
{
"mcpServers": {
"aws-auth": {
"command": "aws-auth",
"args": ["--mcp"]
}
}
}What AI Assistants Can Do with aws-auth:
Check active AWS Account, Region, and IAM Role ARN (
aws_get_caller_identity).Switch active AWS profile (
aws_switch_profile) without human intervention.Inspect running EC2 instances and Amazon EKS clusters (
aws_list_ec2_instances,aws_list_eks_clusters).Update local Kubernetes context (
aws_update_kubeconfig).
👉 Read the full MCP Setup & Tool Reference Guide.
🛠️ CLI Command Reference
# Core Authentication
aws-auth # Interactive SSO login & smart role switch
aws-auth --configure # Interactive SSO portal setup
aws-auth --identity # Show current STS caller identity
aws-auth --refresh-cache # Force refresh remote account/role metadata
aws-auth --write-default # Opt-in to write/sync credentials to [default] section
# Profile Management & Session Scoping
aws-auth --list-profiles # List all stored AWS profiles (* marks active)
aws-auth --current-profile # Print active profile name (fast query)
aws-auth -p, --use-profile NAME # Activate named profile in current session
aws-auth -s, --switch-profile # Interactive profile switcher
aws-auth --set-default NAME # Copy profile credentials to [default] section
aws-auth --delete NAME # Delete profile credentials
# Resource Discovery & DevOps
aws-auth --list-ec2 # List EC2 instances and connect via SSM
aws-auth --list-eks # List EKS clusters and update kubeconfig
# Scripting & Headless Automation
aws-auth --current-profile --json # JSON output {"current_profile": "..."}
aws-auth --list-profiles --json
aws-auth --identity --json
eval $(aws-auth --export-env prod-profile) # Export AWS keys to current shell
# AWS credential_process standard
aws-auth --credential-process my-profile📚 Documentation
🛠️ Development & Testing
Unified commands are provided via the Makefile:
make help # View all available targets
make venv # Initialize virtual environment and install dev dependencies
make test # Run automated unit tests with pytest
make check # Run full quality gate (secret scanning, Bandit SAST, audit, tests)
make build # Compile standalone PyInstaller binary🤝 Contributing
Contributions are welcome! Please check out CONTRIBUTING.md for details on setting up a development environment, testing standards, and security policies.
📄 License
This project is licensed under the MIT License.
Available Tools
8 toolsaws_ensure_credentialsB
Check if AWS credentials are valid, and automatically refresh using cached SSO refresh token if expired.
Args: profile_name: AWS profile name (defaults to 'default')
Inputs: profile_name. Returns: result
aws_get_caller_identityA
Get current AWS caller identity (Account ID, IAM Role/User ARN, User ID) using STS.
Args: profile_name: Optional profile name to check. If omitted, checks the default profile.
Inputs: profile_name. Returns: result
aws_get_session_envA
Get raw AWS session environment variables (AccessKey, SecretKey, SessionToken, Region) for isolated subprocess execution.
Args: profile_name: AWS profile name (defaults to 'default')
Inputs: profile_name. Returns: result
aws_list_ec2_instancesB
List EC2 instances in a specific AWS region using the specified profile.
Args: region: AWS region (e.g. 'us-east-1', 'us-west-2') profile_name: AWS profile name to use (default: 'default')
Inputs: region, profile_name. Returns: result
aws_list_eks_clustersB
List EKS clusters in a specific AWS region and optionally configure local ~/.kube/config.
Args: region: AWS region (e.g. 'us-east-1', 'us-west-2') profile_name: AWS profile name to use (default: 'default') update_kubeconfig: If True, automatically configures kubeconfig for found clusters
Inputs: region, profile_name, update_kubeconfig. Returns: result
aws_list_profilesA
List all available local AWS profiles, current active default profile, and configured regions.
Inputs: no named parameters. Returns: result
aws_switch_profileB
Switch the default AWS credentials profile in ~/.aws/credentials to a specific profile name.
Args: profile_name: Name of the AWS profile to set as default (e.g. 'dev', 'prod', 'qa')
Inputs: profile_name (required). Returns: result
aws_update_kubeconfigB
Configure local kubeconfig to connect to a specific EKS cluster.
Args: cluster_name: Name of the EKS cluster region: AWS region of the cluster profile_name: AWS profile name to authenticate with
Inputs: cluster_name (required), region, profile_name. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools are clearly distinct by resource and action (list_profiles, switch_profile, get_caller_identity, list_ec2_instances). Minor overlap exists between aws_ensure_credentials and aws_get_caller_identity/aws_get_session_env (all credential/session related), and aws_update_kubeconfig overlaps with aws_list_eks_clusters' update_kubeconfig flag.
Every tool follows a strict aws_verb_noun pattern (aws_list_profiles, aws_switch_profile, aws_get_caller_identity, aws_list_ec2_instances). Fully predictable and consistent conventions throughout.
Eight tools is well-scoped for an auth/session + light resource-discovery server. Each tool earns its place without redundancy or bloat.
Core auth lifecycle is covered: profile listing/switching, credential validation/refresh, session env, caller identity, plus EKS/EC2 discovery and kubeconfig setup. Minor gaps like assume-role or profile creation/cleanup are absent but agents can work around them via the existing profile tools.
Maintenance
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your AWS environment. This allows for natural language querying and management of your AWS resources during conversations. Think of better Amazon Q alternative.3296ISC
- AlicenseCqualityNot gradedmaintenanceAn MCP server for Infrastructure as Code that enables AI assistants to manage cloud resources through Ansible and Terraform operations. It supports executing playbooks, managing AWS services, and running Terraform commands with optional LocalStack integration.18-

@yawlabs/aws-mcpofficial
AlicenseAqualityBmaintenanceA small AWS MCP for AI assistants: one server, one config entry, SSO re-auth baked in, generic CRUD over hundreds of resource types, live docs lookup, server-side scripting for batched workflows.30405 npm5MIT- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants to perform comprehensive AWS security analysis through natural language queries, bridging AI with AWS security services.2Apache 2.0