Back to Home
Cris-0k icon

mcp-server-python-template

Verified Safe

by Cris-0k

Overview

This server acts as a template for building Model Context Protocol (MCP) servers in Python, specifically demonstrating how to expose weather-related tools (get_alerts, get_forecast) by integrating with an external API (National Weather Service) to provide context and actions for AI models.

Installation

Run Command
uv run server.py --transport stdio

Security Notes

The server interacts with an external API (api.weather.gov). While 'httpx' is generally safe for making HTTP calls, any external interaction always carries inherent risks (e.g., API compromise, data integrity). The input parameters for tools (state, latitude, longitude) are expected to be validated by the FastMCP framework's type hinting, mitigating basic injection risks. There are no 'eval' or direct 'subprocess.run' calls without sanitization. No hardcoded sensitive API keys are present for this specific weather API (which is public). The use of 'request._send' in 'create_starlette_app' is a private API access in Starlette, which is not a security vulnerability but can lead to fragility.

Similar Servers

Stats

Interest Score38
Security Score8
Cost ClassLow
Avg Tokens150
Stars12
Forks7
Last Update2025-12-15

Tags

mcp-serverpythonai-assisted-developmentweather-apillm-integration