Skip to main content
Glama
firstorderai

Authenticator App MCP Server

by firstorderai

get_account_list

Retrieve accounts available for login on a specific website. Input the domain name to access associated login credentials securely via the Authenticator App MCP Server.

Instructions

Retrieve the accounts can be used when logging into a website.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
websiteYesThe domain name of the website you need to login, e.g. "github.com"

Implementation Reference

  • Core handler function that performs the HTTP request to retrieve the list of accounts for a given website from the backend API.
    async getAccountList(website: string): Promise<GetAccountListResponse> {
      const url = `${this.baseUrl}/account_list?website=${encodeURIComponent(website)}`;
      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}`);
      }
      // Assuming the backend returns a string array directly
      const accounts = (await response.json()) as string[];
      return { accounts };
    }
  • src/mcp.ts:76-95 (registration)
    MCP tool registration for 'get_account_list', including Zod input schema, description, and handler function that delegates to Authenticator.
    this.tool(
      'get_account_list',
      'Retrieve the accounts can be used when logging into a website.',
      {
        website: z
          .string()
          .describe('The domain name of the website you need to login, e.g. "github.com"'),
      },
      async ({ website }, extra) => {
        const res = await this.authenticator.getAccountList(website);
        return {
          content: [
            {
              type: 'text',
              text: `The accounts are: ${res.accounts.join(', ')}.`,
            },
          ],
        };
      }
    );
  • TypeScript interface defining the response structure for getAccountList.
    export interface GetAccountListResponse {
      accounts: string[];
    }
  • TypeScript interface defining the input parameters for getAccountList (matches the Zod schema).
    interface GetAccountListParams {
      website: string;
    }
  • MCP tool handler lambda that formats the response from authenticator.getAccountList.
    async ({ website }, extra) => {
      const res = await this.authenticator.getAccountList(website);
      return {
        content: [
          {
            type: 'text',
            text: `The accounts are: ${res.accounts.join(', ')}.`,
          },
        ],
      };
    }
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