# Firebase MCP for your local emulators

> firenook mcp gives Claude Code, Cursor and other coding agents 54 tools over the Firebase emulators on your machine: logs, function calls, rules and data.

`firenook mcp` gives your coding agent 54 tools over the Firebase emulators on your machine: the log, every function call with its error, why the rules denied a request, and your data. Not production.

`npx firenook mcp add`

[Connect your agent](https://firenook.dev/docs/tools/mcp)

1. You

   The Stripe webhook answers 500 on my machine. Why?

2. **functions_list_calls** outcome: "failed"

   - failed

     500 stripeWebhook http POST /, 1.15 ms at 13:06:19

3. **functions_get_call** id: "e72ca3-25"

   - error

     Error: No signatures found matching the expected signature for payload

   - at

     functions/index.js:24:11

   - headers

     host, connection, content-type, accept, accept-language, sec-fetch-mode, user-agent, accept-encoding, content-length

   - body

     {"type":"checkout.session.completed"}

4. **rules_evaluate** service: "storage", method: "create", path: "products/mug.svg"

   - verdict

     deny as unauthenticated

   - line 9

     allow read, write: if false;

The question is an example. The tool calls and their answers are from a run of the demo project on firenook 0.2.0, as Firenook gave them.

## What your agent can do

The 54 tools cover every service Firenook runs, so an agent can reproduce a bug, find the failing call and check its fix without leaving the emulators.

- ### The log and function calls 7

  Search every emulator’s log and each function’s output. List, call and replay functions, and read a failed call’s request, answer, error and stack.

  `functions_list` `functions_invoke` `functions_list_calls` `functions_get_call` `functions_replay_call` `logs_search` `logs_facets`

- ### Security Rules 3

  Read the rules in force, ask whether a request would be allowed, and list recent denials with the lines that decided them.

  `rules_get` `rules_evaluate` `rules_list_denials`

- ### Firestore 6

  Read, query, count, write and delete documents, and list collections, in any database of the project.

  `firestore_get` `firestore_query` `firestore_count` `firestore_set` `firestore_delete` `firestore_list_collections`

- ### Authentication 13

  Find, create and disable users, set their claims, mint an ID token to call a function as them, and read the codes and links Auth would have sent.

  `auth_list_users` `auth_get_user` `auth_create_user` `auth_delete_user` `auth_oob_codes` `auth_verification_codes` `auth_mint_token` `auth_set_claims` `auth_remove_claims` `auth_disable_user` `auth_enable_user` `auth_revoke_tokens` `auth_list_tenants`

- ### Cloud Storage 7

  List, read, upload, copy, move and delete files, and read their metadata.

  `storage_list` `storage_get_metadata` `storage_read` `storage_upload` `storage_delete` `storage_copy` `storage_move`

- ### Pub/Sub and schedules 6

  Publish a message, list topics and subscriptions, peek at a backlog without taking it, and run a scheduled function now.

  `pubsub_publish` `pubsub_list_topics` `pubsub_list_subscriptions` `pubsub_peek` `schedules_list` `schedules_run`

- ### Tasks, Eventarc and Extensions 9

  See and run queued tasks, publish and replay custom events, and reload an extension after changing its parameters.

  `tasks_stats` `tasks_list` `tasks_run` `eventarc_publish` `eventarc_list_events` `eventarc_get_event` `eventarc_replay_event` `extensions_list` `extensions_reload`

- ### The suite 3

  What is running and where, an export of its data, and a reset of the services you name.

  `firenook_status` `emulators_export` `emulators_clear`

From `tools/list` of 0.2.0. [Every tool with its parameters](https://firenook.dev/docs/reference/mcp-tools).

## One command sets it up

Run it in your project. It finds Claude Code, Cursor and VS Code and gives each one the server in the project’s own files.

Other servers in those files stay as they are, and a second run changes nothing. Commit the files, and everyone on your team gets the server with the repository. `--dry-run` shows what it would write.

`npx firenook mcp add`

.mcp.json, .cursor/mcp.json Claude Code, Cursor

```
{
  "mcpServers": {
    "firenook": {
      "command": "npx",
      "args": ["firenook", "mcp"]
    }
  }
}
```

.vscode/mcp.json VS Code

```
{
  "servers": {
    "firenook": {
      "type": "stdio",
      "command": "npx",
      "args": ["firenook", "mcp"]
    }
  }
}
```

## Local by design

An agent with the emulator can try things production would never let it try, and nothing it does leaves your machine.

- ### On your machine

  The server talks to your agent over stdio and to the emulators on this machine. It finds the running suite again on every call, so it can start before the emulators do.

- ### Never your real project

  Every tool works on the emulators. A demo- project never reaches Google, and the users the agent creates have made-up credentials, never real ones.

- ### Clear about what it changes

  Tools that change data say so in their names, and storage_delete and emulators_clear start their descriptions with DESTRUCTIVE, so an agent can tell before it calls them.

## Questions

The rest is in [the MCP guide](https://firenook.dev/docs/tools/mcp). Something else? [Ask on GitHub](https://github.com/firenook-dev/firenook/issues).

Which agents does it work with?

Any agent that runs MCP servers over stdio. firenook mcp add writes the project files for Claude Code, Cursor and VS Code; for others, such as Codex, it prints the line to add: codex mcp add firenook -- npx firenook mcp.

Do the emulators have to be running?

Yes: the tools work on the running suite. Start it as usual with npx firenook emulators:start. The server looks for it on every call, so you can start the emulators after the agent.

Can the agent change my data?

Yes, in the emulators: it can write documents, create users and upload files, which is how it reproduces a bug. Nothing reaches your Firebase project. Export first with npx firenook emulators:export if you want a copy.

Can I give it fewer tools?

Yes. firenook mcp --only firestore,auth serves only those groups of tools.

Does it need a project folder?

No. Started outside a project, it uses the one suite running on this machine, and asks you to choose with --project when there are two.

Which MCP versions does it speak?

Protocol 2025-06-18, and clients on 2025-03-26 or 2024-11-05 are accepted. It has no dependencies of its own.

## Give your agent the emulator

Install Firenook in your project, start the emulators, and add the server. Then ask your agent why something fails.

`npx firenook mcp add`

[Read the MCP guide](https://firenook.dev/docs/tools/mcp) [Why we built it](https://firenook.dev/blog/give-your-agent-the-emulator)
