mcp-server-py-template
Verified Safeby FeiCoder
Overview
A Python MCP (Model Context Protocol) server providing current time functionality via HTTP or Stdio.
Installation
uv run mcp-serverSecurity Notes
The server implements a simple JSON-RPC style protocol with predefined methods (`initialize`, `tools/list`, `tools/call`). The `tools/call` method specifically checks for a 'get_current_time' tool, preventing arbitrary code execution. Inputs are parsed as JSON, and no 'eval' or similar dangerous functions are used. The server binds to `0.0.0.0`, which is standard but requires external firewalling for production environments to restrict access if needed. Overall, the limited functionality and clear input handling make it relatively secure for its purpose.
Similar Servers
python-mcp-server
This project implements a Model Context Protocol (MCP) server providing weather information tools (alerts and forecasts) via Server-Sent Events (SSE), demonstrating how AI agents can interact with external services.
mcp-time-server
A minimal Model Context Protocol (MCP) server that exposes a 'get_current_time' tool, returning the current system time.
TimeMCP
Provides a Model Control Protocol (MCP) server for current time retrieval and timezone conversions.
mcp-tool-tingz
A Python toolkit for building Model Context Protocol (MCP) servers, allowing exposure of custom tools via JSON-RPC 2.0 over WebSocket or stdio.