MCP Workspace Server
MCP Workspace Server
制御されたローカルワークスペース内のファイルへの安全かつ構造化されたアクセスをAIエージェントに提供する、軽量なPython MCPサーバーです。
概要
AIエージェントは、ローカルファイルに保存されたプロジェクトのコンテキストにアクセスする必要があることがよくあります。エージェントに無制限のファイルシステムアクセスを許可すると、不要なセキュリティリスクが生じます。
このプロジェクトは、Model Context Protocol (MCP) を使用して、設定されたディレクトリへのアクセスを制限しながら、制御された小規模なワークスペースツールのセットを公開します。
Related MCP server: file-reader-mcp
MCP ツール
サーバーは3つのツールを公開しています。
list_workspace_files
設定されたワークスペース内で利用可能なファイルを一覧表示します。
read_text_file
サイズ制限を設定可能なUTF-8テキストファイルを読み取ります。
search_text
ワークスペース内のドキュメントを検索し、一致したファイル名、行番号、テキストを返します。
セキュリティ
サーバーは、要求されたパスを定義されたワークスペースルートに対して解決し、そのディレクトリ外へのパストラバーサルを防止します。
その他の保護策は次のとおりです。
ワークスペースへのアクセス制限
入力検証
ファイルサイズの制限
UTF-8 の処理
パストラバーサルの防止
自動化されたセキュリティテスト
プロジェクト構成
mcp-workspace-server/
├── src/
│ └── mcp_workspace_server/
│ ├── __init__.py
│ └── server.py
├── tests/
│ └── test_paths.py
├── workspace/
│ └── example.txt
├── pyproject.toml
└── README.mdThis server cannot be deployed
Maintenance
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Artifact store for AI agents — read, write, and search files by path; share by rendered URL.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Large Language Models to safely browse and interact with local file systems through secure directory listing, file reading, and content search capabilities. Built with comprehensive security controls and high-performance handling of large directories and files.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLM agents to securely explore, read, search, and analyze text-based files within a sandboxed environment.-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to safely read and write files in a sandboxed workspace via natural language, with on-demand connection, CVE-hardened path confinement, injection resistance, and full audit logging.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to safely read, write, and search files within a whitelisted sandbox directory, rejecting any attempts to escape the sandbox.MIT