Skip to main content
Glama
suryanshp1

Weather MCP Server

by suryanshp1
README.md
# MCP Crash Course

A simple demo of MCP python sdk.

[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/suryanshp1-mcpcrashcourse-badge.png)](https://mseep.ai/app/suryanshp1-mcpcrashcourse)

<a href="https://glama.ai/mcp/servers/@suryanshp1/mcpcrashcourse">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@suryanshp1/mcpcrashcourse/badge" alt="Weather Server MCP server" />
</a>

## uv commands

start a new project
```bash
uv init <project-name>
```

create a virtual environment
```bash
uv venv
```

activate the virtual environment
```bash
uv venv --activate
```

install the dependencies
```bash
uv add <package>
uv add -r requirements.txt
uv sync
```

run application
```bash
uv run app.py
```

run the development server
```bash
uv run dev
```

build the project
```bash
uv run build
```

Run server using MCP Inspector :

- Install MCP python sdk

```bash
uv add "mcp[cli]"
```

- Run mcp inspector

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

MCP Inspector is up and running at http://127.0.0.1:6274

Add server to claude desktop :

- run command
```bash
uv run mcp install .\server\weather.py
```
- query "what is weather alert in CA" in claude desktop

Add server to cursor :

- goto preferences > settings > mcp and copy paste claude config
```json
{
  "mcpServers": {
    "weather": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "C:\\Users\\Suraj\\Desktop\\Python\\mcp-crash-course\\mcpcrashcourse\\server\\weather.py"
      ]
    }
  }
}
```
- Then do a query in cursor chat


Directly consume server in code - using mcp-use :

- Install mcp-use

```bash
uv add mcp-use
```

- Install langchain-groq

```bash
uv add langchain-groq
```

- run client

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

TDQS

B3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is clearly defined and distinct by default.

Naming Consistency5/5

A single tool inherently follows a consistent naming pattern. The tool name 'get_alerts' uses a clear verb_noun format, which would be consistent if more tools were added.

Tool Count2/5

A single tool is too few for a weather server, as it lacks basic operations like getting current conditions, forecasts, or historical data. This severely limits the server's utility and scope.

Completeness1/5

The tool set is severely incomplete for a weather domain. It only provides alerts for US states, missing essential functions such as retrieving current weather, forecasts, or data for locations outside the US, making it inadequate for typical weather-related tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues