
mcp calculator
一个基于 Model Context Protocol (MCP) 的简单计算器项目。
Repository Info
About This Server
一个基于 Model Context Protocol (MCP) 的简单计算器项目。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Calculator
This is a simple calculator project, intended to be used with the Model Context Protocol (MCP).
Description
This project contains a basic Python application.
main.py: The main entry point of the application. Currently, it prints a "Hello" message.server.py: Potentially for an MCP server implementation (currently empty or basic).pyproject.toml: Project metadata and dependencies, managed by tools like Poetry or Hatch.uv.lock: A lock file generated byuv, a fast Python package installer and resolver..gitignore: Specifies intentionally untracked files that Git should ignore.
Getting Started
Prerequisites
- Python 3.x
uv(orpip) for package management
Installation & Running
-
Clone the repository (if applicable):
git clone <repository-url> cd mcp-calulator -
Install dependencies (if any are added to
pyproject.toml): Usinguv:uv pip install -r requirements.txt # or if using a virtual environment managed by uv uv venv uv pip syncUsing
pip(ensure you have a virtual environment activated):python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate` pip install -r requirements.txt # (Create requirements.txt if needed from pyproject.toml) -
Run the main application:
python main.py -
Run the MCP Server (
server.py):-
Development Mode: To run the MCP server locally for development or testing, execute:
uv run mcp dev server.pyYou might need to set up environment variables if your server requires them (e.g., API keys).
-
Production/Integrated Mode (via MCP Client): When integrated with an MCP client (like the VS Code extension or Claude Desktop app), the client will typically start the server based on its configuration. An example configuration in the MCP settings file (
cline_mcp_settings.jsonorclaude_desktop_config.json) might look like this:{ "mcpServers": { "mcp-calculator-server": { "command": "uv", "args": ["run", "--with", "mcp", "mcp", "run", "server.py"], "env": { "YOUR_ENV_VARIABLE": "value" } } } }The MCP client uses this configuration to launch
server.py. Ensure the path inargsis correct and any required environment variables are specified inenv.
-
Usage
MCP Server (server.py):
The server.py is intended to expose tools and resources according to the Model Context Protocol. Its specific usage will depend on the tools and resources implemented within it.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Quick Start
Clone the repository
git clone https://github.com/patelpreet422/mcp-calculatorInstall dependencies
cd mcp-calculator
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.