Skip to main content
Glama
googleanalytics

Google Analytics MCP Server

Official

get_account_summaries

Retrieve Google Analytics account and property information to view available data sources and manage access permissions.

Instructions

Retrieves information about the user's Google Analytics accounts and properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_account_summaries' tool, decorated with @mcp.tool() which handles both implementation and registration. It asynchronously retrieves all account summaries using the Google Analytics Admin API client and converts them to dictionaries.
    @mcp.tool() async def get_account_summaries() -> List[Dict[str, Any]]: """Retrieves information about the user's Google Analytics accounts and properties.""" # Uses an async list comprehension so the pager returned by # list_account_summaries retrieves all pages. summary_pager = await create_admin_api_client().list_account_summaries() all_pages = [ proto_to_dict(summary_page) async for summary_page in summary_pager ] return all_pages

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/googleanalytics/google-analytics-mcp'

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