Back to Home
Mandapati-SuryanarayanaRaju icon

Sample-MCP-client-and-Server

Verified Safe

by Mandapati-SuryanarayanaRaju

Overview

A minimal example of an MCP (Model Context Protocol) server and client demonstrating basic tool exposure and invocation.

Installation

Run Command
python hello.py

Security 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

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens30
Stars0
Forks0
Last Update2025-12-02

Tags

MCPserverclientPythonprotocoltool