home / mcp / weather mcp server
MCP - Model Context Protocol . MCP Server creation, Connecting MCP servers to the clients, config. and Local LLMs
Configuration
View docs{
"mcpServers": {
"264gaurav-mcp_ai": {
"command": "C:\\\\Users\\\\gaura\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python313\\\\Scripts\\\\uv.EXE",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\\\Users\\\\gaura\\\\OneDrive\\\\Desktop\\\\AI projects\\\\mcp_project\\\\server\\\\weather.py"
]
}
}
}You can create an MCP weather server that exposes its capabilities to various clients (like Claude Desktop or Cursor) and connect local LLMs for programmatic tool access. This enables you to run the weather logic locally, share results with clients, and orchestrate MCP-powered tools from your own workflows.
You connect to the MCP weather server from your client or local tooling to query weather data and alerts. The weather server runs as a local process and exposes an interface that clients can call to obtain weather information or trigger related actions. You can use it with Claude Desktop, Cursor, or via programmatic calls from local LLMs using the mcp-use flow.
Prerequisites: install Python 3.13 or newer and ensure the uv package manager is available on your system.
Step 1: Initialize a new project with the uv tool.
uv initStep 2: Create a virtual environment for your project.
uv venvStep 3: Activate the virtual environment.
# Windows
.venv\Scripts\activate
# Linux/Mac
source .venv/bin/activateStep 4: Install the MCP CLI to enable fast MCP CLI commands.
uv add "mcp[cli]"For Claude Desktop integration, you can install the weather server to Claude as shown here. This registers the weather server with Claude so you can ask questions like “What are the weather alerts in CA?” and have the MCP server respond with current data.
uv run mcp install server/weather.pyExpected output when installation succeeds:
Added server 'weather' to Claude config
Successfully installed weather in Claude appIf you use Cursor or another client, manually configure the server using the Claude Desktop config file format. Use the following example configuration as a guide. Update the file paths to match your system.
"weather": {
"command": "C:\\Users\\gaura\\AppData\\Local\\Programs\\Python\\Python313\\Scripts\\uv.EXE",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\gaura\\OneDrive\\Desktop\\AI projects\\mcp_project\\server\\weather.py"
]
}
```
Note: Update the paths in the configuration to match your system paths.The mcp-use flow lets you connect to MCP servers directly without an AI agent, enabling programmatic tool access from local LLMs.
Installation and configuration steps are shown here to connect the weather MCP server.
uv add mcp-useCreate a configuration file named weather.json to connect local LLMs to the MCP weather server. Use the exact structure shown below and adjust paths to your environment.
{
"mcpServers": {
"weather": {
"command": "C:\\Users\\gaura\\AppData\\Local\\Programs\\Python\\Python313\\Scripts\\uv.EXE",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\gaura\\OneDrive\\Desktop\\AI projects\\mcp_project\\server\\weather.py"
]
}
}
}
```
Note: Update the paths in the configuration to match your system paths.When you start the server in development mode, you can observe the startup logs to confirm the proxy is listening locally, for example on localhost:6277.
CLI to create, run, and manage MCP servers and connections across clients such as Claude Desktop and Cursor.
Directly connect to MCP servers from local LLMs for programmatic tool access.