proxy-python is a Model Context Protocol (MCP) server written in Python. It provides system utility tools to MCP clients (like Gemini) using the Streaming HTTP transport.
This project allows LLMs to safely query local system information such as CPU usage, memory statistics, and disk space.
- MCP Transports: Supports Streaming HTTP (default), SSE, and Stdio transports.
- Modern Python: Built with Python 3.11+ and the official
mcpSDK usingFastMCP. - Direct CLI Mode: Can be run directly from the command line for quick reports.
The server exposes the following MCP tools:
-
local_system_info: Generates a comprehensive system report.- System Name, OS Name, Hostname
- CPU Core Count
- Memory Usage (Total, Used, Swap)
- Network Interface Statistics (RX/TX bytes and MAC addresses)
-
disk_usage: Lists usage statistics for all mounted disks.- Mount Point, File System
- Used/Total Space
- Percentage Used
- Python 3.11+
make(optional, for convenience)
Clone the repository and install dependencies:
make installThis project is configured for use with the Gemini CLI. The configuration is located in .gemini/settings.json.
{
"mcpServers": {
"proxy-python": {
"url": "http://localhost:8080/mcp"
}
}
}You can run the tools directly without an MCP client:
System Info:
make info
# OR
python3 main.py infoDisk Usage:
make disk
# OR
python3 main.py diskTo start the server manually with the default (HTTP) transport:
make run
# OR
python3 main.pyTo use SSE transport:
MCP_TRANSPORT=sse PORT=8080 python3 main.pyTo use Stdio transport:
MCP_TRANSPORT=stdio python3 main.pyThis project includes a Dockerfile and cloudbuild.yaml for easy deployment to Google Cloud Run.
-
Build and Deploy:
make deploy
This command uses Google Cloud Build to build the container image and deploy it to Cloud Run.
-
Service Configuration: The default service name is
sysutils-proxy-python(as defined incloudbuild.yaml). It deploys tous-central1by default.
- Lint:
make lint - Format:
make fmt - Test:
make test - Clean:
make clean