claude-mcp-allow
Least-privilege Claude Code permission rules for MCP tools, generated from their annotations.
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.
Links
Releases
More in MCP tooling
- dev-mcp-servers: Ten small MCP servers for everyday development and security checks.
- mcp-server-template: Secure MCP server template in TypeScript and Python, safe by default.
- mcp-tools-lint: Lint MCP tool schemas and annotations before clients reject them.
- mcp-auth-doctor: Diagnose OAuth discovery problems on remote MCP servers.
- mcp-egress: Record every host an MCP server contacts, per tool, and fail CI on new ones.
- agentdojo-mcp: Run the AgentDojo benchmark's user and injection tasks against a real MCP server's tools.
- garak-mcp-probes: Run garak against your own MCP servers, with detectors for denied tool calls, leaked canaries and runaway step counts.
- mcp-rc-check: MCP specification migration checker for the 2026-07-28 revision: flags removed, changed and deprecated constructs and writes a patch for mechanical fixes.
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