Github

by aitiwari

230 downloads
Not rated
GitHub

About

Provides weather alerts and forecasts using the National Weather Service API.

Details

Author
aitiwari
Downloads
230
Categories
Other, Media

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Github
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

{
  "mcpServers": {
    "github": {
      "command": "uv",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "mcp/github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "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"
      }
    }
  }
}

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "github": {
            "github": {
                "command": "uv",
                "args": [
                    "run",
                    "-i",
                    "--rm",
                    "-e",
                    "GITHUB_PERSONAL_ACCESS_TOKEN",
                    "mcp/github"
                ],
                "env": {
                    "GITHUB_PERSONAL_ACCESS_TOKEN": "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"
                }
            }
        }
    }
}

McpServers

{
    "github": {
        "command": "uv",
        "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "GITHUB_PERSONAL_ACCESS_TOKEN",
            "mcp/github"
        ],
        "env": {
            "GITHUB_PERSONAL_ACCESS_TOKEN": "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"
        }
    }
}

🚀 Why Is Everyone – Suddenly! – Obsessed With MCP/Servers? (Spoiler: It’s Redefining AI Orchestration)

Model Context Protocol (MCP) is an open standard developed by Anthropic in late 2024 to address a critical challenge in AI integration: connecting AI assistants with real-world data sources and systems[1][3]. MCP serves as a standardized interface for AI models to interact with external tools, databases, and APIs, similar to how USB-C functions as a universal port for devices[4][7].
-

Standardized Integration:MCP eliminates the need for custom integrations, allowing developers to connect AI models to various data sources using a single protocol.

Dynamic Discovery:AI agents can automatically detect and utilize available MCP servers and their capabilities without hard-coded integration.

Enhanced Security:MCP enables developers to implement security measures within servers, ensuring AI agents only access permitted data or actions.

Flexibility:The protocol is model-agnostic, allowing any AI model (e.g., Claude, GPT-4, open-source LLMs) to use MCP-enabled tools.

Ecosystem Growth:Since its introduction, MCP has gained significant traction, with over 1,000 community-built MCP servers available by February 2025.

MCP is transforming the AI landscape by:
-

Simplifying Integration:Reducing the complexity of connecting AI models to external systems from an "N×M" problem to an "N+M" problem.

Enabling Complex Workflows:Facilitating multi-step, cross-system operations for AI agents, such as event planning that involves multiple platforms.

Fostering Collaboration:Providing a shared workspace for multi-agent systems, allowing specialized AI agents to coordinate tasks efficiently.

Enhancing Personalization:Enabling secure integration of personal AI assistants with users' data and applications.

Improving Enterprise Governance:Standardizing AI access to internal tools and enabling better monitoring and control of AI interactions.

As of March 2025, MCP has become a significant topic in the AI community, with many viewing it as a crucial component for developing more integrated and context-aware AI systems. Its open nature and backing by a major AI player have contributed to its rapid adoption and evolution, positioning MCP as a potential de facto standard for AI-world integration.

Model Context Protocol (MCP) - weather quick start :

This document provides a comprehensive guide to building a simple Model Context Protocol (MCP) weather server and connecting it to a host, Claude for Desktop. The server exposes two tools:get-alertsandget-forecast, which fetch weather alerts and forecasts using the National Weather Service API.
- Introduction
-
Prerequisites
-
System Requirements
-
Setup
-
Building the Server

- Importing Packages and Setting Up the Instance
-
Helper Functions
-
Implementing Tool Execution
-
Running the Server

This guide walks you through creating an MCP server to enhance LLMs (like Claude) with real-time weather data. The server utilizes the MCP framework to expose tools for fetching weather alerts and forecasts, addressing the LLM's lack of native environmental awareness.

- Familiarity with Python
- Understanding of LLMs like Claude

- Python 3.10 or higher
- MCP SDK 1.2.0 or higher

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
curl -LsSf https://astral.sh/uv/install.sh | sh

Restart your terminal to ensure theuvcommand is recognized.

window(cd to your dev repo_path run below command in powershell/..)

# Create a new directory for our project uv init weather cd weather # Create virtual environment and activate it uv venv .venv\Scripts\activate # Install dependencies uv add mcp[cli] httpx # Create our server file new-item weather.py
# Create a new directory for our project uv init weather cd weather # Create virtual environment and activate it uv venv source .venv/bin/activate # Install dependencies uv add "mcp[cli]" httpx # Create our server file touch weather.py

Importing Packages and Setting Up the Instance

Add the following code to the top of yourweather.pyfile:

