mcplocal
mcplocal
Local Files MCP serverは、MCP対応クライアント(利用可能な場合はChatGPT WebのカスタムMCPアプリを含む)が、明示的に設定された1つのディレクトリ内のファイルを読み取り、検索、変更できるようにするものです。
Features
レガシーHTTP+SSE:
GET /sse+POST /messagesモダンなMCP HTTPエンドポイント:
/mcpヘルスチェック:
/healthサンドボックス: すべてのファイルパスは
MCP_ROOT配下で解決されますオプションのBearer認証
プロジェクト探索のための読み取り/検索ツール
コーディングワークフローのための書き込み/編集ツール
削除はデフォルトで無効
シェル/CLI実行ツールなし
外部データベースへの依存なし
Node.js 20+
MCP TypeScript SDKは現在、リモートサーバーにはStreamable HTTPを推奨しており、HTTP+SSEを後方互換性のあるトランスポートとして扱っています。このプロジェクトは、古いSSEクライアントが引き続き接続でき、新しいクライアントが /mcp を使用できるように、意図的に両方を公開しています。
Related MCP server: FilesystemMCP
1. 実行
cp .env.example .env
# edit MCP_ROOT if needed
npm start例:
MCP_ROOT=~/Projects
MCP_HOST=127.0.0.1
MCP_PORT=8008
MCP_AUTH_TOKEN=change-me次に:
SSE: http://127.0.0.1:8008/sse
Streamable: http://127.0.0.1:8008/mcp
Health: http://127.0.0.1:8008/health2. ChatGPT Webが接続できるもの
ChatGPT Webはホストされたサービスから localhost に直接到達できません。ローカルMCPサーバーは、サポートされているSecure MCP Tunnel/プライベートネットワークの仕組みを通じて到達可能にする必要があります。リモートMCPエンドポイントを取得したら、ChatGPT Developer ModeでカスタムMCPアプリとして追加し、ツールをスキャンして有効にします。
ローカルサービスをマッピングするトンネルの場合、ローカルオリジンは次のとおりです:
http://127.0.0.1:8008/sseまたは、モダンなクライアントの場合:
http://127.0.0.1:8008/mcp認証と明示的なネットワークポリシーなしに、このサーバーをパブリックインターネットに公開しないでください。
3. ChatGPTに公開されるツール
list_files(path, recursive)read_file(path, startLine, endLine)write_file(path, content, createDirs)edit_file(path, oldText, newText, replaceAll)search_files(query, path, regex, caseSensitive, maxResults)create_directory(path)file_info(path)delete_file(path)はMCP_ENABLE_DELETE=trueの場合のみ
一般的なコーディングワークフロー:
list_filesでプロジェクトを把握する。search_filesでシンボルを探す。read_fileで関連コードを確認する。edit_fileでピンポイントな変更を行うか、write_fileで新しいファイルを作成する。read_fileをもう一度実行して結果を検証する。
4. セキュリティモデル
MCP_ROOT が厳格な境界です。../ によるトラバーサルや、その外側の絶対パスは拒否されます。バイナリファイルや読み取り不能なファイルは検索でスキップされます。ファイルサイズは MCP_MAX_FILE_BYTES によって上限が設定されます。
このサーバーは意図的に任意のシェル実行を公開していません。つまり、ChatGPTはコードを編集できますが、このMCPを通じて rm、curl、パッケージマネージャー、gitコマンド、または任意のプログラムを自動的に実行することはできません。
開発マシンでは、MCP_HOST=127.0.0.1 のままにし、サーバーをすべてのインターフェースにバインドするのではなく、サポートされているSecure MCP Tunnelを使用してください。
5. ビルド
npm run build
node dist/server.jsビルドは依存関係がなく、ランタイムを dist/ にコピーします。
6. Docker
docker build -t mcplocal .
docker run --rm -p 8008:8008 -v "$PWD:/workspace" mcplocal7. ChatGPTでのプロンプト例
Inspect this local project and tell me where the authentication flow is implemented. Do not modify anything.Open src/server.js and refactor the error handling. Before changing it, read the relevant code. Then edit only the necessary section and show me what changed.Search the project for TODO comments and create a report at reports/todos.md.ライセンス
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA secure MCP server enabling read-only access and file search capabilities within a specified directory, while respecting .gitignore patterns.
- AlicenseNot gradedqualityCmaintenanceA local, customizable MCP server for filesystem access that extends the official Anthropic implementation with additional tools and functionality. It enables users to securely read, write, edit, and manage files and directories within specific allowed local paths.529,343Inno Setup
- FlicenseBqualityDmaintenanceA lightweight MCP server for basic file operations, enabling reading, writing, and listing files securely via the Model Context Protocol.31
- AlicenseNot gradedqualityBmaintenanceSafe local MCP server for Windows to list, read, search, patch, backup, and verify code files in allowed folders, with Git integration and dry-run diffs.1MIT
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aiautotool/mcplocal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server