Mcp Safe Hygiene
Add MCP servers safely with tools.include whitelists.
Skill metadata
| Source | Bundled (installed by default) |
| Path | skills/devops/mcp-safe-hygiene |
| Version | 1.0.0 |
| Author | VibeOS |
| License | MIT |
| Platforms | linux, macos, windows |
| Tags | mcp, security, hygiene, config, cursor |
| Related skills | cursor-capabilities-bridge, vibeos-local-verify-deploy |
Reference: full SKILL.md
info
The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
MCP Safe Hygiene
Ops recipe for adding Model Context Protocol servers to VibeOS without
bloating the tool schema or exposing $HOME. Complements IOC checks in
vibeos doctor (malware shapes) with configuration hygiene.
When to Use
- User wants a new MCP (Notion, DB, git, filesystem, …)
- Doctor warns about missing
tools.includeor over-broad paths - Splitting coding vs messaging profiles’ MCP surface
Prerequisites
- Edit
~/.vibeos/config.yaml(or a profile’sconfig.yaml) - Secrets only in
~/.vibeos/.env - Prefer
uvx/npx -yfor stdio servers; never paste shell-cpayloads
How to Run
# After editing mcp_servers:
vibeos doctor # security + hygiene sections
vibeos mcp list
vibeos mcp test project_git # or your server name
# Prefer a NEW chat session after MCP changes (tool schema / cache).
Quick Reference
| Rule | Default |
|---|---|
| Whitelist | Always tools.include: [...] |
| Max enabled / profile | ≤ 5 (mcp_hygiene.DEFAULT_MAX_ENABLED_MCP) |
| Filesystem root | One project dir — never $HOME, /, /Users |
| Mutating git tools | Exclude (git_commit, git_add, git_checkout, …) |
| GitHub MCP | Skip while no-github policy is active |
| TermitPro stubs | Leave disabled — not VibeOS MCP |
| Reload | New session preferred over mid-chat /reload-mcp |
Procedure
- Pick the capability; if terminal + skills already cover it, skip MCP.
- Add
mcp_servers.<name>withcommand/args/enabled: true. - Run the server once, list tools, then copy only needed names into
tools.include. - For git: whitelist status/diff/log/show/branch only.
- Enable on the coding profile for IDE work; keep messaging lean.
- Verify with the smoke prompts below.
Example: read-only project git
mcp_servers:
project_git:
command: uvx
args: [mcp-server-git, -r, /path/to/VibeOS]
enabled: true
tools:
include:
- git_status
- git_diff_unstaged
- git_diff_staged
- git_diff
- git_log
- git_show
- git_branch
Smoke checklist (Day-9 style)
| # | Prompt | Expect |
|---|---|---|
| 1 | “List allowed dirs via project_fs” | mcp_project_fs_list_allowed_directories (or list_directory) |
| 2 | “Show git status for this repo via MCP” | mcp_project_git_git_status |
| 3 | “Diff unstaged via MCP, do not commit” | git_diff_unstaged; no git_commit |
| 4 | “Search for mcp_hygiene under the project” | mcp_project_fs_search_files or search_files |
| 5 | “Summarize last 3 commits via MCP” | git_log |
If the model uses terminal instead, tighten the skill/prompt — do not
add a core tool.
Pitfalls
- Mid-session
/reload-mcpchanges the tool surface and can break prompt cache expectations — start a new session after MCP edits. - Empty
tools.include: []exposes nothing; omit the key and doctor warns. - Stub dirs under
~/.vibeos/plugins/mcp-*are not MCP servers. uvx/npxfirst run downloads packages — allow network once.
Verification
vibeos doctor→ MCP hygiene OKvibeos mcp test <name>succeeds- Smoke prompts 1–3 pass in a fresh coding-profile session