一键导入
filesystem-mcp-guardrails
Use when designing or reviewing filesystem MCP access, path boundaries, allowed roots, method allowlists, and safe local file operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when designing or reviewing filesystem MCP access, path boundaries, allowed roots, method allowlists, and safe local file operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when starting work in a repository with Agent Powerups installed, when a task may match a reusable local skill, command, workflow, hook recipe, AGENTS.md template, or MCP feature.
Use when validating rendered web pages, local dev servers, browser automation, screenshots, forms, auth sessions, or UI evidence with strict browser safety boundaries.
Use when implementing any feature or bugfix, before writing implementation code
Use when completing tasks, implementing major features, or before merging to verify work meets requirements.
Use when receiving code review feedback, before implementing suggestions — requires technical verification and reasoned pushback, not performative agreement or blind implementation.
Design high-quality MCP servers around workflows, narrow schemas, context-aware outputs, and actionable errors. Use when building or reviewing MCP tools for real agent tasks.
| name | filesystem-mcp-guardrails |
| description | Use when designing or reviewing filesystem MCP access, path boundaries, allowed roots, method allowlists, and safe local file operations. |
Use when configuring, reviewing, or debugging a local filesystem MCP server — particularly when deciding which paths to expose, which methods to allow, and how to enforce workspace boundaries.
The core constraint is strict path bounding: the MCP server must only operate within explicitly declared workspace roots. No exceptions.
| Principle | Rule |
|---|---|
| Scope | Bind to the project workspace directory only — never /, ~, or OS dirs |
| Access | Start read-only; add write methods only when the use case requires them |
| Methods | Use an allowlist — block delete/move/rename by default |
| Secrets | Never expose .env, credential files, SSH keys, or token stores |
| Approval | Always require user approval before starting a new MCP server process |
Before starting a filesystem MCP server:
/, ~, or any system-level path.read_file, list_directory, search_files).delete_file, move_file, write_file) are explicitly enabled only if required.*.env, *.key, *.pem, *secrets*, .ssh/.The server must return a clear error for any request targeting a path outside declared roots:
Error: path '/etc/passwd' is outside allowed workspace root '/home/user/project'
Silent failures or fallback to broader access are not acceptable.
references/path-boundary-checklist.md