Get the FREE Ultimate OpenClaw Setup Guide →

mcp_ai

MCP - Model Context Protocol . MCP Server creation, Connecting MCP servers to the clients, config. and Local LLMs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 264gaurav-mcp_ai python server/weather.py

How to use

This MCP server demonstrates how to create and expose a weather-focused MCP server using FastMCP for local and remote clients. It integrates with clients like Claude Desktop and Cursor, and can be used with the mcp-use tool for programmatic access to local LLMs and tools. The server is designed so that weather-related context and tooling can be requested by clients, and the MCP router will coordinate queries to the weather.py backend to fetch or compute weather data as needed. Once running, you can connect to the MCP server by configuring clients to point to the weather MCP endpoint and sending standard MCP requests. The design supports both GUI-based agents (Claude/Cursor) and headless programmatic access via mcp-use for custom toolchains.

How to install

Prerequisites:

  • Python 3.13+
  • uv package manager installed

Setup steps:

  1. Initialize the project (using uv): uv init

  2. Create a virtual environment: uv venv

  3. Activate the virtual environment: Windows: .venv\Scripts\activate Linux/Mac: source .venv/bin/activate

  4. Install the MCP CLI to enable fast MCP commands: uv add "mcp[cli]"

  5. Run the MCP server in development mode: uv run mcp dev server/weather.py

  6. Optional: Install the weather server into Claude Desktop for direct usage: uv run mcp install server/weather.py

  7. For programmatic access with local LLMs using mcp-use, install the tool and configure your weather.json as shown in the README: uv add mcp-use (Then create a weather.json with the mcpServers.weather block pointing to your local uv run command.)

Additional notes

Tips and notes:

  • Ensure your Python virtual environment is activated before running uv commands to keep dependencies isolated.
  • The weather MCP server is designed to be invoked by MCP clients like Claude Desktop or Cursor; you can also use mcp-use for direct programmatic access to the MCP server from local LLMs.
  • If you relocate the server script weather.py, update the configuration paths accordingly in your Claude/Cursor config files.
  • When running in production, consider binding the MCP proxy to a desired host/port and securing it behind appropriate access controls.
  • If you encounter issues with the CLI integration, verify that the mcp[cli] extra is installed and that uv is correctly installed on your PATH.

Related MCP Servers

Sponsor this space

Reach thousands of developers