my-server
my-server
天気ウィジェットを備えたMCPサーバーです。server.tool({ widget: { dir: "weather" } }) は
src/widgets/weather/(React)を指しています。mcpfy-sdk がそれをバンドルします — server.widget() もHTMLファイルも、プロンプトやリソースも必要ありません。
weather ツールはサーバー上で Open-Meteo から気温を取得します。ウィジェット内のルックアップはホストを通じてそのツールを呼び出します(callTool)— iframe はAPIを fetch しません。
後で main.tsx が別のオリジンを fetch する場合は、src/server.ts 内の widget.csp.connectDomains のコメントを外してください。ChatGPT と Claude はこれを適用しますが、Inspector は適用しないことがよくあります。
実行
ローカル(MCPサーバーを起動します。ウィジェットはリッスン時にバンドルされます — 事前のビルドは不要です):
npm run dev # default transport: http
npm run dev:stdio
npm run dev:http # HTTP on port 4000本番 / ChatGPT(iframe は使い捨ての dev バンドルを同じように使用できません):
npm run build # mcpfy build && tsc
npm startRelated MCP server: EightyAndSunny
MCPホストでの使用方法
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["mcpfy", "dev", "--", "--stdio"],
"cwd": "/absolute/path/to/this-project"
}
}
}次のステップ
UI:
src/widgets/weather/main.tsx(mcpfy-sdk/widgetフック)UI なしのツール:
server.tool()でwidgetを省略
Wait - I need to double check the em dashes. The original uses "—" (em dash). I used "—" as well. Good.
Also I should verify: "no server.widget(), no HTML file, no prompt/resource required" - this enumerates three things. "server.widget()" is code, "HTML file" → "HTMLファイル", "no prompt/resource required" → "プロンプトやリソースも不要です". I said "server.widget()もHTMLファイルも、プロンプトやリソースも不要です" - this works.
Also checking the bold: "weather widget" → "天気ウィジェット" ✓
Let me also check em-dash usage. The original uses "—" so I'll keep that where possible aska. In Japanese, "—" can work.
I think this is solid. Let me finalize.# my-server
天気ウィジェットを備えたMCPサーバーです。server.tool({ widget: { dir: "weather" } }) は src/widgets/weather/(React)を指しています。mcpfy-sdk がそれをバンドルします — server.widget() もHTMLファイルも、プロンプトやリソースも不要です。
weather ツールはサーバー上で Open-Meteo から気温を取得します。ウィジェット内のルックアップは、そのツールをホスト経由で呼び出します(callTool)— iframe はAPIを fetch しません。
後で main.tsx が別のオリジンを fetch する場合は、src/server.ts 内の widget.csp.connectDomains のコメントを外してください。ChatGPT と Claude はこれを適用しますが、Inspector は適用しないことがよくあります。
実行
ローカル(MCPサーバーを起動します。ウィジェットはリッスン時にバンドルされるため、事前のビルドは不要です):
npm run dev # default transport: http
npm run dev:stdio
npm run dev:http # HTTP on port 4000本番 / ChatGPT(iframe は使い捨ての dev バンドルを同じように使用できません):
npm run build # mcpfy build && tsc
npm startMCPホストでの使用方法
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["mcpfy", "dev", "--", "--stdio"],
"cwd": "/absolute/path/to/this-project"
}
}
}次のステップ
UI:
src/widgets/weather/main.tsx(mcpfy-sdk/widgetフック)UI なしのツール:
server.tool()でwidgetを省略
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA minimal MCP server that provides weather data using Open-Meteo API, designed as a teaching tool for improving AI agent tool interfaces.-
- FlicenseNot gradedqualityDmaintenanceA weather-reactive MCP server that renders rich Open-Meteo weather widgets and provides plain JSON weather data, all without an API key.-
- FlicenseNot gradedqualityDmaintenanceA proof-of-concept MCP server that provides weather information using the Open-Meteo API, with tools for greeting, getting weather by coordinates, and by location name.-
- AlicenseAqualityDmaintenanceA simple MCP server that exposes a get_weather tool to fetch real-time weather for any GPS coordinates using the Open-Meteo API, no API key required.111 npmISC