MCP Math and Web Search Examples

This repository provides local Python MCP examples for arithmetic, DuckDuckGo search and page retrieval, alongside a Groq-powered host.

Local serverstdioPython★ 1

What is the MCP Math and Web Search Examples MCP Server?

This repository provides local Python MCP examples for arithmetic, DuckDuckGo search and page retrieval, alongside a Groq-powered host.

Distinguish the host from its servers

The repository combines an assistant host with separate MCP server scripts. math_server.py implements addition and multiplication. duckduckgo_server.py implements search and page-content retrieval. The Groq integration belongs to the assistant host; these local arithmetic and web tools do not themselves require a Groq credential. The package metadata points to an upstream search package, so source-file launch commands are clearer than assuming a new package published by this repository.

Run a compatible local environment

The project requires Python 3.10 or later and uses SDK 1 FastMCP imports. Keep compatible SDK 1 dependencies or migrate the imports when installing the environment. Register each script as its own stdio server after installing its dependencies. Web search and retrieval require network access, while the arithmetic example operates locally.

Use a small reproducible check

Start with an addition whose answer you know, then search for a public page and compare the retrieved content with the page itself. A search result is a pointer to a source, not a verified answer. Keep these examples distinct from planned email or other microservices discussed in the architecture: those capabilities are not established by the two inspected server scripts.

Project documentation

Repository and setup guide

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
addAdd two numbers.
multiplyMultiply two numbers.
searchSearch through DuckDuckGo.
fetch_contentRetrieve content from a web page.

How to install the MCP Math and Web Search Examples MCP Server

{
  "mcpServers": {
    "math-example": {
      "command": "python",
      "args": [
        "/ABSOLUTE_PATH/MCP-GROQ/math_server.py"
      ]
    }
  }
}

Configuration

Python 3.10 or later, the project dependencies, compatible MCP SDK 1 imports and network access for the web-search example.

Frequently asked questions

The inspected arithmetic and DuckDuckGo server scripts do not use Groq credentials. Groq is used by the separate assistant host.