Terminal MCP (server-shell)
Quick start
- Ensure Node.js and npm are available.
- Add the MCP server config (below) to your client.
- Use MCP tools to run commands safely (pwd, ls, rg, git status).
Standard MCP config
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-shell"]
}
}
}
Codex CLI command
codex mcp add terminal -- npx -y @modelcontextprotocol/server-shell
Usage flow (agent-side)
- Start with
pwdandlsto confirm the repo root. - Use
rgfor fast search. - Prefer non-destructive commands; avoid
rm -rf. - Confirm before running long or risky commands.
Safety
- Treat the shell as sensitive: it has full filesystem access.
- Avoid exporting secrets into logs or command history.
- For privileged commands, ask the user explicitly.
Resources
- Client-specific setup: see
references/clients.md.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.