跳到主要内容

Mcp Safe Hygiene

Add MCP servers safely with tools.include whitelists.

Skill metadata​

SourceBundled (installed by default)
Pathskills/devops/mcp-safe-hygiene
Version1.0.0
AuthorVibeOS
LicenseMIT
Platformslinux, macos, windows
Tagsmcp, security, hygiene, config, cursor
Related skillscursor-capabilities-bridge, vibeos-local-verify-deploy

Reference: full SKILL.md​

信息

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.include or over-broad paths
  • Splitting coding vs messaging profiles’ MCP surface

Prerequisites​

  • Edit ~/.vibeos/config.yaml (or a profile’s config.yaml)
  • Secrets only in ~/.vibeos/.env
  • Prefer uvx / npx -y for stdio servers; never paste shell -c payloads

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​

RuleDefault
WhitelistAlways tools.include: [...]
Max enabled / profile≤ 5 (mcp_hygiene.DEFAULT_MAX_ENABLED_MCP)
Filesystem rootOne project dir — never $HOME, /, /Users
Mutating git toolsExclude (git_commit, git_add, git_checkout, …)
GitHub MCPSkip while no-github policy is active
TermitPro stubsLeave disabled — not VibeOS MCP
ReloadNew session preferred over mid-chat /reload-mcp

Procedure​

  1. Pick the capability; if terminal + skills already cover it, skip MCP.
  2. Add mcp_servers.<name> with command/args/enabled: true.
  3. Run the server once, list tools, then copy only needed names into tools.include.
  4. For git: whitelist status/diff/log/show/branch only.
  5. Enable on the coding profile for IDE work; keep messaging lean.
  6. 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)​

#PromptExpect
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-mcp changes 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/npx first run downloads packages — allow network once.

Verification​

  • vibeos doctor → MCP hygiene OK
  • vibeos mcp test <name> succeeds
  • Smoke prompts 1–3 pass in a fresh coding-profile session