Local Workspace Orchestrator
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 和汇总统计信息 |
| 执行白名单中的 shell 命令(ls、cat、grep 等) |
破坏性工具
工具 | 描述 |
| 创建工作区中的文件或覆盖已有文件 |
| 运行 Python 脚本并返回 stdout/stderr |
| 为 CSV 列生成直方图 PNG |
资源
URI | 描述 |
| 列出工作区根目录中的所有文件 |
| CSV 文件的列名 + dtypes |
安全
路径遍历保护:所有接受文件的工具都使用
os.path.realpath()+pathlib.Path.resolve()验证路径,以防止目录遍历攻击。Shell 命令白名单:
run_shell_command只允许一组精选的只读命令(ls、cat、grep、head、tail等)。脚本沙箱:
execute_python_script在子进程中运行脚本,超时时间为 30 秒,并通过cwd将运行范围限制在工作区目录内。注意:这 不是 真正的沙箱——子进程拥有与服务器进程相同的操作系统权限。工具注解:每个工具都带有
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