SecureOps MCP
A secure, modular MCP server for file operations and code review using Gemini.
README
SecureOps MCP: Modular File Operations & Code Review Server
SecureOps MCP is a secure, modular Model Context Protocol (MCP) implementation built using the FastMCP Python framework. The project exposes secure file manipulation tools, directory/file resources, and code-analysis prompt templates. It includes a decoupled client CLI orchestrating a Gemini 2.5 Flash agent capable of performing autonomous tool-use loops.
Key Features
- Autonomous Tools:
write_file: Dynamically creates parent folders and writes files usingutf-8encoding (with real-time progress logging).delete_file: Safely deletes files from the project directory, with explicit type checking.
- Local Resources:
dir://.: Lists the entire workspace structure along with file metadata (size, last modified).file:///{file_name}: Directly reads file contents via the standard URI scheme.
- Prompt Templates:
code_review: Automatically extracts and packages source code files into structured prompts for comprehensive quality reviews.documentation_generator: Generates technical documentation prompts for target source files.
- Path Traversal Security:
- Every file operation is validated through a secure path resolver that restricts reads, writes, and deletions to the base workspace directory.
- Decoupled Architecture:
- Separates the technical stdio communication layer (
MCPClient) from the LLM cognitive layer (GeminiAgent), enabling clean modular testing.
- Separates the technical stdio communication layer (
Installation & Setup
- Create and Activate Virtual Environment:
python -m venv .venv .venv\Scripts\activate - Install Dependencies:
pip install -r requirements.txt - Configure API Key:
Create a file named
.envin the root folder and add your Gemini API key:GEMINI_API_KEY=your_actual_gemini_api_key_here
1. Running via the Interactive CLI Client (With LLM Logic)
To converse with the model, perform code reviews, or generate documentation using the actual Gemini 2.5 Flash model, you must run the client CLI.
Run Command:
.venv\Scripts\python.exe -m mcp_client.main mcp_server/main.py
Menu Options & Example Testing Inputs:
Option 1: Generate Documentation
- Selection:
1 - Input (
file_path):mcp_server/utils.py - Input (
doc_name):utils_docs.md - What happens: The server packages
utils.pyinto a template. Gemini generates a markdown documentation file and writes it to disk. - Progress Screenshot:

Option 2: Review Code
- Selection:
2 - Input (
file_path):mcp_server/utils.py - What happens: Gemini performs a deep code-review of the path security helper and lists findings directly in your terminal.
- Code Review Output Screenshots:

Option 3: Read File
- Selection:
3 - Input (
file_path):requirements.txt - What happens: The client directly queries the server's resource handler to load and print the file.
Option 4: Read Current Directory
- Selection:
4 - What happens: Prints a formatted terminal table showing all directories and files in your workspace.
Option 5: Converse with Agent (Autonomous Tool Use)
- Selection:
5 - Input Query:
Delete utils_docs.md please - What happens: Gemini reads your text, identifies that it needs to run a tool, calls
delete_fileon the MCP server, and prints the result. - Tool Execution Screenshot:

2. Running via the FastMCP Web Inspector (Interface Testing)
The MCP Inspector is a browser-based developer dashboard used to test and validate your server's exposed tools, resources, and prompts in isolation.
[!IMPORTANT] No LLM Responses in the Inspector: The web interface only tests that the MCP server's schemas are correct and compiles prompts successfully. To see the actual AI-generated responses, you must run it via the CLI client (Method 1).
Run Command:
.venv\Scripts\fastmcp dev mcp_server/main.py
This command starts the local dev server and prints a URL (e.g., http://localhost:5173).
Configuration in the Browser:
In the left pane, set up the connection parameters:
- Command:
.venv\Scripts\fastmcp.exe(or your absolute path to the executable) - Arguments:
run mcp_server/main.py --no-banner - Click the Connect button.
How to Test Features in the Web UI:
-
Tools Tab: Select
write_file, enter a path (e.g.,test.txt) and content, then click Run to execute the local file write. -
Resources Tab: Click
list_files_resource(dir://.) orread_file_resourceto view raw JSON listings and text from the local folder. -
Prompts Tab: Select
code_review, enter a path (e.g.,mcp_server/utils.py), and click Run to see the fully compiled prompt template including your source code. -
Interface Screenshot:

Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.