firebase-mcp 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -10
- package/dist/cli/index.js +9 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +39 -47
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +46 -37
- package/dist/config/index.js.map +1 -1
- package/dist/firebase/index.d.ts +10 -17
- package/dist/firebase/index.d.ts.map +1 -1
- package/dist/firebase/index.js +29 -30
- package/dist/firebase/index.js.map +1 -1
- package/dist/project/index.d.ts +17 -0
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +38 -0
- package/dist/project/index.js.map +1 -0
- package/dist/server/index.d.ts +11 -19
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +96 -46
- package/dist/server/index.js.map +1 -1
- package/dist/task/index.d.ts +53 -0
- package/dist/task/index.d.ts.map +1 -0
- package/dist/task/index.js +177 -0
- package/dist/task/index.js.map +1 -0
- package/dist/tools/auth/get_user.d.ts +21 -0
- package/dist/tools/auth/get_user.d.ts.map +1 -0
- package/dist/tools/auth/get_user.js +75 -0
- package/dist/tools/auth/get_user.js.map +1 -0
- package/dist/tools/auth/index.d.ts +4 -0
- package/dist/tools/auth/index.d.ts.map +1 -0
- package/dist/tools/auth/index.js +20 -0
- package/dist/tools/auth/index.js.map +1 -0
- package/dist/tools/auth/list_users.d.ts +19 -0
- package/dist/tools/auth/list_users.d.ts.map +1 -0
- package/dist/tools/auth/list_users.js +54 -0
- package/dist/tools/auth/list_users.js.map +1 -0
- package/dist/tools/auth/read.d.ts +15 -0
- package/dist/tools/auth/read.d.ts.map +1 -0
- package/dist/tools/auth/read.js +72 -0
- package/dist/tools/auth/read.js.map +1 -0
- package/dist/tools/config/get_config.d.ts +6 -0
- package/dist/tools/config/get_config.d.ts.map +1 -0
- package/dist/tools/config/get_config.js +31 -0
- package/dist/tools/config/get_config.js.map +1 -0
- package/dist/tools/config/index.d.ts +3 -0
- package/dist/tools/config/index.d.ts.map +1 -0
- package/dist/tools/config/index.js +19 -0
- package/dist/tools/config/index.js.map +1 -0
- package/dist/tools/config/reload_config.d.ts +8 -0
- package/dist/tools/config/reload_config.d.ts.map +1 -0
- package/dist/tools/config/reload_config.js +44 -0
- package/dist/tools/config/reload_config.js.map +1 -0
- package/dist/tools/firestore/aggregate_collection.d.ts +7 -12
- package/dist/tools/firestore/aggregate_collection.d.ts.map +1 -1
- package/dist/tools/firestore/aggregate_collection.js +21 -15
- package/dist/tools/firestore/aggregate_collection.js.map +1 -1
- package/dist/tools/firestore/count_documents.d.ts +7 -12
- package/dist/tools/firestore/count_documents.d.ts.map +1 -1
- package/dist/tools/firestore/count_documents.js +21 -15
- package/dist/tools/firestore/count_documents.js.map +1 -1
- package/dist/tools/firestore/get_collection_schema.d.ts +8 -13
- package/dist/tools/firestore/get_collection_schema.d.ts.map +1 -1
- package/dist/tools/firestore/get_collection_schema.js +23 -19
- package/dist/tools/firestore/get_collection_schema.js.map +1 -1
- package/dist/tools/firestore/get_document.d.ts +10 -17
- package/dist/tools/firestore/get_document.d.ts.map +1 -1
- package/dist/tools/firestore/get_document.js +32 -23
- package/dist/tools/firestore/get_document.js.map +1 -1
- package/dist/tools/firestore/get_many_documents.d.ts +7 -13
- package/dist/tools/firestore/get_many_documents.d.ts.map +1 -1
- package/dist/tools/firestore/get_many_documents.js +25 -26
- package/dist/tools/firestore/get_many_documents.js.map +1 -1
- package/dist/tools/firestore/index.d.ts +1 -0
- package/dist/tools/firestore/index.d.ts.map +1 -1
- package/dist/tools/firestore/index.js +1 -0
- package/dist/tools/firestore/index.js.map +1 -1
- package/dist/tools/firestore/list_collections.d.ts +7 -12
- package/dist/tools/firestore/list_collections.d.ts.map +1 -1
- package/dist/tools/firestore/list_collections.js +25 -22
- package/dist/tools/firestore/list_collections.js.map +1 -1
- package/dist/tools/firestore/list_documents.d.ts +7 -12
- package/dist/tools/firestore/list_documents.d.ts.map +1 -1
- package/dist/tools/firestore/list_documents.js +22 -20
- package/dist/tools/firestore/list_documents.js.map +1 -1
- package/dist/tools/firestore/list_indexes.d.ts +7 -11
- package/dist/tools/firestore/list_indexes.d.ts.map +1 -1
- package/dist/tools/firestore/list_indexes.js +22 -22
- package/dist/tools/firestore/list_indexes.js.map +1 -1
- package/dist/tools/firestore/query_collection.d.ts +7 -13
- package/dist/tools/firestore/query_collection.d.ts.map +1 -1
- package/dist/tools/firestore/query_collection.js +24 -27
- package/dist/tools/firestore/query_collection.js.map +1 -1
- package/dist/tools/firestore/query_collection_group.d.ts +7 -13
- package/dist/tools/firestore/query_collection_group.d.ts.map +1 -1
- package/dist/tools/firestore/query_collection_group.js +24 -24
- package/dist/tools/firestore/query_collection_group.js.map +1 -1
- package/dist/tools/firestore/read.d.ts +65 -0
- package/dist/tools/firestore/read.d.ts.map +1 -0
- package/dist/tools/firestore/read.js +197 -0
- package/dist/tools/firestore/read.js.map +1 -0
- package/dist/tools/firestore/read_collections.d.ts +7 -13
- package/dist/tools/firestore/read_collections.d.ts.map +1 -1
- package/dist/tools/firestore/read_collections.js +27 -33
- package/dist/tools/firestore/read_collections.js.map +1 -1
- package/dist/tools/firestore/types.d.ts +0 -1
- package/dist/tools/firestore/types.d.ts.map +1 -1
- package/dist/tools/firestore/types.js +3 -28
- package/dist/tools/firestore/types.js.map +1 -1
- package/dist/tools/index.d.ts +9 -102
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +77 -66
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/normalize.d.ts +2 -0
- package/dist/tools/normalize.d.ts.map +1 -0
- package/dist/tools/normalize.js +36 -0
- package/dist/tools/normalize.js.map +1 -0
- package/package.json +3 -5
- package/dist/access/index.d.ts +0 -23
- package/dist/access/index.d.ts.map +0 -1
- package/dist/access/index.js +0 -35
- package/dist/access/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# firebase-mcp
|
|
2
2
|
|
|
3
|
-
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that exposes Firebase Firestore to AI agents. Built with
|
|
3
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that exposes Firebase Firestore and Authentication to AI agents. Built with the Firebase Admin SDK, it runs over stdio and is designed to be wired directly into any MCP-compatible host (Cursor, Claude Desktop, etc.).
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **11 Firestore read tools** covering collections, documents, queries, aggregations, and schema inference
|
|
8
|
+
- **2 Firebase Auth tools** — look up users by UID or email, list users with pagination
|
|
8
9
|
- **Glob-based access control** — allow/deny rules evaluated per Firestore path before any read is performed
|
|
9
|
-
- **Pagination** on `query_collection` and `
|
|
10
|
+
- **Pagination** on `query_collection`, `read_collection`, and `list_users` via cursor-based tokens
|
|
10
11
|
- **Batch fetching** with configurable `maxBatchFetchSize`
|
|
11
12
|
- **Schema inference** via `get_collection_schema` — samples documents and infers field types without reading the full collection
|
|
12
|
-
-
|
|
13
|
+
- **Normalized output** — Firestore Timestamps, GeoPoints, and DocumentReferences are converted to JSON-serializable values on all tools
|
|
14
|
+
- Zero runtime state — each tool call hits Firebase directly through the Admin SDK
|
|
13
15
|
|
|
14
16
|
## Tools
|
|
15
17
|
|
|
18
|
+
### Firestore
|
|
19
|
+
|
|
16
20
|
| Tool | Description |
|
|
17
21
|
| ------------------------ | ----------------------------------------------------------------------------------------------------------- |
|
|
18
22
|
| `list_collections` | List root collections or subcollections of a document. Optionally include document counts. |
|
|
@@ -27,11 +31,18 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that ex
|
|
|
27
31
|
| `get_collection_schema` | Sample a collection from both ends and infer field types. |
|
|
28
32
|
| `list_indexes` | List Firestore indexes for the project. |
|
|
29
33
|
|
|
34
|
+
### Auth
|
|
35
|
+
|
|
36
|
+
| Tool | Description |
|
|
37
|
+
| ------------ | ---------------------------------------------------------------------- |
|
|
38
|
+
| `get_user` | Fetch a Firebase Auth user by UID or email. |
|
|
39
|
+
| `list_users` | List Firebase Auth users with optional pagination via `nextPageToken`. |
|
|
40
|
+
|
|
30
41
|
## Requirements
|
|
31
42
|
|
|
32
43
|
- Node.js 18+
|
|
33
44
|
- A Firebase project with Firestore enabled
|
|
34
|
-
- A service account JSON key with Firestore read permissions
|
|
45
|
+
- A service account JSON key with Firestore and Auth read permissions
|
|
35
46
|
|
|
36
47
|
## Setup
|
|
37
48
|
|
|
@@ -101,12 +112,7 @@ Add to your MCP config (e.g. `.cursor/mcp.json`):
|
|
|
101
112
|
"mcpServers": {
|
|
102
113
|
"firebase": {
|
|
103
114
|
"command": "npx",
|
|
104
|
-
"args": [
|
|
105
|
-
"-y",
|
|
106
|
-
"firebase-mcp",
|
|
107
|
-
"--config",
|
|
108
|
-
"/path/to/firebase-mcp.json"
|
|
109
|
-
]
|
|
115
|
+
"args": ["-y", "firebase-mcp", "--config", "/path/to/firebase-mcp.json"]
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const platform_node_1 = require("@effect/platform-node");
|
|
5
|
-
const effect_1 = require("effect");
|
|
6
4
|
const server_1 = require("../server");
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
async function main() {
|
|
6
|
+
const server = new server_1.FirebaseMcpServer();
|
|
7
|
+
await server.start();
|
|
8
|
+
process.stderr.write('[firebase-mcp] Server running on stdio\n');
|
|
9
|
+
}
|
|
10
|
+
main().catch((err) => {
|
|
11
|
+
process.stderr.write(`[firebase-mcp] Fatal: ${String(err)}\n`);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
});
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,sCAA8C;AAE9C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,0BAAiB,EAAE,CAAC;IACvC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;AACnE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,51 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Task } from '../task';
|
|
3
|
+
export declare class ConfigError extends Error {
|
|
4
|
+
readonly cause?: unknown | undefined;
|
|
3
5
|
readonly _tag: "ConfigError";
|
|
4
|
-
|
|
5
|
-
export declare class ConfigError extends ConfigError_base<{
|
|
6
|
-
readonly message: string;
|
|
7
|
-
readonly cause?: unknown;
|
|
8
|
-
}> {
|
|
9
|
-
}
|
|
10
|
-
declare const AppConfigSchema: Schema.Struct<{
|
|
11
|
-
firebase: Schema.Struct<{
|
|
12
|
-
projectId: typeof Schema.String;
|
|
13
|
-
serviceAccountPath: typeof Schema.String;
|
|
14
|
-
}>;
|
|
15
|
-
firestore: Schema.Struct<{
|
|
16
|
-
rules: Schema.Struct<{
|
|
17
|
-
allow: Schema.Array$<typeof Schema.String>;
|
|
18
|
-
deny: Schema.Array$<typeof Schema.String>;
|
|
19
|
-
}>;
|
|
20
|
-
maxCollectionReadSize: Schema.optionalWith<typeof Schema.Number, {
|
|
21
|
-
default: () => number;
|
|
22
|
-
}>;
|
|
23
|
-
maxBatchFetchSize: Schema.optionalWith<typeof Schema.Number, {
|
|
24
|
-
default: () => number;
|
|
25
|
-
}>;
|
|
26
|
-
}>;
|
|
27
|
-
}>;
|
|
28
|
-
export type AppConfig = Schema.Schema.Type<typeof AppConfigSchema>;
|
|
29
|
-
declare const ConfigService_base: Effect.Service.Class<ConfigService, "ConfigService", {
|
|
30
|
-
readonly accessors: true;
|
|
31
|
-
readonly effect: Effect.Effect<{
|
|
32
|
-
config: {
|
|
33
|
-
readonly firebase: {
|
|
34
|
-
readonly projectId: string;
|
|
35
|
-
readonly serviceAccountPath: string;
|
|
36
|
-
};
|
|
37
|
-
readonly firestore: {
|
|
38
|
-
readonly rules: {
|
|
39
|
-
readonly allow: readonly string[];
|
|
40
|
-
readonly deny: readonly string[];
|
|
41
|
-
};
|
|
42
|
-
readonly maxCollectionReadSize: number;
|
|
43
|
-
readonly maxBatchFetchSize: number;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}, ConfigError, never>;
|
|
47
|
-
}>;
|
|
48
|
-
export declare class ConfigService extends ConfigService_base {
|
|
6
|
+
constructor(message: string, cause?: unknown | undefined);
|
|
49
7
|
}
|
|
8
|
+
export declare const ProjectConfigSchema: z.ZodObject<{
|
|
9
|
+
firebase: z.ZodObject<{
|
|
10
|
+
projectId: z.ZodString;
|
|
11
|
+
serviceAccountPath: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
firestore: z.ZodObject<{
|
|
14
|
+
rules: z.ZodObject<{
|
|
15
|
+
allow: z.ZodArray<z.ZodString>;
|
|
16
|
+
deny: z.ZodArray<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
maxCollectionReadSize: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
maxBatchFetchSize: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const AppConfigSchema: z.ZodObject<{
|
|
23
|
+
projects: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
24
|
+
firebase: z.ZodObject<{
|
|
25
|
+
projectId: z.ZodString;
|
|
26
|
+
serviceAccountPath: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
firestore: z.ZodObject<{
|
|
29
|
+
rules: z.ZodObject<{
|
|
30
|
+
allow: z.ZodArray<z.ZodString>;
|
|
31
|
+
deny: z.ZodArray<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
maxCollectionReadSize: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
maxBatchFetchSize: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
|
|
39
|
+
export type AppConfig = z.infer<typeof AppConfigSchema>;
|
|
40
|
+
export declare const loadConfig: (configPath: string) => Task<AppConfig, ConfigError>;
|
|
41
|
+
export declare const getConfigPath: () => string;
|
|
50
42
|
export {};
|
|
51
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,qBAAa,WAAY,SAAQ,KAAK;IAEP,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO;IADrD,QAAQ,CAAC,IAAI,EAAG,aAAa,CAAU;gBAC3B,OAAO,EAAE,MAAM,EAAW,KAAK,CAAC,EAAE,OAAO,YAAA;CAItD;AAkBD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAG9B,CAAC;AAEH,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;iBAEnB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,KAAG,IAAI,CAAC,SAAS,EAAE,WAAW,CAgBvE,CAAC;AAEL,eAAO,MAAM,aAAa,QAAO,MAGhC,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -3,54 +3,63 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const effect_1 = require("effect");
|
|
6
|
+
exports.getConfigPath = exports.loadConfig = exports.ProjectConfigSchema = exports.ConfigError = void 0;
|
|
8
7
|
const minimist_1 = __importDefault(require("minimist"));
|
|
9
8
|
const node_fs_1 = require("node:fs");
|
|
10
9
|
const node_path_1 = require("node:path");
|
|
11
|
-
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const task_1 = require("../task");
|
|
12
|
+
class ConfigError extends Error {
|
|
13
|
+
cause;
|
|
14
|
+
_tag = 'ConfigError';
|
|
15
|
+
constructor(message, cause) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.cause = cause;
|
|
18
|
+
this.name = 'ConfigError';
|
|
19
|
+
}
|
|
12
20
|
}
|
|
13
21
|
exports.ConfigError = ConfigError;
|
|
14
|
-
const FirebaseConfigSchema =
|
|
15
|
-
projectId:
|
|
16
|
-
serviceAccountPath:
|
|
22
|
+
const FirebaseConfigSchema = zod_1.z.object({
|
|
23
|
+
projectId: zod_1.z.string(),
|
|
24
|
+
serviceAccountPath: zod_1.z.string(),
|
|
17
25
|
});
|
|
18
|
-
const FirestoreRulesSchema =
|
|
19
|
-
allow:
|
|
20
|
-
deny:
|
|
26
|
+
const FirestoreRulesSchema = zod_1.z.object({
|
|
27
|
+
allow: zod_1.z.array(zod_1.z.string()),
|
|
28
|
+
deny: zod_1.z.array(zod_1.z.string()),
|
|
21
29
|
});
|
|
22
|
-
const FirestoreConfigSchema =
|
|
30
|
+
const FirestoreConfigSchema = zod_1.z.object({
|
|
23
31
|
rules: FirestoreRulesSchema,
|
|
24
|
-
maxCollectionReadSize:
|
|
25
|
-
maxBatchFetchSize:
|
|
32
|
+
maxCollectionReadSize: zod_1.z.number().default(10),
|
|
33
|
+
maxBatchFetchSize: zod_1.z.number().default(200),
|
|
26
34
|
});
|
|
27
|
-
|
|
35
|
+
exports.ProjectConfigSchema = zod_1.z.object({
|
|
28
36
|
firebase: FirebaseConfigSchema,
|
|
29
37
|
firestore: FirestoreConfigSchema,
|
|
30
38
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
const AppConfigSchema = zod_1.z.object({
|
|
40
|
+
projects: zod_1.z.record(zod_1.z.string(), exports.ProjectConfigSchema),
|
|
41
|
+
});
|
|
42
|
+
const loadConfig = (configPath) => task_1.Task.attempt({
|
|
43
|
+
try: () => {
|
|
36
44
|
const absolutePath = (0, node_path_1.resolve)(configPath);
|
|
37
|
-
const raw =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
const raw = (0, node_fs_1.readFileSync)(absolutePath, 'utf-8');
|
|
46
|
+
const json = JSON.parse(raw);
|
|
47
|
+
const result = AppConfigSchema.safeParse(json);
|
|
48
|
+
if (!result.success) {
|
|
49
|
+
throw new ConfigError('Config validation failed', result.error);
|
|
50
|
+
}
|
|
51
|
+
return result.data;
|
|
52
|
+
},
|
|
53
|
+
catch: (cause) => {
|
|
54
|
+
if (cause instanceof ConfigError)
|
|
55
|
+
return cause;
|
|
56
|
+
return new ConfigError(`Failed to load config: ${configPath}`, cause);
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
exports.loadConfig = loadConfig;
|
|
60
|
+
const getConfigPath = () => {
|
|
61
|
+
const args = (0, minimist_1.default)(process.argv.slice(2));
|
|
62
|
+
return args['config'] ?? './firebase-mcp.json';
|
|
63
|
+
};
|
|
64
|
+
exports.getConfigPath = getConfigPath;
|
|
56
65
|
//# sourceMappingURL=index.js.map
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,qCAAuC;AACvC,yCAAoC;AACpC,6BAAwB;AAExB,kCAA+B;AAE/B,MAAa,WAAY,SAAQ,KAAK;IAEE;IAD7B,IAAI,GAAG,aAAsB,CAAC;IACvC,YAAY,OAAe,EAAW,KAAe;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,UAAK,GAAL,KAAK,CAAU;QAEnD,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAND,kCAMC;AAED,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC1B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,oBAAoB;IAC3B,qBAAqB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7C,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;CAC3C,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,QAAQ,EAAE,oBAAoB;IAC9B,SAAS,EAAE,qBAAqB;CACjC,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,2BAAmB,CAAC;CACpD,CAAC,CAAC;AAKI,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAgC,EAAE,CAC7E,WAAI,CAAC,OAAO,CAAC;IACX,GAAG,EAAE,GAAG,EAAE;QACR,MAAM,YAAY,GAAG,IAAA,mBAAO,EAAC,UAAU,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,IAAA,sBAAY,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;QACxC,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,WAAW,CAAC,0BAA0B,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;QACf,IAAI,KAAK,YAAY,WAAW;YAAE,OAAO,KAAK,CAAC;QAC/C,OAAO,IAAI,WAAW,CAAC,0BAA0B,UAAU,EAAE,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;CACF,CAAC,CAAC;AAhBQ,QAAA,UAAU,cAgBlB;AAEE,MAAM,aAAa,GAAG,GAAW,EAAE;IACxC,MAAM,IAAI,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,qBAAqB,CAAC;AACjD,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB"}
|
package/dist/firebase/index.d.ts
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
declare
|
|
1
|
+
import type { Auth } from 'firebase-admin/auth';
|
|
2
|
+
import type { ProjectConfig } from '../config';
|
|
3
|
+
import { Task } from '../task';
|
|
4
|
+
export declare class FirebaseInitError extends Error {
|
|
5
|
+
readonly cause?: unknown | undefined;
|
|
5
6
|
readonly _tag: "FirebaseInitError";
|
|
6
|
-
|
|
7
|
-
export declare class FirebaseInitError extends FirebaseInitError_base<{
|
|
8
|
-
readonly message: string;
|
|
9
|
-
readonly cause?: unknown;
|
|
10
|
-
}> {
|
|
7
|
+
constructor(message: string, cause?: unknown | undefined);
|
|
11
8
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
firestore: () => admin.firestore.Firestore;
|
|
16
|
-
}, FirebaseInitError, ConfigService>;
|
|
17
|
-
}>;
|
|
18
|
-
export declare class FirebaseService extends FirebaseService_base {
|
|
9
|
+
export interface FirebaseClients {
|
|
10
|
+
firestore: () => FirebaseFirestore.Firestore;
|
|
11
|
+
auth: () => Auth;
|
|
19
12
|
}
|
|
20
|
-
export
|
|
13
|
+
export declare const initFirebase: (config: ProjectConfig) => Task<FirebaseClients, FirebaseInitError>;
|
|
21
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/firebase/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/firebase/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAIhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,qBAAa,iBAAkB,SAAQ,KAAK;IAEb,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO;IADrD,QAAQ,CAAC,IAAI,EAAG,mBAAmB,CAAU;gBACjC,OAAO,EAAE,MAAM,EAAW,KAAK,CAAC,EAAE,OAAO,YAAA;CAItD;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,iBAAiB,CAAC,SAAS,CAAC;IAC7C,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,GACvB,QAAQ,aAAa,KACpB,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAgCtC,CAAC"}
|
package/dist/firebase/index.js
CHANGED
|
@@ -3,40 +3,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const effect_1 = require("effect");
|
|
6
|
+
exports.initFirebase = exports.FirebaseInitError = void 0;
|
|
8
7
|
const firebase_admin_1 = __importDefault(require("firebase-admin"));
|
|
9
8
|
const node_fs_1 = require("node:fs");
|
|
10
9
|
const node_path_1 = require("node:path");
|
|
11
|
-
const
|
|
12
|
-
class FirebaseInitError extends
|
|
10
|
+
const task_1 = require("../task");
|
|
11
|
+
class FirebaseInitError extends Error {
|
|
12
|
+
cause;
|
|
13
|
+
_tag = 'FirebaseInitError';
|
|
14
|
+
constructor(message, cause) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.cause = cause;
|
|
17
|
+
this.name = 'FirebaseInitError';
|
|
18
|
+
}
|
|
13
19
|
}
|
|
14
20
|
exports.FirebaseInitError = FirebaseInitError;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
effect: effect_1.Effect.gen(function* () {
|
|
18
|
-
const config = yield* config_1.ConfigService.config;
|
|
21
|
+
const initFirebase = (config) => task_1.Task.attempt({
|
|
22
|
+
try: () => {
|
|
19
23
|
const serviceAccountPath = (0, node_path_1.resolve)(config.firebase.serviceAccountPath);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return { firestore: () => db };
|
|
38
|
-
}),
|
|
39
|
-
}) {
|
|
40
|
-
}
|
|
41
|
-
exports.FirebaseService = FirebaseService;
|
|
24
|
+
const appName = config.firebase.projectId;
|
|
25
|
+
const serviceAccount = JSON.parse((0, node_fs_1.readFileSync)(serviceAccountPath, 'utf-8'));
|
|
26
|
+
const existing = firebase_admin_1.default.apps.find((a) => a?.name === appName);
|
|
27
|
+
if (!existing) {
|
|
28
|
+
firebase_admin_1.default.initializeApp({
|
|
29
|
+
credential: firebase_admin_1.default.credential.cert(serviceAccount),
|
|
30
|
+
projectId: appName,
|
|
31
|
+
}, appName);
|
|
32
|
+
}
|
|
33
|
+
const app = firebase_admin_1.default.app(appName);
|
|
34
|
+
const db = app.firestore();
|
|
35
|
+
const authClient = app.auth();
|
|
36
|
+
return { firestore: () => db, auth: () => authClient };
|
|
37
|
+
},
|
|
38
|
+
catch: (cause) => new FirebaseInitError(`Failed to initialize Firebase for project: ${config.firebase.projectId}`, cause),
|
|
39
|
+
});
|
|
40
|
+
exports.initFirebase = initFirebase;
|
|
42
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/firebase/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/firebase/index.ts"],"names":[],"mappings":";;;;;;AAAA,oEAAmC;AAEnC,qCAAuC;AACvC,yCAAoC;AAGpC,kCAA+B;AAE/B,MAAa,iBAAkB,SAAQ,KAAK;IAEJ;IAD7B,IAAI,GAAG,mBAA4B,CAAC;IAC7C,YAAY,OAAe,EAAW,KAAe;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,UAAK,GAAL,KAAK,CAAU;QAEnD,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAND,8CAMC;AAOM,MAAM,YAAY,GAAG,CAC1B,MAAqB,EACqB,EAAE,CAC5C,WAAI,CAAC,OAAO,CAAC;IACX,GAAG,EAAE,GAAoB,EAAE;QACzB,MAAM,kBAAkB,GAAG,IAAA,mBAAO,EAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;QACvE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAE1C,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAC/B,IAAA,sBAAY,EAAC,kBAAkB,EAAE,OAAO,CAAC,CAClB,CAAC;QAE1B,MAAM,QAAQ,GAAG,wBAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,wBAAK,CAAC,aAAa,CACjB;gBACE,UAAU,EAAE,wBAAK,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC;gBACjD,SAAS,EAAE,OAAO;aACnB,EACD,OAAO,CACR,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,wBAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAS,GAAG,CAAC,IAAI,EAAE,CAAC;QAEpC,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,GAAS,EAAE,CAAC,UAAU,EAAE,CAAC;IAC/D,CAAC;IACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,IAAI,iBAAiB,CACnB,8CAA8C,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,EACzE,KAAK,CACN;CACJ,CAAC,CAAC;AAlCQ,QAAA,YAAY,gBAkCpB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Auth } from 'firebase-admin/auth';
|
|
2
|
+
import type { ProjectConfig } from '../config';
|
|
3
|
+
import { FirebaseInitError } from '../firebase';
|
|
4
|
+
import { Task } from '../task';
|
|
5
|
+
export declare class AccessDeniedError extends Error {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly _tag: "AccessDeniedError";
|
|
8
|
+
constructor(path: string);
|
|
9
|
+
}
|
|
10
|
+
export interface ProjectContext {
|
|
11
|
+
config: ProjectConfig;
|
|
12
|
+
firestore: () => FirebaseFirestore.Firestore;
|
|
13
|
+
auth: () => Auth;
|
|
14
|
+
checkAccess: (path: string) => Task<void, AccessDeniedError>;
|
|
15
|
+
}
|
|
16
|
+
export declare const createProjectContext: (config: ProjectConfig) => Task<ProjectContext, FirebaseInitError>;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAgB,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,qBAAa,iBAAkB,SAAQ,KAAK;IAE9B,QAAQ,CAAC,IAAI,EAAE,MAAM;IADjC,QAAQ,CAAC,IAAI,EAAG,mBAAmB,CAAU;gBACxB,IAAI,EAAE,MAAM;CAIlC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,MAAM,iBAAiB,CAAC,SAAS,CAAC;IAC7C,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;CAC9D;AAWD,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,aAAa,KACpB,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAUpC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createProjectContext = exports.AccessDeniedError = void 0;
|
|
7
|
+
const micromatch_1 = __importDefault(require("micromatch"));
|
|
8
|
+
const firebase_1 = require("../firebase");
|
|
9
|
+
const task_1 = require("../task");
|
|
10
|
+
class AccessDeniedError extends Error {
|
|
11
|
+
path;
|
|
12
|
+
_tag = 'AccessDeniedError';
|
|
13
|
+
constructor(path) {
|
|
14
|
+
super(`Access denied: ${path}`);
|
|
15
|
+
this.path = path;
|
|
16
|
+
this.name = 'AccessDeniedError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.AccessDeniedError = AccessDeniedError;
|
|
20
|
+
const isAllowed = (path, rules) => {
|
|
21
|
+
if (micromatch_1.default.isMatch(path, [...rules.deny]))
|
|
22
|
+
return false;
|
|
23
|
+
if (micromatch_1.default.isMatch(path, [...rules.allow]))
|
|
24
|
+
return true;
|
|
25
|
+
return false;
|
|
26
|
+
};
|
|
27
|
+
const createProjectContext = (config) => (0, firebase_1.initFirebase)(config).map((clients) => ({
|
|
28
|
+
config,
|
|
29
|
+
firestore: clients.firestore,
|
|
30
|
+
auth: clients.auth,
|
|
31
|
+
checkAccess(path) {
|
|
32
|
+
return isAllowed(path, config.firestore.rules)
|
|
33
|
+
? task_1.Task.succeed(undefined)
|
|
34
|
+
: task_1.Task.fail(new AccessDeniedError(path));
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
37
|
+
exports.createProjectContext = createProjectContext;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/project/index.ts"],"names":[],"mappings":";;;;;;AAEA,4DAAoC;AAEpC,0CAA8D;AAC9D,kCAA+B;AAE/B,MAAa,iBAAkB,SAAQ,KAAK;IAErB;IADZ,IAAI,GAAG,mBAA4B,CAAC;IAC7C,YAAqB,IAAY;QAC/B,KAAK,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;QADb,SAAI,GAAJ,IAAI,CAAQ;QAE/B,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAND,8CAMC;AASD,MAAM,SAAS,GAAG,CAChB,IAAY,EACZ,KAA4D,EACnD,EAAE;IACX,IAAI,oBAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC5D,IAAI,oBAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5D,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEK,MAAM,oBAAoB,GAAG,CAClC,MAAqB,EACoB,EAAE,CAC3C,IAAA,uBAAY,EAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM;IACN,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,WAAW,CAAC,IAAY;QACtB,OAAO,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;YAC5C,CAAC,CAAC,WAAI,CAAC,OAAO,CAAC,SAAS,CAAC;YACzB,CAAC,CAAC,WAAI,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC,CAAC,CAAC;AAZO,QAAA,oBAAoB,wBAY3B"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ConfigService } from '../config';
|
|
4
|
-
import { FirebaseService } from '../firebase';
|
|
5
|
-
declare const McpServerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1
|
+
export declare class McpServerError extends Error {
|
|
2
|
+
readonly cause?: unknown | undefined;
|
|
6
3
|
readonly _tag: "McpServerError";
|
|
7
|
-
|
|
8
|
-
export declare class McpServerError extends McpServerError_base<{
|
|
9
|
-
readonly message: string;
|
|
10
|
-
readonly cause?: unknown;
|
|
11
|
-
}> {
|
|
4
|
+
constructor(message: string, cause?: unknown | undefined);
|
|
12
5
|
}
|
|
13
|
-
declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
export declare class FirebaseMcpServer {
|
|
7
|
+
private appConfig;
|
|
8
|
+
private readonly projectContexts;
|
|
9
|
+
private readonly mcpServer;
|
|
10
|
+
private readonly configPath;
|
|
11
|
+
constructor();
|
|
12
|
+
start(): Promise<void>;
|
|
13
|
+
private getOrInitProject;
|
|
21
14
|
}
|
|
22
|
-
export {};
|
|
23
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAkBA,qBAAa,cAAe,SAAQ,KAAK;IAIrC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO;IAH1B,QAAQ,CAAC,IAAI,EAAG,gBAAgB,CAAU;gBAExC,OAAO,EAAE,MAAM,EACN,KAAK,CAAC,EAAE,OAAO,YAAA;CAK3B;AAeD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8C;IAC9E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;;IAU9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA4F5B,OAAO,CAAC,gBAAgB;CAgBzB"}
|