Skip to content

Commit 2263d68

Browse files
authored
[MCP] Require project root (#8606)
1 parent 789ba4f commit 2263d68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mcp/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ export class FirebaseMcpServer {
185185

186186
const projectId = await this.getProjectId();
187187
const accountEmail = await this.getAuthenticatedUser();
188+
if (!this.cachedProjectRoot) {
189+
return mcpError("No project root set. Please set the project root before calling tools.");
190+
}
188191
if (tool.mcp._meta?.requiresAuth && !accountEmail) return mcpAuthError();
189192
if (tool.mcp._meta?.requiresProject && !projectId) return NO_PROJECT_ERROR;
190193

0 commit comments

Comments
 (0)