MCP server for running AWS code and managing AWS profiles/credentials
This server exhibits significant quality gaps across naming, descriptions, and parameter documentation. While schemas are present, they lack proper description depth and validation guidance. The most critical issues are: (1) two tool names use generic verbs ('run' and 'list') that don't clearly signal intent to LLMs, (2) parameter descriptions are minimal or missing actionable constraints, (3) no output schemas are documented, (4) the run-aws-code tool accepts arbitrary code execution which creates security and composition concerns, (5) error handling provides no recovery guidance. The codebase shows basic MCP integration but falls short of production-grade agent tool standards.
List all AWS credentials/configs/profiles that are configured/usable on this machine
Run AWS code
Selects AWS profile to use for subsequent interactions. If needed, does SSO authentication
Tool 'run-aws-code' accepts arbitrary code strings as input, violating the single-responsibility principle and composition pattern. This tool conflates three concerns: (1) code execution/evaluation, (2) AWS API composition, (3) data transformation. Agents cannot reuse or chain code across calls, and LLMs cannot reason about what code will do before executing it.
Tool description for 'run-aws-code' is only 12 characters ('Run AWS code'), far below the 20-character hard floor. Per hard scoring rules, description score MUST be 0. The detailed constraints are buried in the 'code' parameter description instead of the tool's top-level summary. LLMs rely on tool descriptions to decide whether to call a tool, this one provides no actionable summary.
No output schemas are documented for any of the three tools. The 'run-aws-code' tool's return type is described only in embedded prose ('returns string, number, boolean or JSON object'), not as a formal schema. LLMs cannot plan downstream calls or extract structured data without knowing the response shape. This violates the pattern:response-shaper requirement and adds 20-30% more tokens to agent planning (LLM must infer structure by trial).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 37 | - | v1 |
Parameter descriptions are minimal or missing for critical inputs. Example: 'profileName' and 'region' in 'run-aws-code' have descriptions ('Name of the AWS profile to use', 'Region to use') but no validation constraints (valid values, format, default behavior if omitted). The 'profile' parameter in 'select-profile' has NO description at all.
Error handling provides no recovery guidance. When run-aws-code fails (invalid profile, syntax error, AWS API error), the error message is a raw JavaScript/VM error or the result of the code execution. The pattern:recovery-guide requires: 'Error responses must tell the LLM what to do next.' Current implementation returns error text but does not classify errors as retryable/user-fixable/fatal, nor does it suggest next steps (e.g., 'Profile not found. Try list-credentials to see available options.').
Naming convention inconsistency. Tools use kebab-case ('run-aws-code', 'list-credentials', 'select-profile') in registration, but most MCP ecosystems standardize on snake_case or camelCase for interoperability with agent frameworks. This causes parsing issues in some LLM tool-calling implementations.
Arbitrary code execution without input validation or sandboxing beyond VM context isolation. The 'run-aws-code' tool executes user-provided JavaScript directly via vm.runInContext(). While the context is restricted to AWS SDK, the tool provides no guards against: (a) infinite loops / resource exhaustion, (b) timing attacks, (c) exploitation of Node.js globals accessible via prototype chains. This is a security / reliability concern for production systems.
Credentials are stored in module-scoped variables (selectedProfile, selectedProfileCredentials, selectedProfileRegion) without any session isolation or request scoping. In a multi-user or concurrent-request environment, agent A's profile selection affects agent B's subsequent calls. MCP should be stateless per request; this implementation violates that.