This project is a simple MCP (Model Context Protocol) server for basic math operations.
- Python 3.12+
- uv (for running the server)
- Clone the repository:
git clone https://github.com/michael-capner/math-mcp.git cd math-mcp - Install dependencies:
Or, if using
uv pip install -r requirements.txt
pyproject.toml:uv pip install -e .
You can start the MCP server using the following command:
uv --directory /workspaces/math-mcp run server.pyOr use the configuration in .vscode/mcp.json for integration with MCP tools.
The MCP server is configured in .vscode/mcp.json as follows:
{
"servers": {
"math-mcp": {
"command": "uv",
"args": [
"--directory",
"/workspaces/math-mcp",
"run",
"server.py"
]
}
},
"inputs": []
}You can use the following prompts with math-mcp:
add 1 plus 2
subtract 5 minus 3
multiply 2 and 3
divide 6 by 2
server.py: Main MCP server implementationpyproject.toml: Project metadata and dependenciesuv.lock: Dependency lock file.vscode/mcp.json: MCP server configuration
MIT