Local Workspace Orchestrator
ローカルワークスペースオーケストレーター
MCP (Model Context Protocol) クライアント・サーバーシステムで、Anthropic Claude を一連のワークスペースツールを通じてローカルファイルシステムに接続します。このオーケストレーターにより、Claude はファイルの読み取り、CSV の分析、スクリプトの実行、プロットの生成など、すべてをインタラクティブなチャットインターフェースから実行できます。
アーキテクチャ
┌───────────────────────────┐ stdio ┌──────────────────────────┐
│ orchestrator_client.py │ ◄──────────────────► │ workspace_server.py │
│ (MCP Client + Anthropic) │ MCP protocol │ (FastMCP Server) │
│ │ │ │
│ • Connects to 1+ servers │ │ Tools: │
│ • Streams Claude output │ │ • list_workspace_files │
│ • Retries failed calls │ │ • summarize_csv_dataset│
│ • Saves chat history │ │ • execute_python_script│
│ │ │ • write_file │
│ │ │ • run_shell_command │
│ │ │ • plot_column_distrib. │
│ │ │ │
│ │ │ Resources: │
│ │ │ • workspace://files │
│ │ │ • workspace://schema/* │
└───────────────────────────┘ └──────────────────────────┘クイックスタート
1. クローンとインストール
git clone <your-repo-url>
cd local-workspace-orchestrator
# Using uv (recommended)
uv sync
# Or using pip
pip install -r requirements.txt2. API キーの設定
cp .env.example .env
# Edit .env and paste your Anthropic API key3. オーケストレーターの実行
# Using uv
uv run orchestrator_client.py
# Or directly
python orchestrator_client.pyインタラクティブプロンプトが表示されます:
======================================================
Local Workspace Orchestrator Active
Type queries, or /help for commands, 'quit' to exit.
======================================================
Orchestrator >4. クエリを試す
Orchestrator > list all files in this workspace
Orchestrator > summarize the sample_consumer.csv dataset
Orchestrator > plot the distribution of SpendingScore in sample_consumer.csv
Orchestrator > run the run_analysis.py scriptサーバー設定
オーケストレーターは server_config.json を読み取り、起動する MCP サーバーを決定します。形式は標準の MCP mcpServers 構造を使用します:
{
"mcpServers": {
"workspace_orchestrator": {
"command": "uv",
"args": ["run", "workspace_server.py"]
}
}
}サーバーの追加
複数のサーバーを接続できます。各サーバーのツールは自動的に検出され登録されます:
{
"mcpServers": {
"workspace_orchestrator": {
"command": "uv",
"args": ["run", "workspace_server.py"]
},
"my_other_server": {
"command": "python",
"args": ["other_server.py"]
}
}
}チャットコマンド
コマンド | 説明 |
| サーバーごとに登録済みの全ツールを一覧表示 |
| 会話履歴を JSON ファイルに保存 |
| 保存された会話を読み込み |
| 切断されたサーバーに再接続 |
| 会話メッセージ数を表示 |
| 会話履歴をクリア |
| 利用可能な全コマンドを表示 |
| オーケストレーターを終了 |
利用可能なツール
読み取り専用ツール
ツール | 説明 |
| ワークスペースパス内のファイルとサブディレクトリを一覧表示 |
| CSV の形状、列、dtypes、要約統計量を返す |
| 許可リストに登録されたシェルコマンド(ls、cat、grep など)を実行 |
破壊的ツール
ツール | 説明 |
| ワークスペース内のファイルを作成または上書き |
| Python スクリプトを実行し、stdout/stderr を返す |
| CSV 列のヒストグラム PNG を生成 |
リソース
URI | 説明 |
| ワークスペースルート内の全ファイルを一覧表示 |
| CSV ファイルの列名と dtypes |
セキュリティ
パストラバーサル対策:ファイルを受け取るすべてのツールは、
os.path.realpath()+pathlib.Path.resolve()を使用してパスを検証し、ディレクトリトラバーサル攻撃を防ぎます。シェルコマンドの許可リスト:
run_shell_commandは、厳選された読み取り専用コマンド(ls、cat、grep、head、tailなど)のみを許可します。スクリプトのサンドボックス化:
execute_python_scriptは、30 秒のタイムアウト付きでサブプロセス内でスクリプトを実行し、cwdを介してワークスペースディレクトリに制限します。注意:これは真のサンドボックスではありません。サブプロセスはサーバープロセスと同じ OS 権限を持ちます。ツールアノテーション:各ツールには
readOnlyHint/destructiveHintアノテーションが付与され、MCP クライアントが安全性を判断できるようにします。
CLI オプション
python orchestrator_client.py --help
options:
--log-level {DEBUG,INFO,WARNING,ERROR} Set logging verbosity (default: INFO)
--system-prompt TEXT Custom system prompt for Claude
--config PATH Path to server_config.json環境変数
変数 | 説明 | デフォルト |
| Anthropic API キー(必須) | — |
| ログの詳細度 |
|
プロジェクト構造
local-workspace-orchestrator/
├── orchestrator_client.py # MCP client + Anthropic integration
├── workspace_server.py # FastMCP server with workspace tools
├── server_config.json # MCP server connection configuration
├── main.py # Stub entry point
├── run_analysis.py # Example analysis script
├── sample_consumer.csv # Sample dataset
├── pyproject.toml # Project metadata + dependencies
├── requirements.txt # Pinned pip dependencies
├── .env.example # API key template
├── .gitignore # Git ignore rules
└── README.md # This fileライセンス
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 Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
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/aniketmehetre/local_workspace_orchestrator-MCP-SERVER'
If you have feedback or need assistance with the MCP directory API, please join our Discord server