Home / MCP tooling

claude-mcp-allow

Least-privilege Claude Code permission rules for MCP tools, generated from their annotations.

TypeScript · MIT · latest v0.3.0

What it is

Generate permissions.allow and permissions.ask rules for every MCP tool Claude Code can reach, from the annotations each server reports on tools/list: a tool that says readOnlyHint: true (and not destructiveHint: true) gets an allow rule, everything else gets an ask rule, one exact mcp__<server>__<tool> rule per tool and never a glob. --write merges the rules into the settings file you choose, --diff shows what would change, and --check reconnects later and exits 1 when a server's annotations have drifted from the rules you saved.

It is for people who use Claude Code with MCP servers and want read-only tools to stop prompting without allowing everything, and for teams who commit .claude/settings.json and want CI to notice when a server's annotations change.

Install

npx @basitalisandhu/claude-mcp-allow            # print the proposed rules, change nothing
npx @basitalisandhu/claude-mcp-allow --diff --write
npx @basitalisandhu/claude-mcp-allow --check    # later, or in CI: exit 1 on drift

From the README; see the full README for every option.

Releases

More in MCP tooling

All tools

Topics: agent-security, ai-agents, ai-security, claude-code, cli, developer-tools, devsecops, drift-detection, hacktoberfest, least-privilege, llm-security, mcp, mcp-client, model-context-protocol, permissions, security-tools, tool-annotations, typescript