@sousaalex1605/file_manager_mcp_server
v0.0.6
Published
MCP Server File Manager
Downloads
15
Readme
MCP File Manager
A robust, production-grade file management microservice for the Modular Community Platform (MCP) ecosystem. This tool provides advanced file and directory operations via a standardized MCP interface, enabling seamless integration with automation agents, developer tools, and cloud-native workflows.
Features
- Advanced Directory Listing: Recursive, paginated, and filtered listing with intelligent ignore patterns (e.g., .venv, node_modules, pycache).
- Line Counting: Efficiently count lines in large files without loading the entire file into memory.
- Partial File Reading: Extract specific line ranges from large files for analysis or processing.
- MCP Tool Integration: Exposed as MCP tools for easy orchestration and automation.
Installation
# Recommended: use Python 3.9+ virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
pip install fastmcp
# Copy or clone this repository into your MCP workspaceBasic Usage
Run as a standalone MCP microservice:
python file_manager.pyOr integrate as an MCP module in your agent:
from file_manager import ls_tool, count_lines_tool, read_lines_toolExample Usage via MCP:
- List files recursively ignoring patterns:
ls_tool(directory_path='src', recursive=True)
- Count lines in a file:
count_lines_tool(filepath='README.md')
- Read specific lines from a file:
read_lines_tool(filepath='file.txt', start_line=10, end_line=20)
Project Structure
file_manager.py— Main implementation of the MCP tools.README.md— This guide.LICENSE— MIT License.
Contributing
Contributions are welcome! Please follow the standard fork + pull request workflow. Open issues for bugs or suggestions. For direct contact: open an issue or email the main maintainer.
License
Distributed under the MIT License. See the LICENSE file for details.
