codersanjay3

MCP Leash — Development skill for Claude Code

Development community

Find the dangerous tools in your MCP servers and lock them down in Claude Code — one command.

How to install MCP Leash

This entry records only its repository, not the path inside it, so there is no exact command to give. Open codersanjay3/mcp-leash and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What MCP Leash does

Find the dangerous tools in your MCP servers and lock them down in Claude Code — one command.

Alternatives in Development

README

mcp-leash

Find the dangerous tools in your MCP servers and lock them down in Claude Code — one command.

npx mcp-leash

![demo](docs/demo.gif)

**[Try it in your browser →](https://codersanjay3.github.io/mcp-leash/)** Paste your MCP tool names and see what `lock` would deny or ask for. Nothing leaves your browser.

[![CI](https://github.com/codersanjay3/mcp-leash/actions/workflows/ci.yml/badge.svg)](https://github.com/codersanjay3/mcp-leash/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/mcp-leash.svg)](https://www.npmjs.com/package/mcp-leash) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

Why

  • Every MCP server you add hands Claude a bag of tools, and some of them delete repos, run shell commands or send messages as you. Most people never read the tool list.
  • Claude Code's permission rules can allow, ask or deny a tool, but writing mcp__server__tool rules by hand for every server is tedious, so it doesn't happen.
  • Permission rules can't look at arguments (Claude Code ignores mcp__ rules with parentheses). mcp-leash adds a small hook that can, for example "ask before pushing to main", and keeps an audit log of every MCP call.

Quickstart

npx mcp-leash scan     # see every tool your MCP servers expose, ranked by risk
npx mcp-leash lock     # deny the destructive ones, ask for the ones that change things
npx mcp-leash unlock   # remove exactly what lock added

`lock` shows a diff, asks for confirmation, and backs up your settings file first. Restart Claude Code (or reload `/permissions`) afterwards.

Example output

This is real output from `mcp-leash scan --trust-project --project test/fixtures/project-basic` in this repo. `fake` is a tiny MCP server used by the tests; `broken` points at a script that doesn't exist, to show that one bad server doesn't stop the scan.

mcp-leash scan  test/fixtures/project-basic

fake (project · stdio · node ../fake-server.mjs)
   CRITICAL