Get the FREE Ultimate OpenClaw Setup Guide →

mcp -aws-cognito

MCP server from gitCarrot/mcp-server-aws-cognito

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gitcarrot-mcp-server-aws-cognito node build/index.js \
  --env AWS_COGNITO_USER_POOL_ID="your-user-pool-id" \
  --env AWS_COGNITO_USER_POOL_CLIENT_ID="your-app-client-id"

How to use

This MCP server bridges AWS Cognito with MCP tooling, providing a suite of authentication and user-management capabilities. It exposes tools such as sign_up, sign_in, sign_out, getCurrentUser, reset_password_send_code, reset_password_veryify_code, change_password, refresh_session, update_user_attributes, delete_user, resend_confirmation_code, and verify_software_token. These tools enable typical authentication flows (sign-up with confirmation, sign-in, MFA verification, password resets, and profile updates) as MCP actions that can be invoked by Claude or other MCP clients. When running, the server uses AWS Cognito to manage user data and authentication tokens, ensuring that only valid Cognito users interact with your application.

To use the tools, connect your MCP client (such as Claude Desktop or Claude Code) to this MCP server. Provide the required parameters for each tool (for example, sign_up requires email and password; update_user_attributes expects an attributes array). The Inspector will provide a URL for debugging tools in your browser, assisting with testing and troubleshooting during development and integration.

How to install

Prerequisites:

  • An AWS account with a configured Cognito User Pool
  • Node.js 18 or higher
  • Git for cloning the repository

Installation steps:

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

  2. Navigate to the project directory: cd mcp-server-aws-cognito

  3. Install dependencies: npm install

  4. Build the server: npm run build

  5. Create or update the environment variables for Cognito (example in a .env file): AWS_COGNITO_USER_POOL_ID=your-user-pool-id AWS_COGNITO_USER_POOL_CLIENT_ID=your-app-client-id

  6. Run the server (example using Node): node build/index.js

Optional for development hot-reload: npm run watch

Additional notes

Environment variable tips:

  • Make sure AWS credentials with appropriate Cognito permissions are configured in your environment if the server relies on IAM roles.
  • If you encounter issues connecting, verify that AWS_COGNITO_USER_POOL_ID and AWS_COGNITO_USER_POOL_CLIENT_ID are correct and that the Cognito User Pool is available.

Common issues:

  • Invalid client ID or user pool ID leads to authentication errors from Cognito.
  • Network or IAM permission problems can cause token fetch failures; ensure proper AWS region configuration if required by your setup.

Configuration options:

  • Use a .env file in development to load AWS_COGNITO_* values.
  • In production, pass environment variables through your hosting platform or container orchestrator as appropriate.

Related MCP Servers

Sponsor this space

Reach thousands of developers