Connect an AI agent to FireCMS Cloud (MCP server)
FireCMS Cloud runs an MCP server, so AI assistants like Claude, Claude Code or Cursor can work on your project directly: browse and edit data, create and change collections, infer schemas from the documents already in your Firestore, and manage users.
There is one address for everyone:
https://api.firecms.co/mcpAdd it to your client and sign in to FireCMS Cloud in the browser. Nothing to install. The agent acts with your own account, so it can never do anything you could not do yourself in FireCMS Cloud.
Before you start
Section titled “Before you start”- An MCP-capable client: Claude (claude.ai or Claude Desktop), Claude Code, Cursor, or any other client that speaks the Model Context Protocol.
- A FireCMS Cloud account. Reading is available to any project member; creating or
changing collections, data and users requires the
adminrole on the project.
Add the FireCMS MCP server
Section titled “Add the FireCMS MCP server”In Claude (claude.ai or Claude Desktop), open Settings → Connectors, choose
Add custom connector, name it FireCMS and paste:
https://api.firecms.co/mcpIn Claude Code, run this in your terminal, then run /mcp inside Claude Code and
choose Authenticate:
claude mcp add --transport http firecms https://api.firecms.co/mcpIn Cursor, or any other client that takes remote servers by URL, add this to its MCP
configuration (.cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project):
{ "mcpServers": { "firecms": { "url": "https://api.firecms.co/mcp" } }}Sign in
Section titled “Sign in”The first time your client connects, it opens FireCMS Cloud in your browser. Sign in if you are not already, check which app is asking and where it will send you back, and approve. Your client stays signed in from then on.
To disconnect, remove the connector from your client.
Try it
Section titled “Try it”Ask the agent something like:
List my FireCMS projectsList the collections in my FireCMS project <your-project-id>Add a "featured" boolean property to the products collection, shown after the titleBringing an existing Firebase project into FireCMS
Section titled “Bringing an existing Firebase project into FireCMS”Connecting a project creates a service account in your Google Cloud project, which takes your own Google Cloud permissions. The hosted server never holds those, so this one step happens in FireCMS Cloud:
- Ask the agent to connect your project.
connect_project_to_firecmsanswers with a link to app.firecms.co/new. - Pick the project there and follow the steps. It takes about a minute.
- Back in your client,
setup_all_collectionsinfers every root collection from the data already there.
Step 3 is where an existing project becomes a working CMS: FireCMS samples the documents at each root collection, infers the property types, and picks display names, a singular name, an icon and a navigation group.
If you would rather have the agent do the whole connection itself, including enabling APIs and creating the Firestore database, run the server locally: it signs in with your Google account, so it can.
Building collections from existing data
Section titled “Building collections from existing data”| Tool | Description |
|---|---|
get_root_collections |
List the Firestore root collections of a project (read live) |
list_subcollections |
List the subcollections of a document, to explore nested data |
list_databases |
List Firestore databases (only needed beyond (default)) |
preview_inferred_schema |
Infer a schema from sampled documents without saving |
infer_collections_from_data 🔒 |
Infer and save collections for chosen paths |
setup_all_collections 🔒 |
Infer and save every unmapped root collection |
preview_inferred_schema is the non-destructive option: it samples up to 200 documents,
infers types, enums and validation, and hands back a draft you can edit and then persist
with save_collection_schema. It also works for subcollections and any path the bulk
tools skip.
infer_collections_from_data and setup_all_collections write the result straight into
the project. Both skip paths that already map to a collection, so they are safe to re-run
as your database grows. They also refuse paths with no documents — with nothing to sample,
a model would invent a schema from the path name alone.
Available tools
Section titled “Available tools”Tools marked 🔒 require the admin role on the project. Tools marked 💻 are only offered by the
local server.
Every tool tells your client whether it only reads or changes something, and whether a change can overwrite or delete, so clients that ask before writing know when to ask.
Account
Section titled “Account”| Tool | Description |
|---|---|
firecms_get_current_user |
Show the current user |
firecms_login 💻 |
Sign in via browser (Google OAuth) |
firecms_logout 💻 |
Sign out |
Onboarding
Section titled “Onboarding”| Tool | Description |
|---|---|
connect_project_to_firecms |
Connect an existing Firebase project. Hosted: returns the link to do it in FireCMS Cloud. Local: connects it, and applies the security rules it needs |
list_firebase_projects 💻 |
Google Cloud projects you can access, with FireCMS readiness flags |
get_project_setup_status 💻 |
Detailed readiness of one project |
list_firestore_locations 💻 |
Locations available for a new Firestore database |
enable_project_apis 💻 |
Enable the Google Cloud APIs FireCMS requires |
enable_firestore 💻 |
Create the default Firestore database (the location is permanent) |
apply_firestore_security_rules 🔒 |
Add FireCMS’s access rule to Firestore and Storage (idempotent) |
create_firecms_webapp 🔒 |
Retry web app creation if it failed during connect |
Projects and configuration
Section titled “Projects and configuration”| Tool | Description |
|---|---|
list_projects |
List your FireCMS Cloud projects |
get_project_config 🔒 |
Get the full project config (name, colors, plan, features) |
update_project_name 🔒 |
Rename a project |
update_project_colors 🔒 |
Update the primary and secondary brand colors |
update_default_locale 🔒 |
Change the default locale |
toggle_text_search 🔒 |
Enable or disable local text search |
toggle_entity_history 🔒 |
Enable or disable entity history tracking |
| Tool | Description |
|---|---|
list_users 🔒 |
List project users and their roles |
add_user 🔒 |
Invite a user |
update_user_roles 🔒 |
Change a user’s roles |
remove_user 🔒 |
Remove a user |
Collection schemas
Section titled “Collection schemas”| Tool | Description |
|---|---|
list_collection_schemas 🔒 |
List all persisted collection schemas |
get_collection_schema 🔒 |
Get the full schema of a collection |
save_collection_schema 🔒 |
Create or replace a collection schema |
update_collection_schema 🔒 |
Partially update a collection schema |
delete_collection_schema 🔒 |
Delete a collection schema (the data is untouched) |
save_property 🔒 |
Add or update a single property in a collection |
delete_property 🔒 |
Remove a property from a collection schema |
generate_collection |
AI-generate a collection schema from a prompt |
modify_collection |
AI-modify an existing schema from a prompt |
Documents
Section titled “Documents”| Tool | Description |
|---|---|
list_documents |
Query documents (filters, ordering, pagination) |
get_document |
Get a document by path |
create_document |
Create a new document |
update_document |
Partially update a document |
delete_document |
Delete a document |
count_documents |
Count the documents in a collection |
export_collection |
Export collection data as JSON |
import_documents 🔒 |
Bulk import documents (max 500 per call) |
Resources
Section titled “Resources”Clients that support MCP resources can also read these directly:
| URI | Description |
|---|---|
firecms://projects/{id}/collections |
Firestore root-level collections |
firecms://projects/{id}/users |
Project users and roles |
firecms://projects/{id}/schemas |
All collection schemas (full config tree) |
firecms://projects/{id}/config |
Project configuration snapshot |
Run the server locally
Section titled “Run the server locally”The same server is published as @firecms/mcp-server
and can run on your machine over stdio. It needs Node.js 18 or later. Locally it signs in
with your Google account instead of through FireCMS Cloud, which is what lets it also enable
APIs, create Firestore databases and connect projects end to end.
In Claude Code:
claude mcp add firecms -- npx -y @firecms/mcp-serverFor Claude Desktop, Cursor or any other MCP client, add this to the client’s MCP
configuration file (claude_desktop_config.json for Claude Desktop):
{ "mcpServers": { "firecms": { "command": "npx", "args": ["-y", "@firecms/mcp-server"] } }}Then restart your client and ask the agent to run the firecms_login tool. It opens a
browser for Google sign-in and stores the credentials in ~/.firecms/tokens.json, the same
file the FireCMS CLI uses. You only do this
once. Use firecms_logout to sign out.
With the local server, connecting a project is all done from the agent:
list_firebase_projects— see which projects you can connect, and what they still needget_project_setup_status— check one project in detail (optional)enable_project_apis— only ifapisEnabledis falseenable_firestore— only iffirestoreEnabledis false (the location is permanent)connect_project_to_firecms— service account, admin user, and the security rulessetup_all_collections— infer every root collection from the data already there
Permissions and security
Section titled “Permissions and security”- Authentication: the hosted server uses OAuth. You approve each client in FireCMS Cloud,
and it receives a token for your account only. The local server uses Google OAuth in your
browser, the same flow as
firecms loginin the CLI. - Authorization is checked per project: every write enforces the
adminrole. - The hosted server holds no Google Cloud credentials. It can do what you can do in FireCMS Cloud, never what you can do on Google Cloud.
- Tokens: the hosted server stores its tokens only as hashes; access tokens last an hour
and refresh tokens are replaced on every use. The local server keeps its tokens in
~/.firecms/tokens.json, shared with the CLI. - Credentials never reach the model:
list_projectsstrips each project’s service account from its output.
Troubleshooting
Section titled “Troubleshooting”The client cannot connect, or keeps asking to sign in. Remove the connector and add it
again with https://api.firecms.co/mcp, then approve the request in the browser window it opens.
The tools do not show up after editing a config file. MCP clients read their configuration at startup — restart the client completely.
A write fails with a permissions error. The account you signed in with needs the admin
role on that project. Check it in the project’s Users section in
FireCMS Cloud, or ask an admin to grant it.
Collections do not appear after connecting a project. Make sure Firebase Authentication
is enabled and the security rules were applied (apply_firestore_security_rules), then run
setup_all_collections.
The local server says it is not logged in. Run the firecms_login tool. If the browser
window never opens, run npx @firecms/mcp-server --help in a terminal to confirm the package
installs and starts.
