feat(ga-agent): Add GA Agent project with decomposed architecture

Create workspace for building Google Analytics Claude Skill with:
- 5 independent components (MCP setup, skill, dimension explorer, Slack reporter, realtime watcher)
- Comprehensive project plan and documentation
- Step-by-step setup guides for each component

Components:
1. MCP Setup - GA4 + BigQuery MCP server installation
2. GA Agent Skill - Core Claude Skill for interactive analysis
3. Dimension Explorer - Validate dims/metrics with explanations
4. Slack Reporter - Automated reports to Slack (P2)
5. Realtime Watcher - Real-time monitoring (deferred)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-21 10:32:13 +09:00
parent 173d526cf3
commit 214247ace2
11 changed files with 1690 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
# MCP Servers Overview for GA Agent
## Available MCP Servers
### Google Analytics MCP Servers
| Server | Language | Source | Status |
|--------|----------|--------|--------|
| **google-analytics-mcp** (Official) | Python | [googleanalytics/google-analytics-mcp](https://github.com/googleanalytics/google-analytics-mcp) | Recommended |
| mcp-server-google-analytics | TypeScript | [ruchernchong/mcp-server-google-analytics](https://github.com/ruchernchong/mcp-server-google-analytics) | Community |
**Official Google GA MCP Features:**
- Real-time reporting
- Custom/standard dimensions/metrics
- Natural language queries (e.g., "top products by revenue")
- `order_by` support
- OAuth + Service Account auth
### BigQuery MCP Servers
| Server | Language | npm | Status |
|--------|----------|-----|--------|
| **@ergut/mcp-bigquery-server** | Node.js | `npx -y @ergut/mcp-bigquery-server` | Recommended |
| mcp-server-bigquery | Python | - | Alternative |
| Google MCP Toolbox | Python | - | Official (multi-DB) |
**ergut/mcp-bigquery-server Features:**
- Read-only secure access
- Schema discovery
- Natural language to SQL
- 1GB query limit
## Recommended Stack
For our GA Agent, we recommend:
```
┌─────────────────────────────────────────────────────┐
│ Claude Code │
│ │ │
│ ┌───────────┴───────────┐ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Google Analytics│ │ BigQuery │ │
│ │ MCP Server │ │ MCP Server │ │
│ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ GA4 Data API │ │ BigQuery API │ │
│ │ GA4 Admin API │ │ (GA4 Export) │ │
│ └─────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────┘
```
## Why Both?
1. **GA4 MCP** - Direct API access for:
- Real-time data
- Quick metrics queries
- Account/property management
2. **BigQuery MCP** - For advanced analysis:
- Historical data (GA4 → BigQuery export)
- Complex SQL queries
- Cross-dataset joins
- Large-scale analysis
## Prerequisites
### Google Cloud Setup
1. Create a Google Cloud Project (or use existing)
2. Enable these APIs:
- Google Analytics Data API
- Google Analytics Admin API
- BigQuery API
3. Create Service Account:
- Go to IAM & Admin → Service Accounts
- Create new service account
- Grant roles:
- `Analytics Viewer` (or Admin for write ops)
- `BigQuery Data Viewer`
- `BigQuery Job User`
- Download JSON key file
4. Grant GA4 Access:
- In GA4 Admin → Property Access Management
- Add service account email with Viewer role
## Next Steps
See `02-setup-guide.md` for installation instructions.