An open API service indexing awesome lists of open source software.

https://github.com/ryands17/weather-mcp

A basic MCP server to fetch the weather for a given location
https://github.com/ryands17/weather-mcp

claude-code gemini-cli mcp-server

Last synced: 10 months ago
JSON representation

A basic MCP server to fetch the weather for a given location

Awesome Lists containing this project

README

          

# weather-mcp

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run index.ts
```

This is an [MCP](https://modelcontextprotocol.io/introduction) server for fetching the current weather using an [Open Weather API](https://openweathermap.org/api). This is a simple example to learn how to configure and use MCP servers.

To configure this for Claude Code or Gemini CLI, add the following to their configuration:

```json
{
"mcpServers": {
"weather": {
"command": "bun",
"args": ["run", "/weather-mcp/index.ts"],
"env": {
"WEATHER_API_KEY": ""
}
}
}
}
```

Then listing the mcp servers should show the tools available