MCP SERVER logo

MCP SERVER

by Jdchjq

This is an MCP server based on mcp-go. It currently implements weather-related functionalities using the HeFeng Weather API.

View on GitHub

Last updated: N/A

What is MCP SERVER?

This MCP server provides weather data retrieval functionality. It's built using mcp-go and leverages the HeFeng Weather API for data.

How to use MCP SERVER?

The server can be used via stdio (inter-process communication) or SSE (HTTP server-sent events). Configuration files (config.yaml and private_key.pem) are required in the specified config directory. For stdio, compile the server and specify the executable path in the client configuration. For SSE, run the server and configure the client with the server's URL.

Key features of MCP SERVER

  • Weather data retrieval

  • Uses HeFeng Weather API

  • Supports stdio and SSE transport

  • Custom UnmarshalJSON for description tags

  • Configuration via YAML files

Use cases of MCP SERVER

  • Providing weather information to other applications

  • Integrating weather data into a larger system

  • Building a weather-aware service

  • Demonstrating mcp-go usage

  • AI applications requiring weather data

FAQ from MCP SERVER

What is mcp-go?

mcp-go is the underlying framework used to build this MCP server.

What is the HeFeng Weather API?

It is the API used to retrieve weather data.

What configuration files are required?

config/config.yaml and config/private_key.pem are required in the specified config directory.

How do I run the server in SSE mode?

Use the command go run ./cmd/weather/main.go --configDir=/path/to/config -t=sse.

What is the purpose of the custom UnmarshalJSON method?

It adds description tags to the returned data, making it easier for AI to interpret the results.