Skip to content

Commit f5b0d3d

Browse files
committed
feat: add infrastructure for MCP Apps
### Description Adds support for returning structured content from tools, which is used by MCP Apps to pass complex data to the host. Also updates the resource index. ### Scenarios Tested - Verified build and file changes.
1 parent 863b5fe commit f5b0d3d

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/mcp/resources/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import { ServerResource, ServerResourceTemplate } from "../resource";
1313
import { trackGA4 } from "../../track";
1414
import { crashlytics_issues } from "./guides/crashlytics_issues";
1515
import { crashlytics_reports } from "./guides/crashlytics_reports";
16+
import { login_ui } from "./login_ui";
17+
import { update_environment_ui } from "./update_environment_ui";
18+
import { deploy_ui } from "./deploy_ui";
19+
import { init_ui } from "./init_ui";
1620

1721
export const resources = [
1822
app_id,
@@ -25,6 +29,10 @@ export const resources = [
2529
init_firestore_rules,
2630
init_auth,
2731
init_hosting,
32+
login_ui,
33+
update_environment_ui,
34+
deploy_ui,
35+
init_ui,
2836
];
2937

3038
export const resourceTemplates = [docs];

src/mcp/util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export function toContent(
4141
const suffix = options?.contentSuffix || "";
4242
return {
4343
content: [{ type: "text", text: `${prefix}${text}${suffix}` }],
44-
};
44+
structuredContent: data,
45+
} as any;
4546
}
4647

4748
/**

0 commit comments

Comments
 (0)