Skip to content

Commit 074471d

Browse files
feat: Add hosting to firebase_init MCP tool
Adds hosting to the firebase_init MCP tool. It lets users configure the siteId, public directory, and whether to configure it as a single page app.
1 parent 0576d13 commit 074471d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/mcp/tools/core/init.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,27 @@ export const init = tool(
140140
})
141141
.optional()
142142
.describe("Enable Firebase AI Logic feature for existing app"),
143+
hosting: z
144+
.object({
145+
site: z
146+
.string()
147+
.optional()
148+
.describe("The ID of the hosting site to configure."),
149+
public: z
150+
.string()
151+
.optional()
152+
.default("public")
153+
.describe("The directory to use as the public root."),
154+
spa: z
155+
.boolean()
156+
.optional()
157+
.default(false)
158+
.describe("Configure as a single-page app."),
159+
})
160+
.optional()
161+
.describe(
162+
"Provide this object to initialize Firebase Hosting in this project directory.",
163+
),
143164
}),
144165
}),
145166
annotations: {
@@ -219,6 +240,14 @@ export const init = tool(
219240
displayName: appData.displayName,
220241
};
221242
}
243+
if (features.hosting) {
244+
featuresList.push("hosting");
245+
featureInfo.hosting = {
246+
newSiteId: features.hosting.site,
247+
public: features.hosting.public,
248+
spa: features.hosting.spa,
249+
};
250+
}
222251
const setup: Setup = {
223252
config: config?.src,
224253
rcfile: rc?.data,

0 commit comments

Comments
 (0)