Skip to main content
Glama

⚡ AWS-Auth

Autenticación AWS SSO rápida e inteligente y servidor Model Context Protocol (MCP)

CI Release License: MIT Python Version MCP Ready

Elimina la fatiga de inicio de sesión de AWS SSO. Sin código repetitivo de configuración, priorización inteligente de roles, caché atómica de credenciales e integración nativa de programación en pareja con IA.

Inicio Rápido • ¿Por qué aws-auth? • Integración IA / MCP • Características • Documentación


  ┌───────────────────────┐       ┌────────────────────────┐       ┌───────────────────────┐
  │  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)│
                                  └────────────────────────┘       └───────────────────────┘

💡 ¿Por qué aws-auth frente a las alternativas?

Característica

aws-auth

aws sso login oficial

granted / assume

aws-vault

Descubrimiento de cuentas sin configuración

✅ Automático

❌ Requiere ~/.aws/config manual

⚠️ Parcial

❌ Manual

Model Context Protocol (MCP)

✅ Integrado de forma nativa

❌ Ninguno

❌ Ninguno

❌ Ninguno

Inicios de sesión MRU / fijados en 1 segundo

✅ Priorización inteligente

❌ Ninguno

⚠️ Indicador de historial

❌ Ninguno

Filtro de subcadena y alias en tiempo real

✅ Escritura instantánea

❌ Ninguno

✅ Sí

❌ Ninguno

Sincronización directa de ~/.aws/credentials

✅ Atómica y 0600

❌ Solo caché de tokens

⚠️ Envoltorio de shell

⚠️ Envoltorio de llavero

Compatibilidad con herramientas heredadas y GUI

✅ 100% lista para usar

⚠️ Muchas herramientas fallan

⚠️ Requiere envoltorio

⚠️ Requiere envoltorio

Puente de navegador WSL2 -> Windows

✅ Automático

❌ Fallo / copia manual

⚠️ Parcial

❌ No

Cambio de contexto EC2 SSM y EKS

✅ Integrado

❌ Herramientas separadas

❌ Herramientas separadas

❌ No

👉 Lee la Guía completa de comparación de funciones.


Related MCP server: MCP SysOperator

✨ Características principales

  • ⚡ Descubrimiento sin código repetitivo: No es necesario mantener cientos de líneas en ~/.aws/config. Introduce tu URL de inicio de SSO una vez y todas las cuentas y roles autorizados se cargan dinámicamente.

  • ⭐ Priorización inteligente de roles (MRU): Fija automáticamente tus roles usados más recientemente (p. ej. QA Admin, Prod Admin) en #1 y #2. Pulsar Enter te inicia sesión en 1 segundo.

  • 🔍 Búsqueda interactiva de subcadenas: Escribe cualquier palabra clave (prod, qa, admin, gpu, eks) en el indicador de selección para filtrar al instante docenas de cuentas.

  • 🤖 Servidor Model Context Protocol (MCP) nativo: Expone el cambio de perfil de AWS, la identidad del llamador y la exploración de EC2/EKS a programadores en pareja con LLM (Claude Desktop, Cursor, Antigravity, Gemini).

  • 🔒 Seguridad de nivel empresarial: Permisos de archivo POSIX estrictos 0600, reemplazo atómico de archivos (os.replace) y márgenes de seguridad de expiración de 300 segundos.

  • 🌐 Puente de navegador WSL2 sin interrupciones: Detecta automáticamente WSL2 y abre las URL de autorización directamente en el navegador de tu host Windows.

  • ☸️ Aceleración de DevOps: Sesiones de shell EC2 SSM instantáneas y cambio de contexto kubeconfig de Amazon EKS con 1 clic.


📦 Instalación

Opción 1: Binario independiente (recomendado)

Descarga el último binario precompilado desde GitHub Releases:

Windows (una línea de PowerShell)

Ejecuta en PowerShell para descargar automáticamente el binario y configurar tu PATH:

irm https://raw.githubusercontent.com/N0mansky/aws-auth/main/install.ps1 | iex

O descarga manual mediante PowerShell:

curl.exe -L https://github.com/N0mansky/aws-auth/releases/latest/download/aws-auth-windows-amd64.exe -o aws-auth.exe

