AC

AWS Cognito

Created 5 months ago

A Model Context Protocol (MCP) server implementation that connects to AWS Cognito for authentication and user management.

development authentication AWS Cognito user management

What is AWS Cognito?

A MCP server that connects to AWS Cognito for authentication and user management.

Documentation

AWS Cognito MCP Server

Prerequisites

  • AWS account with Cognito User Pool configured
  • Node.js 18 or higher

Installation

git clone https://github.com/yourusername/mcp-server-aws-cognito.git\n\n# Install dependencies
cd mcp-server-aws-cognito
npm install\n\n# 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:
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

Using with Claude Desktop

  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

  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

Server Config

{
  "mcpServers": {
    "aws-cognito-server": {
      "command": "npx",
      "args": [
        "aws-cognito"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: No

Project Info

Hosted Featured
Created At: Jul 02, 2025
Updated At: Aug 07, 2025
Author: gitCarrot
Category: community
License: MIT
Tags:
development authentication AWS