Skip to main content
Glama
AWS Cognito MCP Server

AWS Cognito MCP Server

by gitCarrot

AWS Cognito MCP Server

A Model Context Protocol (MCP) server implementation that connects to AWS Cognito for authentication and user management. This server provides a set of tools for user authentication flows including sign-up, sign-in, password management, and more.

Prerequisites

  • AWS account with Cognito User Pool configured

  • Node.js 18 or higher

Related MCP server: Remote MCP Server with GitHub OAuth

Installation

# Clone the repository
git clone https://github.com/yourusername/mcp-server-aws-cognito.git

# Install dependencies
cd mcp-server-aws-cognito
npm install

# Build the server
npm run build

AWS Cognito Configuration

  1. Log in to your AWS Console and navigate to Amazon Cognito

  2. Create a User Pool or use an existing one

  3. Note your User Pool ID and App Client ID

  4. Set these values as environment variables or in a .env file (you need .env file only when you use claude code, not claude desktop):

AWS_COGNITO_USER_POOL_ID=your-user-pool-id
AWS_COGNITO_USER_POOL_CLIENT_ID=your-app-client-id

Available Tools

Tool Name

Description

Parameters

sign_up

Register a new user

email: string, password: string

sign_up_confirm_code_from_email

Verify account with confirmation code

username: string, confirmationCode: string

sign_in

Authenticate a user

username: string, password: string

sign_out

Sign out the current user

None

getCurrentUser

Get the current signed-in user

None

reset_password_send_code

Request password reset code

username: string

reset_password_veryify_code

Reset password with verification code

username: string, code: string, newPassword: string

change_password

Change password for signed-in user

oldPassword: string, newPassword: string

refresh_session

Refresh the authentication tokens

None

update_user_attributes

Update user profile attributes

attributes: Array of {name: string, value: string}

delete_user

Delete the current signed-in user

None

resend_confirmation_code

Resend account verification code

username: string

verify_software_token

Verify TOTP for MFA

username: string, totpCode: string

The Inspector will provide a URL to access debugging tools in your browser.

Using with Claude Desktop

Before starting make sure Node.js is installed on your desktop for npx to work.

  1. Go to: Settings > Developer > Edit Config

  2. Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "aws-cognito-mcp-server": {
      "command": "/path/to/mcp-server-aws-cognito/build/index.js",
      "env": {
        "AWS_COGNITO_USER_POOL_ID": "your-user-pool-id",
        "AWS_COGNITO_USER_POOL_CLIENT_ID": "your-app-client-id"
      }
    }
  }
}

Using with Claude Code

Claude Code is a command-line interface for Claude. To use this MCP server with Claude Code:

  1. Install Claude Code by following the instructions at Claude Code Documentation

  2. Add the MCP server to Claude Code:

claude mcp add "aws-cognito-mcp" npx tsx index.ts
  1. Verify it's been added:

claude mcp list
  1. Run Claude with your MCP server:

claude

Development

For development with auto-rebuild:

npm run watch

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. Use the MCP Inspector for better visibility:

npm run inspector

Now you can use the AWS Cognito authentication tools with Claude!

Available Tools

13 tools
change_passwordD

Inputs: oldPassword (required), newPassword (required).

confirm_code_from_email_for_signUpD

Inputs: username (required), confirmationCode (required).

delete_userD

Inputs: no named parameters.

getCurrentUserD

Inputs: no named parameters.

refresh_sessionD

Inputs: no named parameters.

resend_confirmation_codeD

Inputs: username (required).

reset_password_send_codeD

Inputs: username (required).

reset_password_veryify_codeD

Inputs: username (required), code (required), newPassword (required).

sign_inD

Inputs: username (required), password (required).

sign_outD

Inputs: no named parameters.

sign_upD

Inputs: password (required), email (required).

update_user_attributesD

Inputs: attributes (required).

verify_software_tokenD

Inputs: username (required), totpCode (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    D1.9/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific Cognito operations like sign_in, sign_up, change_password, and delete_user. However, reset_password_send_code and reset_password_veryify_code could potentially be confused with resend_confirmation_code or confirm_code_from_email_for_signUp due to overlapping 'code' terminology, though their contexts differ.

    Naming Consistency3/5

    The naming is mostly snake_case with clear verb_noun patterns (e.g., sign_in, delete_user), but there are inconsistencies: getCurrentUser uses camelCase instead of snake_case, and verify_software_token is less descriptive compared to others. This mixed style reduces predictability.

    Tool Count5/5

    With 13 tools, this is well-scoped for an AWS Cognito server, covering essential user management and authentication workflows. Each tool appears to serve a specific function without obvious bloat, making the count appropriate for the domain.

    Completeness4/5

    The tool set provides good coverage of core Cognito operations, including user lifecycle (sign-up, sign-in, update, delete), password management, and session handling. Minor gaps might include admin functions or multi-factor authentication setup, but basic workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers