Skip to main content
Glama
mackenly

MCP Fathom Analytics

by mackenly

get-account

Retrieve Fathom Analytics account details to access site statistics, visitor tracking, and aggregated reports through the MCP server.

Instructions

Get Fathom Analytics account information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get-account' tool. It retrieves the Fathom Analytics account information using the API client and returns a formatted text response, with error handling.
    async () => { try { const accountData = await fathomClient.api.account.get(); return { content: [ { type: "text", text: `Account Information:\n\nName: ${accountData.name}\nEmail: ${accountData.email}\nID: ${accountData.id}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Failed to retrieve account information: ${error instanceof FathomApiError ? `${error.status}: ${error.error}` : String(error)}`, }, ], }; } },
  • Registration of the 'get-account' tool using server.tool(), including description, empty input schema, and inline handler.
    server.tool( "get-account", "Get Fathom Analytics account information", {}, async () => { try { const accountData = await fathomClient.api.account.get(); return { content: [ { type: "text", text: `Account Information:\n\nName: ${accountData.name}\nEmail: ${accountData.email}\nID: ${accountData.id}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Failed to retrieve account information: ${error instanceof FathomApiError ? `${error.status}: ${error.error}` : String(error)}`, }, ], }; } }, );
  • src/index.ts:33-33 (registration)
    Top-level call to registerAccountTool during server setup, passing the MCP server and Fathom API client.
    registerAccountTool(server, fathomClient);

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/mackenly/mcp-fathom-analytics'

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