@@ -17,6 +17,20 @@ script({
1717 // command: "npx",
1818 // args: ["@modelcontextprotocol/server-fetch"]
1919 // }
20+
21+ // Weather MCP Server Info:
22+ // - Server file: samples/tools/weather-mcp-server.mjs
23+ // - Port: 3001 (configurable via MCP_PORT env var)
24+ // - Transport: HTTP (not process-based, so can't use mcpServers config)
25+ // - Tools provided:
26+ // * get_current_weather: Get current weather for a city
27+ // * get_weather_forecast: Get 3-day weather forecast
28+ // * compare_weather: Compare weather between two cities
29+ // - Available cities: Paris, London, New York, Tokyo, Sydney, Berlin, Moscow, Mumbai, Cairo, Vancouver
30+ //
31+ // To use the weather server:
32+ // 1. Start server: node samples/tools/weather-mcp-server.mjs
33+ // 2. Use programmatically in scripts (see weather-mcp-http.genai.mts)
2034 }
2135} )
2236
@@ -25,22 +39,40 @@ const cities = (env.vars.cities || "Paris, London")
2539 . map ( city => city . trim ( ) )
2640 . filter ( city => city . length > 0 )
2741
28- $ `# Weather Report Using MCP Configuration
42+ $ `# Weather MCP Server - Configuration Demo
2943
30- This demonstrates the mcpServers configuration approach.
44+ This demonstrates the mcpServers configuration approach and provides information about our weather MCP server.
45+
46+ ## About the Weather MCP Server
47+
48+ **Location**: \`samples/tools/weather-mcp-server.mjs\`
49+ **Transport**: HTTP (runs on port 3001)
50+ **Tools**:
51+ - \`get_current_weather\` - Get current weather for a city
52+ - \`get_weather_forecast\` - Get 3-day weather forecast
53+ - \`compare_weather\` - Compare weather between two cities
54+
55+ **Available Cities**: Paris, London, New York, Tokyo, Sydney, Berlin, Moscow, Mumbai, Cairo, Vancouver
56+
57+ **To start the server**:
58+ \`\`\`bash
59+ node samples/tools/weather-mcp-server.mjs
60+ \`\`\`
61+
62+ ## MCP Configuration Types
3163
3264**Note**: Since our weather server uses HTTP transport, we need to use the programmatic approach instead.
3365The mcpServers configuration is designed for process-based MCP servers that can be launched via command line.
3466
35- For HTTP-based MCP servers, see the weather-mcp-http.genai.mts example .
67+ For HTTP-based MCP servers like our weather example , see \` weather-mcp-http.genai.mts\` .
3668
3769Cities to check: ${ cities . join ( ", " ) }
3870
3971To use process-based MCP servers, you would configure them in the mcpServers section:
4072\`\`\`typescript
4173mcpServers: {
4274 fetch: {
43- command: "npx",
75+ command: "npx",
4476 args: ["@modelcontextprotocol/server-fetch"]
4577 }
4678}
0 commit comments