Get the FREE Ultimate OpenClaw Setup Guide →

mcpServer

MCP server from Jdchjq/mcpServer

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jdchjq-mcpserver go run ./cmd/weather/main.go --configDir=/path/to/config --transport=stdio \
  --env GOPATH="$GOPATH" \
  --env GOMODCACHE="$GOMODCACHE"

How to use

This MCP server is a weather-focused MCP service built on the mcp-go framework. It exposes weather-related capabilities by querying a weather data provider (the project mentions using the HeWeather API under the hood). The server can be interacted with in two transport modes: standard I/O (stdio) for local, in-process usage, and Server-Sent Events (SSE) for remote, streaming access. To run locally, build the weather binary and invoke it via stdio, or run it in SSE mode to enable remote clients to connect over HTTP. The client examples in the repository show how the server is configured and started, including required config files, certificates, and environment setup.

Once running, you can query weather data through MCP requests supported by the server. The implementation includes a custom UnmarshalJSON to annotate results with descriptive fields, which helps AI systems interpret the returned data more accurately. When using SSE, you would connect to http://localhost:8080/sse and stream updates; with stdio, you invoke the binary directly and pass configuration via command-line flags. The focus is on providing reliable, annotated weather information rather than generic data retrieval.

How to install

Prerequisites:

  • Go 1.20+ (or compatible) installed on your machine
  • Access to the repository containing the MCP server code
  • Optional: a configured config directory with config/config.yaml and config/private_key.pem as indicated by the client usage

Installation steps:

  1. Clone the repository (or navigate to the project directory): git clone https://github.com/your-org/jdchjq-mcpserver.git cd jdchjq-mcpserver

  2. Ensure dependencies are downloaded: go mod download

  3. Build or run the weather MCP server:

    • To run directly (stdio transport): go run ./cmd/weather/main.go --configDir=/path/to/config --transport=stdio

    • To run in SSE mode (for remote streaming): go run ./cmd/weather/main.go --configDir=/path/to/config -t=sse

  4. If you prefer building a binary first: go build -o weather ./cmd/weather/main.go ./weather --configDir=/path/to/config --transport=stdio

Notes:

  • Ensure the config directory contains the required configuration files (e.g., config/config.yaml and config/private_key.pem) as described in the client usage section.
  • Adjust paths and environment variables as needed for your environment.

Additional notes

Tips and considerations:

  • The server queries weather data via the HeWeather API (or equivalent), so ensure API keys or access configurations are provided in your config.yaml as required by the underlying client.
  • The JSON results are annotated by a custom UnmarshalJSON implementation to populate description fields, improving interpretability for AI clients.
  • When using SSE, make sure your network allows HTTP connections to the server endpoint, and consider configuring proper CORS settings if accessing from a browser or cross-domain client.
  • For local development, you can toggle between stdio and SSE transports by adjusting the --transport flag (stdio) or using -t=sse as shown in the examples.
  • If you encounter module cache or GOPATH issues, set GOMODCACHE and GOPATH to suitable directories in your environment.

Related MCP Servers

Sponsor this space

Reach thousands of developers