mcp-calculator

adiralashiva8/mcp-calculator

3.1

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

Model Context Protocol (MCP) is a framework designed to facilitate communication between different components of a software system, particularly focusing on language model interactions.

Create folder

mcp-calculator

Create virtual environment

python -m virtualenv env

Switch to virtual env

env\scripts\activate

Install mcp

pip install mcp mcp[cli]

Develop script

calculator.py

Create mcp.json in workspace .vscode\mcp.json

{
  "servers": {
    "calculator": {
      "type": "stdio",
      "command": "${workspaceFolder}/env/Scripts/python.exe",
      "args": ["${workspaceFolder}/calculator.py"]
    }
  }
}

Start mcp from mcp.json file

Observe calculator mcp-serve now recognized in vscode tool