Skip to main content
Glama
gitCarrot

AWS Cognito MCP Server

by gitCarrot

sign_out

Sign out users from AWS Cognito to terminate active sessions and revoke authentication tokens, ensuring secure session management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that retrieves the current Cognito user, signs them out using cognitoUser.signOut(), and returns appropriate success or no-user messages.
    async ({ }) => { const cognitoUser = userPool.getCurrentUser(); if (cognitoUser) { const username = cognitoUser.getUsername(); cognitoUser.signOut(); return { content: [ { type: "text" as const, text: "Signed out successfully", }, { type: "text" as const, text: `Username: ${username}`, }, { type: "text" as const, text: `Time: ${new Date().toISOString()}`, }, { type: "text" as const, text: "All tokens have been invalidated", } ] }; } else { return { content: [ { type: "text" as const, text: "No user was signed in", } ] }; } }
  • Empty input schema for the 'sign_out' tool, indicating no parameters required.
    { },
  • index.ts:119-159 (registration)
    Registration of the 'sign_out' tool via server.tool() call, including empty schema and inline handler.
    server.tool( "sign_out", { }, async ({ }) => { const cognitoUser = userPool.getCurrentUser(); if (cognitoUser) { const username = cognitoUser.getUsername(); cognitoUser.signOut(); return { content: [ { type: "text" as const, text: "Signed out successfully", }, { type: "text" as const, text: `Username: ${username}`, }, { type: "text" as const, text: `Time: ${new Date().toISOString()}`, }, { type: "text" as const, text: "All tokens have been invalidated", } ] }; } else { return { content: [ { type: "text" as const, text: "No user was signed in", } ] }; } } )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gitCarrot/mcp-server-aws-cognito'

If you have feedback or need assistance with the MCP directory API, please join our Discord server