Skip to main content
Glama

updsts

A simple CUI tool and local MCP server for reflecting AWS STS credentials into the credentials file

English | 日本語

1. Overview

updsts is a command-line tool that retrieves AWS STS (Security Token Service) credentials using the credentials already registered in an existing credentials file (~/.aws/credentials). The retrieved credentials are automatically reflected in the same file.
It also works as a local MCP server that automatically updates the temporary credentials in the credentials file, so it can be operated from common Agent tools.

Related MCP server: Aws Claw

2. Features

  • Obtain temporary AWS STS credentials using MFA authentication

  • Automatically update the STS profile in the credentials file with the new credentials

  • Support for TOTP-based MFA devices

  • List all AWS profiles in the credentials file

  • Leave profiles other than the one being updated untouched

  • Can be operated from common Agent tools when running as a local MCP server
    (Of course, care is taken to ensure that confidential information such as secret keys and session tokens is not sent to the LLM.)

  • Support for proxy environments

3. Runtime Environment

This project uses uv as the package manager.
Using uv allows you to reproduce the runtime environment automatically.

For how to install uv, see:

4. Installation/Usage

4-1. Install as a uv tool

Install updsts into a uv environment and use it.
Use this method when you use updsts as a CUI tool.

4-1-1. Installation

# Install from PyPI
uv tool install updsts

After installation, you can run the updsts command directly.

updsts --help

4-2. Using uvx

Run updsts directly from PyPI with uvx, without installing it.

4-2-1. Running with the uvx command

Start updsts with the uvx command.

uvx updsts --help
# Add @latest to always use the latest version
uvx updsts@latest --help

4-2-2. Registering as an MCP server

By registering updsts as an MCP server, you can operate it from common Agent tools.
For how to register an MCP server, refer to the manual of the Agent tool you use.

{
  // Example configuration for registering as an MCP server
  //
  // (Note)
  // Registration keys differ depending on the Agent tool.
  "mcpServers": {
    // Configuration for starting updsts as an MCP server using uvx
    "updsts-uv": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "updsts@latest",
        "mcp",
        "--mcp-server"
      ],
      "env": {}
    }
  }
}

4-3. Registering as an MCP server via the Claude plugin

updsts can be installed as a Claude plugin.

# Add the marketplace
/plugin marketplace add zv-louis/zv-plugin-marketplace
# Install from the marketplace
/plugin install updsts-mcp@zv-plugins

5. CUI Tool Command Options

5-1. Common Options

  • -v, --verbose LEVEL: Set the output verbosity (0: normal, 1: verbose, 2: debug)

  • -c, --credential_file FILE: Path to the credentials file (default: ~/.aws/credentials)

5-2. get Command

Get and update the STS credentials for the specified AWS profile.

updsts get -n <profile_name> -t <totp_token>
  • -n, --profile_name: AWS profile name to get the STS token for (required)

  • -t, --totp_token: TOTP token generated by the MFA device (required)

  • -sn, --sts_profile_name: STS profile name to create in the credentials file (optional, default: AWS profile name + "_sts")

  • -d, --duration: Token duration in seconds (optional, default: 3600)

  • -c, --credential_file: Path to the credentials file (optional, default: ~/.aws/credentials)

5-3. list Command

Display all AWS profiles in the credentials file.
Secrets (aws_access_key_id, aws_secret_access_key, aws_session_token) are displayed masked.

updsts list

5-4. mcp Command

Start updsts as a local MCP server.
You can operate updsts from Agent tools.

updsts mcp --mcp-server

If the --mcp-server option is not specified, the MCP tool list is output.

updsts mcp

6. Credentials File

6-1. Credentials File Format

updsts works with the standard AWS CLI credentials file format.
It preserves existing profiles while updating only the specified section.

Example credentials file:

[default]
# Access Key ID (required)
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
# Secret Access Key (required)
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLE
# IAM user's MFA device ARN (required. The user must add this)
mfa_device_arn = arn:aws:iam::123456789012:mfa/user 
# TOTP secret name managed by the mktotp MCP server (optional. The user can add this)
# If this is set and the `mktotp` MCP server is available, the Agent will automatically generate and use the TOTP token.
totp_secret_name = my_totp_secret 

# The section enclosed by the following tags is automatically created/updated by updsts.
# ${{{ key=<name of the profile that requested STS> [auto update by updsts]
[default_sts]
aws_access_key_id = ASIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYtempKEY
aws_session_token = IQoJb3JpZ2luX2VjE...
expiration_datetime = 2025-10-05T15:30:00+09:00
# $}}} [auto update by updsts]

updsts automatically manages the section between the special tags and leaves other profiles intact.
The tags are added automatically on the first run, so there is no need to add them manually.

6-2. Credentials File Location

