11<div align =" center " >
2- <img alt =" example output template " src =" ./ assets/weather.svg" >
2+ <img alt =" example output template " src =" assets/weather.svg " >
33
44<h1 >Weather API MCP Server</h1 >
55
66[ ![ license] ( https://img.shields.io/badge/license-MIT-red.svg )] ( LICENSE )
77[ ![ go version] ( https://img.shields.io/github/go-mod/go-version/TuanKiri/weather-mcp-server )] ( go.mod )
88[ ![ go report] ( https://goreportcard.com/badge/github.com/TuanKiri/weather-mcp-server )] ( https://goreportcard.com/report/github.com/TuanKiri/weather-mcp-server )
9+ [ ![ build] ( https://github.com/TuanKiri/weather-mcp-server/workflows/Build/badge.svg )] ( https://github.com/TuanKiri/weather-mcp-server/actions?workflow=Build )
910
1011<strong >[ Report Bug] ( https://github.com/TuanKiri/weather-mcp-server/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml ) </strong > | <strong >[ Request Feature] ( https://github.com/TuanKiri/weather-mcp-server/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.yml ) </strong >
1112
1415A lightweight Model Context Protocol (MCP) server that enables AI assistants like Claude to retrieve and interpret real-time weather data.
1516
1617<div align =" center " >
17- <img alt =" demo example " src =" ./ assets/weather.gif" width =" 480 " >
18+ <img alt =" demo example " src =" assets/weather.gif " width =" 480 " >
1819</div >
1920
2021## Installing on Claude Desktop
2122
2223To use your MCP server with Claude Desktop, add it to your Claude configuration:
2324
25+ #### 1. Local mode
26+
2427``` json
2528{
2629 "mcpServers" : {
@@ -35,7 +38,19 @@ To use your MCP server with Claude Desktop, add it to your Claude configuration:
3538}
3639```
3740
38- You can get your API key in your personal account at [ weatherapi] ( https://www.weatherapi.com/my/ ) .
41+ You can get an API key from your personal account on [ WeatherAPI] ( https://www.weatherapi.com/my/ ) .
42+
43+ #### 2. Remote mode
44+
45+ ``` json
46+ {
47+ "mcpServers" : {
48+ "weather-mcp-server" : {
49+ "url" : " http://host:port/sse"
50+ }
51+ }
52+ }
53+ ```
3954
4055## Build from source
4156
@@ -45,6 +60,22 @@ You can use `go` to build the binary in the `cmd/github-mcp-server` directory.
4560go build -o weather-mcp-server ./cmd/weather-mcp-server
4661```
4762
63+ ## Using MCP with Docker Containers
64+
65+ #### 1. Build the Docker image:
66+
67+ ``` shell
68+ docker build -t weather-mcp-server .
69+ ```
70+
71+ #### 2. Run the Docker Container:
72+
73+ ``` shell
74+ docker run -e WEATHER_API_KEY=your-api-key -d --name weather-mcp-server -p 8000:8000 weather-mcp-server
75+ ```
76+
77+ Replace ` your-api-key ` with your actual [ WeatherAPI] ( https://www.weatherapi.com/my/ ) API key.
78+
4879## Tools
4980
5081- ** current_weather** - Gets the current weather for a city
@@ -77,4 +108,4 @@ Please follow the [contribution guidelines](.github/CONTRIBUTING.md).
77108
78109## License
79110
80- This MCP server is licensed under the MIT License.
111+ This MCP server is licensed under the [ MIT License] ( LICENSE ) .
0 commit comments