home / mcp / weather and math mcp server

Weather and Math MCP Server

MCP Server and client demo (POC)

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "durgeshmca-mcpserverpocdemo": {
      "command": "python",
      "args": [
        "weather_server.py"
      ],
      "env": {
        "GROQ_API_KEY": "YOUR_GROQ_API_KEY"
      }
    }
  }
}

You will run a local MCP server setup that demonstrates a multi-tool AI assistant. It connects tools through the Model Context Protocol (MCP), uses LangChain adapters, and simulates a weather API alongside a math tool. This architecture lets you compose intelligent interactions where an AI agent can leverage separate local tools to compute results and fetch data in a seamless chat experience.

How to use

You interact with an AI agent that can call the integrated MCP tools. Start the weather server, then run the client. The agent will use the math tool for calculations and the weather tool for weather data, providing answers that combine computation and data retrieval.

Typical usage flows include asking for mathematical results, like arithmetic expressions, and querying simulated weather for a city. The agent detects tool usage and returns step-by-step results when applicable, presenting a natural conversational experience.

Available tools

weather

Simulated weather MCP tool providing current weather data for a given location.

math

Local math MCP tool performing arithmetic and numerical computations.