Back to Home
pankajshakya627 icon

File-MCP-server

Verified Safe

by pankajshakya627

Overview

A comprehensive Model Context Protocol (MCP) server providing local utilities for file operations, directory management, text processing, and mathematical calculations, ideal for integration with AI agents like Claude Desktop.

Installation

Run Command
npx @modelcontextprotocol/inspector uv --directory "$(pwd)" run main.py

Environment Variables

  • SANDBOX_DIR
  • MCP_TRANSPORT

Security Notes

The server implements robust file system sandboxing via the `_get_safe_path` function, which redirects all file operations to a designated directory (defaulting to /tmp/Dev_Pankaj or a custom SANDBOX_DIR) and actively blocks path traversal attempts ('..'). The `calculate` function uses `eval`, but it is heavily sandboxed with a restricted `safe_dict` and an empty `__builtins__` to prevent arbitrary code execution. When running in HTTP mode (not default), it could bind to `0.0.0.0` potentially exposing it to the network, but the README provides explicit warnings and best practices for this scenario.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens300
Stars0
Forks1
Last Update2025-12-10

Tags

file-managementdirectory-operationstext-processingmath-utilitiesmcp-serverfastmcpagent-toolinglocal-utility