PF

playcations/filesystem-mcp-for-gpt

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

10 stars 4 forks Качество 41 Тренд 18

This is a that exposes a set of tools for interacting with your local filesystem and running Codex-style developer workflows.

Обзор

This is a that exposes a set of tools for interacting with your local filesystem and running Codex-style developer workflows. It supports , , and inside a sandboxed directory, making it compatible with ChatGPT configured as an MCP server. * – Execute shell commands in a sandboxed directory. * – Apply Codex-style multi-file patches (*** Update File: / *** End Patch). * – Search for files or list the root directory. * – Fetch file contents or list directory contents. * – Write a UTF-8 text file (creates parent dirs if needed). * – Create a directory (with parents). * – Delete a file or directory (recursive). Clone this repo and make the script executable: No third-party dependencies are required (uses only the Python standard library). Run the server, restricted to a chosen working directory: To use this as an MCP server with (or other cloud-based clients), you need to make it accessible from the internet. The easiest way is with ngrok:

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP Filesystem + Codex-Style Server

This is a Model Context Protocol (MCP) server that exposes a set of tools for interacting with your local filesystem and running Codex-style developer workflows.

It supports basic file management, patch application, and shell execution inside a sandboxed directory, making it compatible with ChatGPT configured as an MCP server.


🚀 Features & Tools

Codex-Style Tools

  • shell – Execute shell commands in a sandboxed directory.
  • apply_patch – Apply Codex-style multi-file patches (*** Begin Patch / *** Update File: / *** End Patch).

Filesystem Tools

  • search – Search for files or list the root directory.
  • fetch – Fetch file contents or list directory contents.
  • write_file – Write a UTF-8 text file (creates parent dirs if needed).
  • create_directory – Create a directory (with parents).
  • delete_file – Delete a file or directory (recursive).

How to use

📦 Installation

Clone this repo and make the script executable:

git clone 
cd 
chmod +x fileSystemMCP.py

Requires Python 3.9+ (tested on 3.10/3.11).

No third-party dependencies are required (uses only the Python standard library).


▶️ Running the Server

Run the server, restricted to a chosen working directory:

pip install fastmcp
python3 fileSystemMCP.py /path/to/your/workspace

Example:

python3 fileSystemMCP.py ~/projects/demo

You’ll see:

Starting MCP server restricted to: /Users/you/projects/demo
Server URL: http://localhost:8000
SSE URL for ChatGPT: http://localhost:8000/sse/
Server started. Use Ctrl+C to stop.

🌐 Exposing the Server to the Web

To use this as an MCP server with ChatGPT (or other cloud-based clients), you need to make it accessible from the internet. The easiest way is with ngrok:

  1. Install ngrok and log in.

  2. Forward your local server:

    ngrok http 8000
    
  3. You’ll see an HTTPS forwarding URL, e.g.:

    Forwarding https://88952b488500.ngrok-free.app -> http://localhost:8000
    

    Your server is now publicly reachable at that URL.


🔗 Linking with ChatGPT as an MCP Server

  1. Open ChatGPT settings → Custom MCP Servers.

  2. Add a new MCP server with:

    • Name: filesystem
    • URL: the ngrok HTTPS URL (e.g. https://88952b488500.ngrok-free.app/sse/)
    • Capabilities: leave defaults.
  3. Save and enable.

ChatGPT will now handshake with your MCP server and discover all 7 tools.


Tools

🔧 Codex-style AI tools

  1. shell Execute shell commands within the allowed workspace.

    • Arguments:

      • command: string or array of strings
      • workdir: working directory (relative or absolute inside allowed root)
      • timeout: optional integer (seconds)
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →