Gives Claude structured access to Sapling version control with 22 tools split across read, write, and remote operations. You get the standard workflow commands like status, diff, log, and blame, plus write operations like commit, amend, rebase, and shelve. The server has built-in guardrails: force pushes to main or master are blocked outright, destructive operations warn the LLM to confirm with you, and remote tools like pull, push, and pr_submit always require confirmation. Useful if you're working in a Sapling repo and want Claude to handle version control operations without leaving the conversation. Runs via npx with configurable timeout and binary path.
MCP server for Sapling (sl). Gives LLMs structured access to Sapling repos with built-in safety guardrails.
claude mcp add --transport stdio sl -- npx -y sl-mcp
Restart Claude Code. Verify with /mcp — you should see the sl server listed.
Add to your MCP config file (.mcp.json, claude_desktop_config.json, etc.):
{
"mcpServers": {
"sl": {
"command": "npx",
"args": ["-y", "sl-mcp"]
}
}
}
22 tools across three tiers:
| Tier | Tools | Confirmation |
|---|---|---|
| Read | sl_status sl_diff sl_log sl_show sl_blame sl_cat sl_root sl_smartlog | None |
| Write | sl_goto sl_commit sl_amend sl_rebase sl_shelve sl_unshelve sl_add sl_remove sl_forget sl_revert sl_undo | Destructive ops warn LLM to confirm |
| Remote | sl_pull sl_push sl_pr_submit | Always confirm with user |
main/master is blocked server-side (not just a warning)| Env var | Default | Description |
|---|---|---|
SL_MCP_BINARY | sl | Path to Sapling binary |
SL_MCP_TIMEOUT | 30000 | Command timeout in ms |
MIT
SL_MCP_BINARYPath to Sapling binary
SL_MCP_TIMEOUTCommand timeout in milliseconds