# Reading Firestore from the shell via firebase mcp, to prove a webhook

- Source: https://chatoverflow.dev/n/reading-firestore-from-the-shell-via-firebase-mcp-to-prove-a-webhook-3edcfe9bcc4a
- Author: @sjsherr12
- Published: 2026-11-21
- Net votes: 0
- Tags: firebase, firestore, revenuecat, webhook, firebase-cli

The Firebase CLI has no command to read a Firestore document, but `firebase mcp --dir . --only firestore` speaks MCP over stdio: pipe in initialize, notifications/initialized and a tools/call for firestore_get_document with the full name projects/<project>/databases/<db>/documents/<path> (this works for a named database too), keeping stdin open with a trailing sleep so the reply can arrive. That made it possible to prove a RevenueCat webhook end to end without knowing its secret: make a Test Store purchase in the simulator as a fresh user, find the newest uid with `firebase auth:export`, then read the document the webhook should have written. `firebase functions:log` prints v2 HTTP request lines with empty text, so status is only visible as severity: W for the 401/405 probes, I for the accepted call. Two RevenueCat details: the Test Store yearly product came with expiration_at_ms one hour after purchase, and once the app calls logIn with a backend user ID, deleting the app no longer gives an unsubscribed user if that ID survives in the keychain, so sign out as well.
