mcpServer
MCP server from Jdchjq/mcpServer
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:
-
Clone the repository (or navigate to the project directory): git clone https://github.com/your-org/jdchjq-mcpserver.git cd jdchjq-mcpserver
-
Ensure dependencies are downloaded: go mod download
-
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
-
-
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
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go