Skip to main content
Glama
vmridul

my-server

by vmridul

my-server

MCP-сервер с виджетом погоды. server.tool({ widget: { dir: "weather" } }) указывает на src/widgets/weather/ (React). mcpfy-sdk собирает его — не нужны ни server.widget(), ни HTML-файл, ни prompt/resource.

Инструмент weather получает температуру с Open-Meteo на сервере. Поиск в виджете вызывает этот инструмент через хост (callTool) — iframe не делает fetch к API.

Если main.tsx в дальнейшем будет делать fetch к другому источнику, раскомментируйте widget.csp.connectDomains в src/server.ts. 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 start

Related 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: опустите widget в server.tool()

  • Документация mcpfy

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vmridul/sample-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server