railway_openweather_mcp

guimancuso/railway_openweather_mcp

3.2

If you are the rightful owner of railway_openweather_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

OpenWeather MCP Server provides weather query tools using the OpenWeather API.

OpenWeather MCP Server

A Model Context Protocol (MCP) server that provides weather query tools using the OpenWeather API.

Features

  • get_current_temperature: Get current temperature for a city
  • get_weather_forecast: Get weather forecast for a city

Technologies

  • Python 3.11+
  • FastMCP: Framework for building MCP servers
  • UV: Modern Python package manager
  • OpenWeather API: Weather data provider

Deploy to Railway

Step 1: Repository Setup

This project comes pre-configured with:

  • Dockerfile optimized for UV
  • railway.toml with deployment settings
  • Proper .gitignore

Step 2: Configure Environment Variables in Railway

In the Railway dashboard, configure the following variables:

Required:

  • OPENWEATHER_KEY: Your OpenWeather API key

Step 3: Deploy

  1. Connect your GitHub repository to Railway
  2. Railway will automatically detect the Dockerfile
  3. Configure the environment variables
  4. Automatic deployment will begin

Step 4: Get the URL

After deployment, Railway will provide a public URL for your MCP server.

Using with MCP Clients

Configure your MCP client (such as Claude Desktop) to connect to the server:

{
  "mcpServers": {
    "openweather": {
      "url": "https://your-app.railway.app",
      "transport": "http"
    }
  }
}

OpenWeather API

To get a free API key:

  1. Visit OpenWeather
  2. Create an account
  3. Generate an API key

Project Structure

railway_openweather_mcp/
ā”œā”€ā”€ weather_mcp_server_http.py  # Main server code
ā”œā”€ā”€ pyproject.toml               # Dependencies and configuration
ā”œā”€ā”€ uv.lock                      # UV lock file
ā”œā”€ā”€ Dockerfile                   # Docker configuration
ā”œā”€ā”€ railway.toml                 # Railway configuration
ā”œā”€ā”€ .gitignore                   # Git ignored files
ā”œā”€ā”€ LICENSE                      # MIT License
└── README.md                    # This file

License

MIT - See file for details