Skip to main content
Glama
vmridul

my-server

by vmridul

my-server

An MCP server with a weather widget. server.tool({ widget: { dir: "weather" } }) points at src/widgets/weather/ (React). mcpfy-sdk bundles it — no server.widget(), no HTML file, no prompt/resource required.

The weather tool fetches temperature from Open-Meteo on the server. Lookup in the widget calls that tool through the host (callTool) — the iframe does not fetch the API.

If main.tsx later fetches another origin, uncomment widget.csp.connectDomains in src/server.ts. ChatGPT and Claude apply it; Inspector often does not.

Run

Local (starts the MCP server; widgets are bundled on listen — no separate build first):

npm run dev          # default transport: http
npm run dev:stdio
npm run dev:http     # HTTP on port 4000

Production / ChatGPT (iframes cannot use a one-off dev bundle the same way):

npm run build        # mcpfy build && tsc
npm start

Related MCP server: EightyAndSunny

Use it in an MCP host

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["mcpfy", "dev", "--", "--stdio"],
      "cwd": "/absolute/path/to/this-project"
    }
  }
}

Next steps

  • UI: src/widgets/weather/main.tsx (mcpfy-sdk/widget hooks)

  • Tools without UI: omit widget on server.tool()

  • mcpfy docs

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

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