Sample-MCP-client-and-Server
Verified Safeby Mandapati-SuryanarayanaRaju
Overview
A minimal example of an MCP (Model Context Protocol) server and client demonstrating basic tool exposure and invocation.
Installation
python hello.pySecurity Notes
The client uses `StdioServerParameters` to launch the server as a subprocess. In this sample, the command (`uv run hello.py`) is hardcoded and points to a known, benign local script, making it safe. However, in a real application, if `command` or `args` were derived from untrusted user input, it could lead to arbitrary code execution. No other significant security risks like hardcoded secrets, 'eval', or network vulnerabilities were found in the provided code.
Similar Servers
zeromcp
A minimal, pure Python Model Context Protocol (MCP) server for exposing tools, resources, and prompts via HTTP/SSE and Stdio transports.
fastestmcp
Framework and CLI tool for rapidly generating and developing modular MCP (Model Context Protocol) servers and clients, with capabilities for API integration, code generation, and component-based development.
mcp-basics
A minimal example of building an MCP client and server in Python for connecting AI models to external tools and data, demonstrating AI agent capabilities.
mcp-browse-me
A simple Model Context Protocol (MCP) 'Hello World' application demonstrating basic client-server communication with an AI agent capable of using tools and maintaining state.