
playcations/filesystem-mcp-for-gpt
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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:
-
Install ngrok and log in.
-
Forward your local server:
ngrok http 8000 -
You’ll see an HTTPS forwarding URL, e.g.:
Forwarding https://88952b488500.ngrok-free.app -> http://localhost:8000Your server is now publicly reachable at that URL.
🔗 Linking with ChatGPT as an MCP Server
-
Open ChatGPT settings → Custom MCP Servers.
-
Add a new MCP server with:
- Name:
filesystem - URL: the ngrok HTTPS URL (e.g.
https://88952b488500.ngrok-free.app/sse/) - Capabilities: leave defaults.
- Name:
-
Save and enable.
ChatGPT will now handshake with your MCP server and discover all 7 tools.
Tools
🔧 Codex-style AI tools
-
shellExecute shell commands within the allowed workspace.-
Arguments:
command: string or array of stringsworkdir: working directory (relative or absolute inside allowed root)timeout: optional integer (seconds)
-
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →