mcp-server-google-analytics

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides access to Google Analytics 4 (GA4) data, allowing retrieval of page view metrics, active and new user tracking, event analysis, and user behavior metrics (session duration, bounce rate) with customizable dimensions and date ranges.

Google 애널리틱스 MCP 서버

Google Analytics 4(GA4) 데이터에 액세스하기 위한 MCP 서버 구현으로, Model Context Protocol TypeScript SDK를 사용하여 구축되었습니다.

특징

  • 사용자 정의 가능한 차원으로 페이지 뷰 측정 항목을 가져옵니다.
  • 시간 경과에 따른 활성 및 신규 사용자 추적
  • 특정 이벤트와 해당 메트릭을 분석합니다.
  • 사용자 행동 지표(세션 기간, 이탈률) 모니터링
  • 모든 쿼리에 대해 유연한 날짜 범위 선택 가능

필수 조건

  • Node.js 20 이상
  • Google 애널리틱스 4 속성
  • Analytics Data API가 활성화된 Google Cloud 프로젝트
  • 적절한 권한이 있는 서비스 계정 자격 증명

설정

  1. Google Cloud 프로젝트를 만들고 Analytics Data API를 활성화하세요.
  2. 서비스 계정을 생성하고 자격 증명 JSON 파일을 다운로드합니다.
  3. 서비스 계정에 GA4 속성에 대한 적절한 액세스 권한을 부여하세요.
  4. 환경 변수 설정:

지엑스피1

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 Google Analytics Server를 자동으로 설치하는 방법:

npx -y @smithery/cli install mcp-server-google-analytics --client claude

수동 설치

pnpm install mcp-server-google-analytics

용법

서버 시작

pnpm start

Claude Desktop의 구성

Claude Desktop 구성에 다음을 추가하세요.

{ "mcpServers": { "google-analytics": { "command": "npx", "args": ["-y", "mcp-server-google-analytics"], "env": { "GOOGLE_CLIENT_EMAIL": "your-service-account@project.iam.gserviceaccount.com", "GOOGLE_PRIVATE_KEY": "your-private-key", "GA_PROPERTY_ID": "your-ga4-property-id" } } } }

사용 가능한 기능

getPageViews

특정 날짜 범위에 대한 페이지 뷰 측정 항목을 가져옵니다.

{ "startDate": "2024-01-01", "endDate": "2024-01-31", "dimensions": ["page", "country"] // Optional }

getActiveUsers

활성 사용자 지표 가져오기:

{ "startDate": "2024-01-01", "endDate": "2024-01-31" }

이벤트 가져오기

이벤트 메트릭 가져오기:

{ "startDate": "2024-01-01", "endDate": "2024-01-31", "eventName": "purchase" // Optional }

getUserBehavior

사용자 행동 지표 가져오기:

{ "startDate": "2024-01-01", "endDate": "2024-01-31" }

보안 고려 사항

  • 항상 중요한 자격 증명에 환경 변수를 사용하세요
  • 적절한 CORS 설정 구현
  • 서비스 계정 권한을 설정할 때 최소 권한 원칙을 따르세요.
  • 정기적으로 서비스 계정 자격 증명을 순환합니다.
  • API 사용을 모니터링하고 필요한 경우 속도 제한을 구현합니다.

기여하다

기여를 환영합니다! 행동 강령과 풀 리퀘스트 제출 절차에 대한 자세한 내용은 기여 가이드를 참조하세요.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

Google Analytics 4(GA4) 데이터에 액세스하기 위한 MCP 서버 구현으로, Model Context Protocol TypeScript SDK를 사용하여 구축되었습니다.

  1. Features
    1. Prerequisites
      1. Setup
        1. Installation
          1. Installing via Smithery
          2. Manual Installation
        2. Usage
          1. Starting the Server
          2. Configuration in Claude Desktop
        3. Available Functions
          1. getPageViews
          2. getActiveUsers
          3. getEvents
          4. getUserBehavior
        4. Security Considerations
          1. Contributing
            1. License
              ID: tx0ccdzxeh