Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added 'firebase_deploy' and 'firebase_deploy_status' MCP tools.
- Added SSE mode support to `firebase mcp`. To use it, run `firebase mcp --mode=sse --port=3000`, and connect your client on `http://localhost:3000`.
144 changes: 100 additions & 44 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
"@angular-devkit/architect": "^0.1402.2",
"@angular-devkit/core": "^14.2.2",
"@google/events": "^5.1.1",
"@modelcontextprotocol/ext-apps": "^1.3.2",
"@types/archiver": "^6.0.0",
"@types/async-lock": "^1.4.2",
"@types/body-parser": "^1.17.0",
Expand Down
14 changes: 13 additions & 1 deletion src/bin/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Options:
If specified, auto-detection is disabled for other features.
--tools <tools> Comma-separated list of specific tools to enable. Disables
auto-detection entirely.
--mode <mode> Server mode: stdio, sse (defaults to stdio).
--port <port> The port to listen on when running in SSE mode (defaults to 3000).
-h, --help Show this help message.
`;

Expand All @@ -58,6 +60,8 @@ export async function mcp(): Promise<void> {
only: { type: "string", default: "" },
tools: { type: "string", default: "" },
dir: { type: "string" },
mode: { type: "string", default: "stdio" },
port: { type: "string", default: "3000" },
Comment thread
chkuang-g marked this conversation as resolved.
"generate-tool-list": { type: "boolean", default: false },
"generate-prompt-list": { type: "boolean", default: false },
"generate-resource-list": { type: "boolean", default: false },
Expand Down Expand Up @@ -85,6 +89,11 @@ export async function mcp(): Promise<void> {
}
if (earlyExit) return;

if (values.mode !== "stdio" && values.mode !== "sse") {
console.error("Error: --mode must be either 'stdio' or 'sse'");
process.exit(1);
}

setFirebaseMcp(true);
// Write debug logs to ~/.cache/firebase to avoid polluting the user's project directory.
const mcpLogDir = join(homedir(), ".cache", "firebase");
Expand All @@ -103,6 +112,9 @@ export async function mcp(): Promise<void> {
enabledTools,
projectRoot: values.dir ? resolve(values.dir) : undefined,
});
await server.start();
await server.start({
useSSE: values.mode === "sse",
port: values.port ? parseInt(values.port, 10) : undefined,
});
if (process.stdin.isTTY) process.stderr.write(STARTUP_MESSAGE);
}
5 changes: 5 additions & 0 deletions src/experiments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ export const ALL_EXPERIMENTS = experiments({
default: false,
public: true,
},
mcpapps: {
shortDescription: "Enables MCP Apps features",
fullDescription: "Enables MCP Apps features, including returning UI resource URIs.",
public: true,
},
fdcift: {
shortDescription: "Enable instrumentless trial for SQL Connect",
default: true,
Expand Down
Loading
Loading