AWS Cognito MCP 服务器
一个模型上下文协议 (MCP) 服务器实现,用于连接到 AWS Cognito 进行身份验证和用户管理。该服务器提供了一组用于用户身份验证流程的工具,包括注册、登录、密码管理等。
先决条件
- 配置了 Cognito 用户池的 AWS 账户
- Node.js 18 或更高版本
安装
AWS Cognito 配置
- 登录您的 AWS 控制台并导航到 Amazon Cognito
- 创建用户池或使用现有用户池
- 记下您的用户池 ID 和应用程序客户端 ID
- 将这些值设置为环境变量或 .env 文件(仅当您使用 claude 代码而不是 claude 桌面时才需要 .env 文件):
可用工具
工具名称 | 描述 | 参数 |
---|---|---|
sign_up | 注册新用户 | email :字符串, password :字符串 |
sign_up_confirm_code_from_email | 使用确认码验证帐户 | username :字符串, confirmationCode :字符串 |
sign_in | 验证用户身份 | username :字符串, password :字符串 |
sign_out | 退出当前用户 | 没有任何 |
getCurrentUser | 获取当前登录用户 | 没有任何 |
reset_password_send_code | 请求密码重置代码 | username :字符串 |
reset_password_veryify_code | 使用验证码重置密码 | username :字符串, code :字符串, newPassword :字符串 |
change_password | 更改登录用户的密码 | oldPassword :字符串, newPassword :字符串 |
refresh_session | 刷新身份验证令牌 | 没有任何 |
update_user_attributes | 更新用户个人资料属性 | attributes : {name: string, value: string} 数组 |
delete_user | 删除当前登录用户 | 没有任何 |
resend_confirmation_code | 重新发送账户验证码 | username :字符串 |
verify_software_token | 验证 MFA 的 TOTP | username :字符串, totpCode :字符串 |
检查器将提供一个 URL 来访问浏览器中的调试工具。
与 Claude Desktop 一起使用
开始之前,请确保您的桌面上安装了Node.js ,以使npx
能够正常工作。
- 前往:设置 > 开发者 > 编辑配置
- 将以下内容添加到您的
claude_desktop_config.json
中:
与 Claude 代码一起使用
Claude Code 是 Claude 的命令行界面。要将此 MCP 服务器与 Claude Code 配合使用:
- 按照Claude Code 文档中的说明安装 Claude Code
- 将 MCP 服务器添加到 Claude 代码:
- 验证是否已添加:
- 使用您的 MCP 服务器运行 Claude:
发展
对于使用自动重建的开发:
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。使用 MCP 检查器可以更好地了解情况:
现在您可以将 AWS Cognito 身份验证工具与 Claude 一起使用!
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器实现,连接到 AWS Cognito 进行身份验证和用户管理,为用户流程提供工具,包括注册、登录和密码管理。
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server implementation that enables Claude to perform AWS operations on S3 and DynamoDB services through natural language commands.Last updated -2392PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.Last updated -2PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server allowing Claude AI to interact with AWS resources through natural language, enabling users to query and manage AWS services without using the traditional AWS Console or CLI.Last updated -TypeScript
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that provides endpoints for wallet-based authentication, cluster management, and name registration services.Last updated -TypeScript