Skip to main content
Glama

Weather MCP Server

by drsullivan13

Weather MCP Server

Model Context Protocol server with integrated micropayment functionality. Built with Bun, TypeScript, and the ATXP payment system for monetizing LLM tool calls.

Features

  • MCP Protocol: Standardized tool interface for AI assistants

  • Payment Integration: ATXP middleware requiring USDC micropayments per tool call

  • Stateless Architecture: Per-request transport isolation for scalability

  • Type-Safe: Strict TypeScript with Zod v3 validation

  • High Performance: Bun runtime for fast execution

Tech Stack

  • Runtime: Bun

  • Protocol: MCP

  • Payment: ATXP

  • Validation: Zod v3

  • Server: Express v5

Quick Start

# Install bun install # Configure .env ATXP_CONNECTION="your-atxp-connection-url" PORT=3000 # Development bun run dev # Production bun run build bun run start

Architecture

Client → Express → ATXP Payment → MCP Transport → Tool Handler → Response

Each tool call validates payment before execution. The server creates a new StreamableHTTPServerTransport per request to prevent JSON-RPC ID collisions.

Tool Registration

server.registerTool( "tool-name", { title: "Tool Title", description: "What it does", inputSchema: { param: z.string() }, outputSchema: { result: z.string() } }, async (params) => { await requirePayment({ price: BigNumber(0.01) }); return { content: [{ type: "text", text: JSON.stringify(output) }], structuredContent: output }; } );

API

POST / - Accepts MCP JSON-RPC 2.0 requests

{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "tool-name", "arguments": {} }, "id": 1 }

TypeScript Config

  • verbatimModuleSyntax: true - Explicit type imports required

  • moduleResolution: bundler - Optimized for Bun

  • strict: true - All strict checks enabled

  • noEmit: true - Bun handles compilation

Key Dependencies

  • @modelcontextprotocol/sdk - MCP implementation

  • @atxp/express - Payment middleware

  • zod@^3.23.8 - Required for MCP SDK compatibility

  • bignumber.js - Precise monetary calculations


Built with Bun 🥟

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server with integrated ATXP micropayment functionality that requires USDC payments for each AI tool call execution.

  1. Features
    1. Tech Stack
      1. Quick Start
        1. Architecture
          1. Tool Registration
            1. API
              1. TypeScript Config
                1. Key Dependencies

                  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/drsullivan13/weather-server'

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