📌 Read this first: the main track has switched to Supabase
On the main workshop track, "realtime database" has switched to Supabase, corresponding to
skills/06-supabase。 For projects that need "multiple people writing at the same time" (word clouds, online battles, realtime leaderboards),please use that pack。Four reasons to switch to Supabase:
- Setup is simpler — creating a project, creating tables, and setting permissions are all done on the same web page
- The Dashboard looks like Excel — teachers can understand it as soon as they open it, with no need to build a separate admin backend
- Officially hosted MCP, just log in with a browser — it uses OAuth, so there is no need to apply for, store, or paste a Personal Access Token
- The official documentation directly lists OpenCode as supported — you can copy the configuration examples directly, with no need to guess the format yourself
Firebase is kept as an alternative, and has not been eliminated: teachers already using Firebase do not need to migrate, and those who want to compare the two can also follow this pack. It is just that itis not in the workshop flow, and the content is still the v1 version and has not been re-verified for v2.
👉 For the main workshop track, see:
skills/06-supabase/SKILL.md
What will this quick guide do for you?
Let OpenCode manage Firebase:
- Install Firebase CLI
- Log in with a Google account
- Create or select a Firebase project
- Write the opencode.json MCP configuration
- Verify CRUD
Prerequisites
- Node.js 18+ is installed
- A Google account is available
Ask OpenCode to perform the following steps for me
Step 1: Install Firebase CLI
npm install -g firebase-tools
Check the version:
firebase --version
Step 2: Log in to Firebase
firebase login
The browser will open the Google login page.
After logging in, check the available projects:
firebase projects:list
Step 3: Initialize the Firebase project
Run this in the project directory:
firebase init
Select the services you need (Firestore, Hosting, etc.).
Step 4: Write the OpenCode MCP configuration
Edit ~/.config/opencode/opencode.json, and add:
{
"mcp": {
"firebase": {
"type": "local",
"command": ["npx", "-y", "firebase-tools@latest", "mcp"],
"enabled": true
}
}
}
Step 5: Verify the connection
Reopen OpenCode, then ask it:
請列出我的 Firebase 專案。
Completion report format
## Firebase 連接完成
- firebase-tools 版本:xxx
- 登入狀態:成功 / 失敗
- 可用專案:xxx 個
- MCP 設定:已寫入 opencode.json
- 工具測試:成功 / 失敗
FAQ
| Problem | Solution |
|---|---|
firebase login The browser does not open |
Run it manually, or check the firewall |
| opencode.json path is wrong | Confirm that ~/.config/opencode/opencode.json exists |