By default, the credentials file is stored in the following location.
※ This is the same file used by the AWS CLI.

~/.aws/credentials

You can specify a different location with the -c option.

7. Available MCP Tools

When started as an MCP server, the following tools are available from Agent tools.

updsts_update_sts_credential

Get the STS credentials for the specified AWS profile and create/update the STS profile in the credentials file.

  • Parameters:

    • profile_name (str): AWS profile name to update (required)

    • totp_token (str): TOTP token from the MFA device (required)

    • sts_profile_name (str | None): STS profile name to create in the credentials file (optional)

      • If None or an empty string, <profile_name>_sts is used (default: None)

    • cred_file (str | None): Path to the credentials file (optional)

      • If None or an empty string, the default location (~/.aws/credentials) is used (default: None)

    • duration (int): STS token duration in seconds (optional, default: 3600)

  • Returns (dict[str, str] | None): A dictionary containing the update result, or None on failure

    • updated_profile_name: Name of the STS profile that was updated

    • aws_access_key_id: Access key ID of the retrieved STS credentials (masked)

    • aws_token_expiration: Expiration of the STS credentials (ISO 8601 format in the local time zone)

    • The secret access key and the session token are not returned

updsts_get_credential_info

Get the information of the specified AWS profile in the credentials file.
For security reasons, aws_access_key_id, aws_secret_access_key and aws_session_token are returned masked.

  • Parameters:

    • profile_name (str): AWS profile name to retrieve (required)

    • cred_file (str | None): Path to the credentials file (optional)

      • If None or an empty string, the default location (~/.aws/credentials) is used (default: None)

  • Returns (dict[str, str] | None): A dictionary containing the credential details, or None if not found

updsts_get_credential_info_list

Get the information of all AWS profiles in the credentials file.
For security reasons, aws_access_key_id, aws_secret_access_key and aws_session_token are returned masked.

  • Parameters:

    • cred_file (str | None): Path to the credentials file (optional)

      • If None or an empty string, the default location (~/.aws/credentials) is used (default: None)

  • Returns (list[dict[str, str]]): A list of dictionaries containing the credential details, or an empty list if no profiles are found

8. Security Notes

  • The credentials file contains sensitive information, so protect it with appropriate permissions (recommended: 600)

9. License

This project is licensed under the MIT License.
See the LICENSE file for details.

Available Tools

3 tools
updsts_get_credential_infoUpdsts Get Credential InfoB

Get registerd AWS credential information for the specified profile.

This tool retrieves the registerd AWS credentials for the specified profile name from the AWS credentials file.

Inputs: profile_name (required), cred_file. Returns: result

updsts_get_credential_info_listUpdsts Get Credential Info ListC

Get registerd AWS credential information list for all profiles.

This tool retrieves the all AWS credentials in the cred_file.

Inputs: cred_file. Returns: result

updsts_update_sts_credentialUpdsts Update Sts CredentialB

Get and update AWS credentials for the specified profile using TOTP token.

This tool obtains temporary STS credentials using MFA authentication and updates the AWS credentials file with the new session token and keys.

Inputs: totp_token (required), profile_name (required), duration, cred_file, +1 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools are largely distinct: one updates STS credentials, one gets info for a single profile, and one lists info for all profiles. The get_credential_info vs get_credential_info_list pair could be momentarily confused, but the singular/plural distinction is clear enough.

    Naming Consistency4/5

    All names share the updsts_ prefix and follow a verb_noun snake_case pattern (update_sts_credential, get_credential_info, get_credential_info_list). Minor redundancy in the prefix and the trailing _list is a slight deviation, but overall predictable.

    Tool Count4/5

    Three tools is a focused, well-scoped set for a narrow STS credential task (get single, get all, update). It is slightly thin, but each tool earns its place with no obvious padding.

    Completeness4/5

    The set covers the core lifecycle of viewing credential info and refreshing/updating STS credentials. A delete or explicit refresh/validation operation is absent, but agents can work around this for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects AI assistants to AWS infrastructure through AWS IAM Identity Center for secure, natural language management of cloud resources across multiple accounts. It enables users to execute AWS CLI commands, monitor resources, and run remote shell commands on EC2 instances via Systems Manager.
      446 npm
      15
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides a comprehensive suite of tools for interacting with AWS services like S3, EC2, and Lambda using natural language commands. It enables AI assistants to inspect, manage, and operate AWS resources directly through the Model Context Protocol using your local credentials.
      46 npm
      1
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to analyze AWS cloud costs, audit for waste, monitor budgets, and generate FinOps reports using natural language across multiple AWS profiles and regions, while keeping credentials on the local machine.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to analyze AWS cloud costs, audit for waste, monitor budgets, and query multiple profiles and regions using natural language while keeping credentials local.
      -