UNPKG

@aashari/mcp-server-aws-sso

Version:

Node.js/TypeScript MCP server for AWS Single Sign-On (SSO). Enables AI systems (LLMs) with tools to initiate SSO login (device auth flow), list accounts/roles, and securely execute AWS CLI commands using temporary credentials. Streamlines AI interaction w

18 lines (17 loc) 1.03 kB
import { CommandExecutionResult } from '../controllers/aws.sso.exec.types.js'; /** * Execute AWS CLI command with temporary credentials * * Gets temporary credentials for the specified account and role, then executes * the AWS CLI command with those credentials in the environment. * * @param {string} accountId - AWS account ID to get credentials for * @param {string} roleName - AWS role name to assume via SSO * @param {string} commandString - AWS CLI command as a single string * @param {string} [region] - Optional AWS region override * @param {boolean} [forceRefreshCredentials] - Force refresh credentials even if cached * @returns {Promise<CommandExecutionResult>} Command execution result with stdout, stderr, and exit code * @throws {Error} If credentials cannot be obtained or command execution fails */ declare function executeCommand(accountId: string, roleName: string, commandString: string, region?: string, forceRefreshCredentials?: boolean): Promise<CommandExecutionResult>; export { executeCommand };