mini_mcp

mini_mcp is a lightweight plugin built with FastMCP that retrieves the list of all files located on the current macOS user's desktop.

📦 Installation

It is recommended to use Conda to create an isolated environment:

conda create -n mcp python=3.12
conda activate mcp
pip install fastmcp

If you want to install with the requirements.txt file, install dependencies with:

pip install -r requirements.txt

⚙️ MCP Configuration

To invoke the list_desktop_files tool from an external MCP client, use the following configuration:

{
    "mcpServers": {
      "list_desktop_files": {
        "command": "/Users/hzq/anaconda/anaconda3/envs/mcp/bin/python",
        "args": [
          "/Users/hzq/py_projects/mini_mcp/main.py"
        ]
      }
    }
}

⚠️ Make sure to update the paths to match your local Python interpreter and project location.

🛠 Tool Description

list_desktop_files()

  • Purpose: Lists all files and folders on the current user's desktop.

  • Platform: macOS only

  • Returns: A list of strings, each representing a file or folder name.

Example output

[
  "report.pdf",
  "screenshot.png",
  "MyFolder"
]

📁 Project Structure

mini_mcp/
├── main.py          # Main script that registers the FastMCP tool
├── README.md        # This documentation file
└── requirements.txt # (Optional) Dependency definitions

🔒 Notes

  • This tool is implemented specifically for macOS due to the use of the ~/Desktop path.

  • To adapt this tool for Windows or Linux, modify the desktop path accordingly in the main.py script.

  • Ensure that fastmcp is installed and compatible with your Python version.

🧩 License

This project is provided as-is without any warranty. For licensing terms, refer to FastMCP’s license if applicable.

Related in File System - Secure MCP Servers

ServerSummaryActions
WebP Batch ConverterA Model Context Protocol (MCP) server for batch converting images to WebP format with cross-platform...View
MCP PDF ReaderA powerful Model Context Protocol (MCP) server built with FastMCP that provides comprehensive PDF pr...View
FilesystemNode.js server implementing Model Context Protocol (MCP) for filesystem operations.View
302AI File ParserInstall dependencies:View
Filesystem MCP ServerA Model Context Protocol (MCP) server that provides secure filesystem access to AI assistants in Cod...View
Deep Directory Tree MCPView