from typing import Any import httpx from mcp.server.fastmcp import FastMCP # Initialize FastMCP server mcp = FastMCP("weather") # Constants NWS_API_BASE = "https://api.weather.gov" USER_AGENT = "weather-app/1.0" #helper function async def make_nws_request(url: str) -> dict[str, Any] | None: """Make a request to the NWS API with proper error handling.""" headers = { "User-Agent": USER_AGENT, "Accept": "application/geo+json" } async with httpx.AsyncClient() as client: try: response = await client.get(url, headers=headers, timeout=30.0) response.raise_for_status() return response.json() except Exception: return None def format_alert(feature: dict) -> str: """Format an alert feature into a readable string.""" props = feature["properties"] return f""" Event: {props.get('event', 'Unknown')} Area: {props.get('areaDesc', 'Unknown')} Severity: {props.get('severity', 'Unknown')} Description: {props.get('description', 'No description available')} Instructions: {props.get('instruction', 'No specific instructions provided')} """ @mcp.tool() async def get_alerts(state: str) -> str: """Get weather alerts for a US state. Args: state: Two-letter US state code (e.g. CA, NY) """ url = f"{NWS_API_BASE}/alerts/active/area/{state}" data = await make_nws_request(url) if not data or "features" not in data: return "Unable to fetch alerts or no alerts found." if not data["features"]: return "No active alerts for this state." alerts = [format_alert(feature) for feature in data["features"]] return "\n---\n".join(alerts) @mcp.tool() async def get_forecast(latitude: float, longitude: float) -> str: """Get weather forecast for a location. Args: latitude: Latitude of the location longitude: Longitude of the location """ # First get the forecast grid endpoint points_url = f"{NWS_API_BASE}/points/{latitude},{longitude}" points_data = await make_nws_request(points_url) if not points_data: return "Unable to fetch forecast data for this location." # Get the forecast URL from the points response forecast_url = points_data["properties"]["forecast"] forecast_data = await make_nws_request(forecast_url) if not forecast_data: return "Unable to fetch detailed forecast." # Format the periods into a readable forecast periods = forecast_data["properties"]["periods"] forecasts = [] for period in periods[:5]: # Only show next 5 periods forecast = f""" {period['name']}: Temperature: {period['temperature']}°{period['temperatureUnit']} Wind: {period['windSpeed']} {period['windDirection']} Forecast: {period['detailedForecast']} """ forecasts.append(forecast) return "\n---\n".join(forecasts) if __name__ == "__main__": # Initialize and run the server mcp.run(transport='stdio')

Testing Your Server with Claude for Desktop

- Install/Update Claude for Desktop:Ensure you have the latest version installed. - Configure MCP Servers:Open or create the configuration file at~/Library/Application Support/Claude/claude_desktop_config.json.
{ "mcpServers": { "weather": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather",# S:\\Dev\\weather "run", "weather.py" ] } } }

Replace/ABSOLUTE/PATH/TO/PARENT/FOLDER/weatherwith the correct absolute path to your project directory. You may need to provide the full path to theuvexecutable in thecommandfield (usewhich uvon MacOS/Linux orwhere uvon Windows to find it).
- Verify Tool Detection:Look for the hammer icon in Claude for Desktop. Clicking it should list theget_alertsandget_forecasttools.

- "What’s the weather in Sacramento?" - "What are the active weather alerts in Texas?" Note: These queries work for US locations only, as they use the US National Weather Service.

- The client sends your question to Claude.
- Claude analyzes available tools and decides which to use.
- The client executes the chosen tool(s) through the MCP server.
- Results are sent back to Claude.
- Claude formulates and displays a natural language response.

- mcp.log: General MCP connections and failures.
- mcp-server-SERVERNAME.log: Error logs from the named server.

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

- Checkclaude_desktop_config.jsonfile syntax.
- Ensure the project path is absolute.
- Restart Claude for Desktop completely.

- Check Claude’s logs for errors.
- Verify your server builds and runs without errors.
- Try restarting Claude for Desktop.

Error: Failed to retrieve grid point data

- Coordinates outside the US
- NWS API issues
- Rate limiting

- Verify US coordinates
- Add a small delay between requests
- Check theNWS API status page

- No current weather alerts for that state. Try a different state.

For more advanced troubleshooting, check out theDebugging MCP guide.

npx @modelcontextprotocol/inspector uv run weather.py

Get water temperature and swimming conditions for the Aare river in Switzerland.

Global pollen forecasts for any city or coordinate, with per-species values for multiple plants and a multiple day outlook.

Provides advanced Formula 1 data analysis, including real-time telemetry, tire performance, weather prediction, and race strategy simulation.

Provides weather data using the Open-Meteo API.

Real-time surf, trails, volcano, ocean safety, weather, and restaurants for all Hawaiian islands — built for AI agents.

Free, keyless MCP server for open data of 84 German cities: weather and DWD warnings, air quality, transit, traffic, water levels, energy/SMARD. 38 tools, Apache-2.0.

Access meteorological data for Portugal from the IPMA public API using natural language.

Provides live images, time-lapse videos, and current weather updates for Jade Dragon Snow Mountain.

Provides accurate Islamic prayer times for locations throughout Malaysia using the waktusolat.app API.

A collection of MCP servers for Cursor IDE, including demo and weather services.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.