Skip to main content
Glama
README.md
# mcpapp1 — Weather MCP Server

A small [Model Context Protocol](https://modelcontextprotocol.io) server that exposes live US weather alerts to MCP clients such as Claude Desktop, Claude Code, and Cursor.

Data comes from the [National Weather Service API](https://api.weather.gov), which is free and requires no API key.

## What it exposes

| Kind | Name | Description |
| --- | --- | --- |
| Tool | `get_alerts(state)` | Active weather alerts for a US state, by two-letter code (e.g. `CA`, `NY`) |
| Resource | `echo://{message}` | Echoes a message back; useful for verifying the server is reachable |

## Requirements

- Python 3.13+
- [uv](https://docs.astral.sh/uv/)

## Setup

```bash
git clone https://github.com/eyosiasbisrat/mcpapp1.git
cd mcpapp1
uv sync
```

## Running

Run the server directly over stdio:

```bash
uv run server/weather.py
```

Or via the MCP CLI:

```bash
uv run mcp run server/weather.py
```

Inspect it interactively in the MCP Inspector:

```bash
uv run mcp dev server/weather.py
```

An MCP server speaks JSON-RPC over stdin/stdout, so running it by hand just waits silently for input. That is expected — normally a client launches it for you.

## Connecting a client

### Claude Code / Cursor

Both configs are already checked in and use relative paths, so they work after `uv sync` with no edits:

- [.mcp.json](.mcp.json) — Claude Code
- [.cursor/mcp.json](.cursor/mcp.json) — Cursor

Reload the editor window and approve the server when prompted.

### Claude Desktop

```bash
uv run mcp install server/weather.py
```

Then quit Claude Desktop completely — including the tray icon, since closing the window leaves it running — and reopen it.

If this prints `Claude app not found` while Claude Desktop is definitely installed, see below.

## Troubleshooting

### `Claude app not found` on Windows

`mcp install` looks for Claude Desktop's config in a fixed location:

```
%APPDATA%\Claude
```

If Claude Desktop was installed as an **MSIX / Microsoft Store** package, its data is redirected into the package container and that directory never exists:

```
%LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude\claude_desktop_config.json
```

Two ways to resolve it.

**Edit the real config directly** — add an `mcpServers` entry to the `claude_desktop_config.json` at the packaged path above, keeping any existing keys intact.

**Or bridge the paths once** with a directory junction, after which `mcp install` works normally for every server:

```powershell
cmd /c mklink /J "%APPDATA%\Claude" "%LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude"
```

Substitute your actual package folder name for `Claude_<id>`. To undo it, `cmd /c rmdir "%APPDATA%\Claude"` removes only the link, not the config.

When registering the server manually on Windows, use uv's **absolute** path (e.g. `C:\Users\<you>\.local\bin\uv.exe`). Packaged apps do not reliably inherit your shell `PATH`, so a bare `uv` may fail to launch.

### Verifying the server is actually loaded

Confirm the client spawned it by checking process parentage:

```powershell
Get-CimInstance Win32_Process -Filter "Name='uv.exe'" | ForEach-Object {
  $p = Get-CimInstance Win32_Process -Filter "ProcessId=$($_.ParentProcessId)"
  "$($_.ProcessId) <- $($p.Name)"
}
```

A `uv.exe` whose parent is `Claude.exe` means the server is running. Note that some Claude Desktop builds do not write per-server logs to `logs\`, so an empty log folder is not evidence of failure.

## Project layout

```
server/weather.py     the MCP server: tool, resource, and NWS client
main.py               placeholder entrypoint
.mcp.json             Claude Code server config
.cursor/mcp.json      Cursor server config
pyproject.toml        dependencies (httpx, mcp[cli])
```

## Notes

- `get_alerts` covers US states only, since NWS is a US agency.
- Requests carry a `User-Agent` header, which the NWS API requires.
- Network and HTTP errors are swallowed and surface as a friendly "unable to fetch" message rather than a traceback.

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or misselection. The tool's purpose is clearly defined in its name and description.

Naming Consistency5/5

The single tool name follows the verb_noun pattern (get_alerts), which is clean and predictable. There are no other tools to create inconsistency.

Tool Count3/5

One tool feels thin for a server, even one dedicated to weather alerts. While alerts retrieval is a focused task, a small set of supporting tools (e.g., list states or get alert details) would make the server feel more complete.

Completeness5/5

For the stated purpose of retrieving weather alerts, the get_alerts tool covers the core operation without obvious gaps. The domain is narrow, and no additional lifecycle operations are necessary for read-only alert access.

Maintenance

ActivityMaintained
ResponsivenessNo issues