Linux (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/

Opción 2: Instalar mediante pip

pip install git+https://github.com/N0mansky/aws-auth.git

Opción 3: Clonar e instalar desde el código fuente

git clone https://github.com/N0mansky/aws-auth.git
cd aws-auth

./install.sh                      # Linux / macOS / WSL2
powershell .\install.ps1          # Windows (PowerShell)
.\install.bat                     # Windows (Command Prompt)

🚀 Inicio rápido

1. Inicio de sesión interactivo

aws-auth
Available 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' set as default in ~/.aws/credentials.

2. Configurar el portal y los alias personalizados

aws-auth --configure

Personaliza las etiquetas de entorno y las cuentas preferidas en ~/.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"
  }
}

🤖 Integración de agentes de IA (Model Context Protocol)

aws-auth se ejecuta como un servidor MCP de alto rendimiento sobre stdio.

Añádelo a Claude Desktop (claude_desktop_config.json) o a Cursor:

{
  "mcpServers": {
    "aws-auth": {
      "command": "aws-auth",
      "args": ["--mcp"]
    }
  }
}

Qué pueden hacer los asistentes de IA con aws-auth:

  • Comprobar la cuenta de AWS activa, la región y el ARN del rol IAM (aws_get_caller_identity).

  • Cambiar el perfil de AWS activo (aws_switch_profile) sin intervención humana.

  • Inspeccionar instancias EC2 en ejecución y clústeres de Amazon EKS (aws_list_ec2_instances, aws_list_eks_clusters).

  • Actualizar el contexto local de Kubernetes (aws_update_kubeconfig).

👉 Lee la Guía de referencia de configuración y herramientas de MCP.


🛠️ Referencia de comandos CLI

# 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

# Profile Management
aws-auth --list-profiles     # List all stored AWS profiles
aws-auth --switch-profile    # Switch active default profile
aws-auth --set-default NAME  # Set specific profile as default
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 --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

📚 Documentación


🤝 Contribuciones

¡Las contribuciones son bienvenidas! Consulta CONTRIBUTING.md para obtener detalles sobre cómo configurar un entorno de desarrollo y ejecutar pruebas.


📄 Licencia

Este proyecto está licenciado bajo la Licencia MIT.

Available Tools

10 tools
aws_connection_diagnosticsB

Check identity, local dependencies, and SSM prerequisites without starting a session.

Inputs: region, target, local_port, profile_name. Returns: result

aws_ensure_credentialsA

Check if AWS credentials are valid, and automatically refresh using cached SSO refresh token if expired.

Args: profile_name: AWS profile name (defaults to the selected or active profile).

Inputs: profile_name. Returns: result

aws_get_caller_identityB

Get current AWS caller identity (Account ID, IAM Role/User ARN, User ID) using STS.

Args: profile_name: Optional profile name; otherwise uses the MCP server's selected profile.

Inputs: profile_name. Returns: result

aws_get_session_envC

Get profile environment; raw credentials require explicit include_credentials=True.

Args: profile_name: AWS profile name (defaults to the selected or active profile). include_credentials: Explicitly include sensitive raw credentials in the response.

Inputs: profile_name, include_credentials. 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 (defaults to the selected or active profile).

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 (defaults to the selected or active profile). 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_list_rds_databasesC

Discover Aurora clusters and standalone RDS instances without fetching secrets.

Inputs: region, profile_name. Returns: result

aws_switch_profileB

Select a named profile for this MCP server without modifying default credentials.

Args: profile_name: Name of the AWS profile to use in subsequent tool calls.

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

    A3.5/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (profile switching, credential refresh, identity lookup, resource listing). However, aws_connection_diagnostics overlaps slightly with aws_get_caller_identity and aws_ensure_credentials since it also checks identity and prerequisites, and aws_list_eks_clusters can optionally configure kubeconfig, duplicating aws_update_kubeconfig's role.

    Naming Consistency4/5

    All tools share the aws_ prefix and most follow an aws_verb_noun pattern (e.g., aws_switch_profile, aws_list_rds_databases, aws_get_caller_identity). The outlier is aws_connection_diagnostics, which uses a noun phrase instead of a verb, breaking the otherwise consistent convention.

    Tool Count5/5

    Ten tools is well-scoped for an AWS authentication and connectivity server. Each tool covers a distinct aspect of profile management, credential handling, identity verification, diagnostics, or resource discovery without feeling bloated.

    Completeness4/5

    The surface covers the core auth lifecycle: listing and switching profiles, validating/refreshing credentials, retrieving identity and session environment, and running diagnostics. Minor gaps exist around explicit credential clearing or role assumption, but the essential workflows are present.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      A 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.
      3
      296
      ISC
    • A
      license
      C
      quality
      Not graded
      maintenance
      An 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
      -
    • A
      license
      A
      quality
      B
      maintenance
      A 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.
      30
      819 npm
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      2
      Apache 2.0