feat(setup): auto-deploy Google Analytics MCP to OpenCode config#100
feat(setup): auto-deploy Google Analytics MCP to OpenCode config#100marcusquinn merged 1 commit intomainfrom
Conversation
Add setup_google_analytics_mcp() function that: - Adds google-analytics-mcp to ~/.config/opencode/opencode.json - Disabled by default (enabled: false) for token efficiency - Shows setup instructions for Google Cloud ADC - Skips if already configured or prerequisites missing (jq, pipx)
|
Caution Review failedThe pull request is closed. WalkthroughA new setup function Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 14 20:26:07 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request automates the configuration of the Google Analytics MCP within the OpenCode environment. It introduces a new function to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new function to setup.sh for automatically configuring the Google Analytics MCP in the OpenCode configuration file. The implementation is clear and follows the existing structure of the script. I have one suggestion to enhance the robustness of the JSON update logic to prevent potential failures if a key is missing.
| if jq '.mcp["google-analytics-mcp"] = { | ||
| "type": "local", | ||
| "command": ["pipx", "run", "analytics-mcp"], | ||
| "environment": { | ||
| "GOOGLE_APPLICATION_CREDENTIALS": "", | ||
| "GOOGLE_PROJECT_ID": "" | ||
| }, | ||
| "enabled": false | ||
| }' "$opencode_config" > "$tmp_config" 2>/dev/null; then |
There was a problem hiding this comment.
The current jq command will fail if the .mcp key does not exist in opencode.json. To make the script more robust, you should ensure that the .mcp object exists before trying to add a property to it. You can use the //= operator in jq to create it if it's missing.
| if jq '.mcp["google-analytics-mcp"] = { | |
| "type": "local", | |
| "command": ["pipx", "run", "analytics-mcp"], | |
| "environment": { | |
| "GOOGLE_APPLICATION_CREDENTIALS": "", | |
| "GOOGLE_PROJECT_ID": "" | |
| }, | |
| "enabled": false | |
| }' "$opencode_config" > "$tmp_config" 2>/dev/null; then | |
| if jq '(.mcp //= {})["google-analytics-mcp"] = { | |
| "type": "local", | |
| "command": ["pipx", "run", "analytics-mcp"], | |
| "environment": { | |
| "GOOGLE_APPLICATION_CREDENTIALS": "", | |
| "GOOGLE_PROJECT_ID": "" | |
| }, | |
| "enabled": false | |
| }' "$opencode_config" > "$tmp_config" 2>/dev/null; then |
🤖 Augment PR SummarySummary: This PR updates the installer to automatically add a Google Analytics MCP entry to the user’s OpenCode configuration. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
Flagged for Human ReviewReason: a managed private repo t005.x subtask chain (t005.3, t005.4, t005.5) all failed with stale state recovery in the last 24h, with their diag tasks also cancelled. t005.1 (the root dependency) has a retry task t1267 which also appears to have issues. The entire AI chat sidebar feature is stalled. Human review needed to determine if the approach needs rethinking or if there's a systemic blocker (e.g., environment issue, missing dependency) preventing these tasks from completing. This issue has been flagged by the AI supervisor for human review. Please assess and take appropriate action. Flagged by AI Supervisor (automated reasoning cycle) |
Flagged for Human ReviewReason: a managed private repo t005.3, t005.4, t005.5, and t004.3 all failed in the last 24h with stale state recovery (eval_process_died / worker_failed_before_eval). Their diagnostic tasks were auto-cancelled. The supervisor self-heal created diag tasks but they were immediately cancelled because parent tasks had already failed. This suggests the stale-state recovery pipeline may be creating diag tasks that can never succeed. The root cause appears to be workers dying during evaluation — worth investigating whether this is a resource/memory issue on the a managed private repo repo workers. This issue has been flagged by the AI supervisor for human review. Please assess and take appropriate action. Flagged by AI Supervisor (automated reasoning cycle) |
Flagged for Human ReviewReason: a managed private repo t004.5 completed with PR #100 but parent task t004 still shows subtasks t004.3 and t005.3-t005.5 failing with stale state recovery. The t005.1 retry (t1267) is queued but t004.3 has no retry task visible. Verify whether t004.3 deliverables were actually merged or if a retry is needed. This issue has been flagged by the AI supervisor for human review. Please assess and take appropriate action. Flagged by AI Supervisor (automated reasoning cycle) |



Summary
Automatically add Google Analytics MCP to OpenCode config during setup.
Changes
setup_google_analytics_mcp()function tosetup.shenabled: false) for token efficiencyHow it works
After running
./setup.sh, users will havegoogle-analytics-mcpin their~/.config/opencode/opencode.json:The MCP is enabled automatically when using the
google-analyticssubagent via SEO, Marketing, or Sales agents.Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.