mcp_ai
MCP - Model Context Protocol . MCP Server creation, Connecting MCP servers to the clients, config. and Local LLMs
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:
-
Initialize the project (using uv): uv init
-
Create a virtual environment: uv venv
-
Activate the virtual environment: Windows: .venv\Scripts\activate Linux/Mac: source .venv/bin/activate
-
Install the MCP CLI to enable fast MCP commands: uv add "mcp[cli]"
-
Run the MCP server in development mode: uv run mcp dev server/weather.py
-
Optional: Install the weather server into Claude Desktop for direct usage: uv run mcp install server/weather.py
-
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
MCP-Defender
Desktop app that automatically scans and blocks malicious MCP traffic in AI apps like Cursor, Claude, VS Code and Windsurf.
dynamic-shell
Dynamic Shell Command MCP Server
mcp-manager
CLI tool for managing Model Context Protocol (MCP) servers in one place & using them across them different clients
mcp-community
Easily run, deploy, and connect to MCP servers
MCP-Manager-GUI
MCP Toggle is a simple GUI tool to help you manage MCP servers across clients seamlessly.
mcpd
A ~3MB MCP daemon that exposes any script as a tool for Claude, Cursor & AI assistants