mcp_server
by swapnildagade1213
Overview
This server template provides a foundation for building Model Context Protocol (MCP) servers to integrate with AI assistants and other MCP clients, offering tools for GitHub, Microsoft Graph, weather data, and JWT decoding.
Installation
uv run main.pyEnvironment Variables
- GITHUB_USERNAME
- GITHUB_TOKEN
- MICROSOFT_GRAPH_CLIENT_ID
- MICROSOFT_GRAPH_CLIENT_SECRET
- MICROSOFT_GRAPH_TENANT_ID
- OPENWEATHER_API_KEY
- MCP_DECRYPTION_SALT_DATA
- MCP_DECRYPTION_KEY_DATA
Security Notes
CRITICAL security risks found. The `mcp_demo.py` file hardcodes and heavily obfuscates Microsoft Graph API credentials (client_id, client_secret, tenant_id) directly within the source code. These obfuscated secrets are then decrypted at runtime using `saltdata` and `keydata` passed as tool parameters, which is a highly insecure practice as it means sensitive API keys are present in the codebase and their effective security relies on additional runtime parameters. An OpenWeatherMap API key is also hardcoded in `mcp_demo.py`. Additionally, several network requests across different files (e.g., `requests.get`) are made with `verify=False`, which disables SSL/TLS certificate verification and makes the application vulnerable to Man-in-the-Middle (MITM) attacks. The `decode_jwttoken` tool explicitly disables signature verification, which could lead to misuse if not handled carefully. Despite the presence of `dotenv.load_dotenv()`, critical secrets are not loaded from environment variables but are hardcoded or passed directly as parameters, indicating poor secret management.
Similar Servers
zeromcp
A minimal, pure Python Model Context Protocol (MCP) server for exposing tools, resources, and prompts via HTTP/SSE and Stdio transports.
mcp-python-starter
A feature-complete Model Context Protocol (MCP) server template in Python for developing AI applications and agents.
mcp-server-python-template
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.
mcp-go-starter
A feature-complete Model Context Protocol (MCP) server template in Go demonstrating tools, resources, and prompts for AI agent interaction.