Back to Home
NanthagopalEswaran icon

Gemini-MCP-Integration

by NanthagopalEswaran

Overview

A simple MCP server exposing calculator, file read, and file write tools for interaction with the Gemini CLI agent.

Installation

Run Command
poetry run python src/server.py

Environment Variables

  • MCP_PROXY_AUTH_TOKEN

Security Notes

The `handle_calculator` function uses `eval()`, which is an inherent security risk. While an empty `__builtins__` dictionary is passed to `eval`, it does not fully mitigate all potential code injection vectors, especially if the input expression is crafted maliciously. The `handle_file_read` and `handle_file_write` functions directly use the `path` parameter provided by the agent. This introduces a critical path traversal vulnerability, allowing an attacker to read from or write to arbitrary files on the system that the server process has permissions for. This could lead to information disclosure, data corruption, or arbitrary code execution by overwriting critical system files or injecting malicious scripts.

Similar Servers

Stats

Interest Score0
Security Score2
Cost ClassLow
Stars0
Forks0
Last Update2025-11-23

Tags

MCPGeminiToolsCalculatorFile I/O