MCP-Server
Verified Safeby godson2607
Overview
Provides examples of Minimal Context Protocol (MCP) servers in Python for basic arithmetic operations and RSS feed searching, demonstrating different transport mechanisms (STDIO, HTTP) and FastAPI integration.
Installation
python MCP/Scenerio2/fastapi_mcp_calculator.pySecurity Notes
The code primarily uses well-established libraries (`fastmcp`, `fastapi`, `feedparser`). Arithmetic operations correctly handle division by zero. RSS parsing relies on `feedparser`, which is generally robust, but fetching external content always carries inherent risks. No direct `eval()` or similar dangerous functions, no obvious injection vulnerabilities, and no hardcoded secrets were found. HTTP examples bind to `localhost` by default, which is safe for development; the README provides good advice regarding `0.0.0.0` binding for external access.
Similar Servers
mcp_calculator
A beginner-friendly Model Context Protocol (MCP) server exposing a simple calculator tool (add, subtract, multiply, divide) over WebSocket using FastAPI.
mcp-server-demo
This server acts as an AI assistant tool provider (MCP server) offering calculator functions, data logging, and reporting capabilities via SQLite, demonstrating how AI can interact with external services.
remote-mcp-server
A remote Model Context Protocol (MCP) server for tracking personal expenses, providing tools to add, list, and summarize financial data.
mcp-math-server
A minimal Model Context Protocol (MCP) server designed to expose basic mathematical tools to AI models.