calculator-mcp-server

jojo5716/calculator-mcp-server

3.1

If you are the rightful owner of calculator-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Weather MCP Server is a Python-based server template that provides mock weather information and serves as a scaffold for creating custom MCP servers.

Tools
1
Resources
0
Prompts
0

Weather MCP Server

This is a sample MCP Server in Python implementing weather tools with mock responses. It can be used as a scaffold for your own MCP Server. It includes the following features:

  • Weather Tool: A tool that provides mocked weather information based on the given location.
  • Connect to Agent Builder: A feature that allows you to connect the MCP server to the Agent Builder for testing and debugging.
  • Debug in MCP Inspector: A feature that allows you to debug the MCP Server using the MCP Inspector.

Get started with the Weather MCP Server template

Prerequisites

To run the MCP Server in your local dev machine, you will need:

Prepare environment

There are two approaches to set up the environment for this project. You can choose either one based on your preference.

Note: Reload VSCode or terminal to ensure the virtual environment python is used after creating the virtual environment.

ApproachSteps
Using uv1. Create virtual environment: uv venv
2. Run VSCode Command "Python: Select Interpreter" and select the python from created virtual environment
3. Install dependencies (include dev dependencies): uv pip install -r pyproject.toml --extra dev
Using pip1. Create virtual environment: python -m venv .venv
2. Run VSCode Command "Python: Select Interpreter" and select the python from created virtual environment
3. Install dependencies (include dev dependencies): pip install -e .[dev]

After setting up the environment, you can run the server in your local dev machine via Agent Builder as the MCP Client to get started:

  1. Open VS Code Debug panel. Select Debug in Agent Builder or press F5 to start debugging the MCP server.
  2. Use AI Toolkit Agent Builder to test the server with . Server will be auto-connected to the Agent Builder.
  3. Click Run to test the server with the prompt.

Congratulations! You have successfully run the Weather MCP Server in your local dev machine via Agent Builder as the MCP Client. DebugMCP

What's included in the template

Folder / FileContents
.vscodeVSCode files for debugging
.aitkConfigurations for AI Toolkit
srcThe source code for the weather mcp server

How to debug the Weather MCP Server

Notes:

  • MCP Inspector is a visual developer tool for testing and debugging MCP servers.
  • All debugging modes support breakpoints, so you can add breakpoints to the tool implementation code.
Debug ModeDescriptionSteps to debug
Agent BuilderDebug the MCP server in the Agent Builder via AI Toolkit.1. Open VS Code Debug panel. Select Debug in Agent Builder and press F5 to start debugging the MCP server.
2. Use AI Toolkit Agent Builder to test the server with . Server will be auto-connected to the Agent Builder.
3. Click Run to test the server with the prompt.
MCP InspectorDebug the MCP server using the MCP Inspector.1. Install Node.js
2. Set up Inspector: cd inspector && npm install
3. Open VS Code Debug panel. Select Debug SSE in Inspector (Edge) or Debug SSE in Inspector (Chrome). Press F5 to start debugging.
4. When MCP Inspector launches in the browser, click the Connect button to connect this MCP server.
5. Then you can List Tools, select a tool, input parameters, and Run Tool to debug your server code.

Default Ports and customizations

Debug ModePortsDefinitionsCustomizationsNote
Agent Builder3001Edit , , , to change above ports.N/A
MCP Inspector3001 (Server); 5173 and 3000 (Inspector)Edit , , , to change above ports.N/A

Feedback

If you have any feedback or suggestions for this template, please open an issue on the AI Toolkit GitHub repository