Skip to main content
Glama
firstorderai

Authenticator App MCP Server

by firstorderai

get_password

Retrieve stored passwords for specific usernames on websites to facilitate automated logins. Input website domain and username to securely access credentials.

Instructions

Retrieve the password for a username when logging into a website.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe username or email of the account you need to login, e.g. "john.doe@example.com"
websiteYesThe domain name of the website you need to login, e.g. "github.com"

Implementation Reference

  • src/mcp.ts:51-75 (registration)
    Registers the 'get_password' MCP tool with name, description, Zod input schema, and handler function that delegates to Authenticator.getPassword and formats the response.
    this.tool(
      'get_password',
      'Retrieve the password for a username when logging into a website.',
      {
        website: z
          .string()
          .describe('The domain name of the website you need to login, e.g. "github.com"'),
        username: z
          .string()
          .describe(
            'The username or email of the account you need to login, e.g. "john.doe@example.com"'
          ),
      },
      async ({ website, username }, extra) => {
        const res = await this.authenticator.getPassword(website, username);
        return {
          content: [
            {
              type: 'text',
              text: `The password is ${res.password}.`,
            },
          ],
        };
      }
    );
  • Core handler function in Authenticator class that performs HTTP GET request to the backend API endpoint '/password' to retrieve the password for given website and username.
    async getPassword(website: string, username: string): Promise<GetPasswordResponse> {
      const url = `${this.baseUrl}/password?website=${encodeURIComponent(website)}&username=${encodeURIComponent(username)}`;
      const response = await fetch(url, {
        headers: {
          Authorization: `Bearer ${this.accessToken}`,
        },
      });
    
      if (!response.ok) {
        const errorBody = await response.text();
        console.error(`HTTP error ${response.status} from ${url}: ${errorBody}`);
        throw new Error(`HTTP error ${response.status}: ${errorBody}`);
      }
      return (await response.json()) as GetPasswordResponse;
    }
  • TypeScript interface defining the response structure from the password retrieval API.
    export interface GetPasswordResponse {
      password: string;
    }
  • Zod schema defining the input parameters for the 'get_password' tool: website and username.
    {
      website: z
        .string()
        .describe('The domain name of the website you need to login, e.g. "github.com"'),
      username: z
        .string()
        .describe(
          'The username or email of the account you need to login, e.g. "john.doe@example.com"'
        ),
    },

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

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/firstorderai/authenticator_mcp'

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