Skip to content

Commit 771ff96

Browse files
ochafikclaude
andcommitted
style: format integration-server/server.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent bff46cc commit 771ff96

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

examples/integration-server/server.ts

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
22
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3-
import type { CallToolResult, ReadResourceResult } from "@modelcontextprotocol/sdk/types.js";
3+
import type {
4+
CallToolResult,
5+
ReadResourceResult,
6+
} from "@modelcontextprotocol/sdk/types.js";
47
import fs from "node:fs/promises";
58
import path from "node:path";
6-
import { registerAppTool, registerAppResource, RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY } from "@modelcontextprotocol/ext-apps/server";
9+
import {
10+
registerAppTool,
11+
registerAppResource,
12+
RESOURCE_MIME_TYPE,
13+
RESOURCE_URI_META_KEY,
14+
} from "@modelcontextprotocol/ext-apps/server";
715
import { startServer } from "./server-utils.js";
816

917
const DIST_DIR = path.join(import.meta.dirname, "dist");
@@ -29,7 +37,12 @@ export function createServer(): McpServer {
2937
},
3038
async (): Promise<CallToolResult> => {
3139
return {
32-
content: [{ type: "text", text: JSON.stringify({ time: new Date().toISOString() }) }],
40+
content: [
41+
{
42+
type: "text",
43+
text: JSON.stringify({ time: new Date().toISOString() }),
44+
},
45+
],
3346
};
3447
},
3548
);
@@ -40,9 +53,14 @@ export function createServer(): McpServer {
4053
RESOURCE_URI,
4154
{ mimeType: RESOURCE_MIME_TYPE },
4255
async (): Promise<ReadResourceResult> => {
43-
const html = await fs.readFile(path.join(DIST_DIR, "mcp-app.html"), "utf-8");
56+
const html = await fs.readFile(
57+
path.join(DIST_DIR, "mcp-app.html"),
58+
"utf-8",
59+
);
4460
return {
45-
contents: [{ uri: RESOURCE_URI, mimeType: RESOURCE_MIME_TYPE, text: html }],
61+
contents: [
62+
{ uri: RESOURCE_URI, mimeType: RESOURCE_MIME_TYPE, text: html },
63+
],
4664
};
4765
},
4866
);

0 commit comments

Comments
 (0)