my-server
my-server
Un servidor MCP con un widget meteorológico. server.tool({ widget: { dir: "weather" } }) apunta a
src/widgets/weather/ (React). mcpfy-sdk lo empaqueta: no server.widget(), ni archivo HTML,
ni prompt/recurso necesario.
La herramienta weather obtiene la temperatura de Open-Meteo en el servidor.
La consulta en el widget llama a esa herramienta a través del host (callTool): el iframe no hace
fetch de la API.
Si main.tsx más adelante hace fetch de otro origen, descomenta widget.csp.connectDomains en src/server.ts. ChatGPT y Claude lo aplican; Inspector normalmente no lo hace.
Ejecución
Local (inicia el servidor MCP; los widgets se empaquetan al escuchar — sin compilación previa):
npm run dev # default transport: http
npm run dev:stdio
npm run dev:http # HTTP on port 4000Producción / ChatGPT (los iframes no pueden usar un bundle dev de una sola vez de la misma manera):
npm run build # mcpfy build && tsc
npm startRelated MCP server: EightyAndSunny
Úsalo en un host MCP
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["mcpfy", "dev", "--", "--stdio"],
"cwd": "/absolute/path/to/this-project"
}
}
}Próximos pasos
UI:
src/widgets/weather/main.tsx(hooks demcpfy-sdk/widget)Herramientas sin UI: omite
widgetenserver.tool()
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