Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    mcp tool permission scoper

    1

    Generate evidence-based MCP tool allowlists and RBAC configs from historical agent usage logs.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    mcp tool permission scoper

    mcp tool permission scoper

    Example session with this skill installed

    Analyze the last 60 days of logs for the 'analyst-bot' role and generate a Bifrost virtual-key JSON policy. It currently has full access to the 'postgres-server' and 'slack-server'.

    • Read your context and instructions
    • Compiled the mcp tool permission

    I have analyzed the tools/call logs for analyst-bot from 2024-06-01 to 2024-08-01. The role called 4 distinct tools across 2 servers. While the role currently holds * permissions, usage evidence suggests a significantly narrower scope.

    MCP Permission Audit & Bifrost Config

    FindingTool IDObservationsRecommendation
    Active Usepostgres-server:run_query142 callsRetain in allowlist
    Active Useslack-server:send_message28 callsRetain in allowlist
    Unused Grantpostgres-server:delete_table0 callsRemove (No usage in 60d)
    Unused Grantslack-server:admin_delete_channel0 callsRemove (No usage in 60d)
    Flaggedpostgres-server:dump_schema0 callsFlag (Potential monthly task)

    Generated Bifrost Policy (Least-Privilege)

    {
      "version": "2024-08-06",
      "role": "analyst-bot",
      "allowlist": [
        {
          "server": "postgres-server",
          "tools": ["run_query", "list_tables"]
        },
        {
          "server": "slack-server",
          "tools": ["send_message"]
        }
      ],
      "notes": "Generated from 60-day usage window. 'dump_schema' was excluded due to zero usage; add manually if required for reporting."
    }
    

    Next steps

    1. Review the Flagged tools to ensure no rare monthly reporting tasks are broken by this change.
    2. Apply the JSON to your Bifrost gateway configuration.
    3. Run mcp-gateway-config-auditor to verify the gateway is correctly enforcing these new tool restrictions.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Most Model Context Protocol (MCP) deployments rely on human guesswork for tool permissions. Developers often grant broad scopes like admin:* to simple bots, creating massive security holes, or spend hours manually auditing logs to justify trimming access. This skill replaces guesswork with usage evidence. It analyzes your agent's tools/call history over a specific window to generate a least-privilege allowlist based on what the agent actually does, not what a human thinks it might do.

    What it does

    • Log Attribution Validation verifies that tool calls are tied to specific, authenticated identities before generating role-based scopes.
    • Usage Analysis pulls historical tool call data over a 90-day window to identify every server and tool interaction.
    • Grant Diffing compares observed tool usage against current permissions to highlight gaps, shadow access, or unused grants.
    • Least-Privilege Scoping generates an allowlist artifact that matches only the tools the agent successfully used.
    • Disambiguation Mapping keys permissions to server_id:tool_name to prevent scope leakage in multi-server environments.

    How it works

    1. Source Logs are provided to the agent, covering a bounded observation window of historical tool activity.
    2. The Diagnostic Report identifies tools that were called but not granted, and tools granted but never used.
    3. The Config Generator produces a platform-specific RBAC artifact, such as Bifrost JSON or agentgateway CEL rules.
    4. The Review Cycle presents the output as a diff for human approval, flagging rare break-glass tools for manual retention.

    Frameworks & tools

    Works with any MCP gateway or RBAC layer including Bifrost, agentgateway, Obot, and MCPManager. It targets the standard MCP tools/list and tools/call protocol specifications.

    Why this beats prompting it yourself

    Generic prompts often treat "never called" as "delete immediately," which breaks critical but rare incident-response tools. This skill follows the AWS IAM Access Analyzer precedent, using a formal request-review-refine loop and independent classification to protect rare-use paths while eliminating routine scope creep.

    Use cases

    • Generating a defensible starting allowlist when standing up a new MCP gateway.
    • Trimming broad grants from reporting bots that only need read access to three tools.
    • Automating periodic access-recertification cycles for internal agent fleets.
    • Justifying permission reductions with concrete usage evidence for security audits.

    Known limitations

    Cannot enforce policies; it only generates the configuration for a gateway to enforce. It is limited by the granularity of the target gateway and the attribution quality of the provided logs.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Requires logs with per-caller identity attribution. Scoping is limited to whole-tool granularity unless the target gateway supports argument-level CEL rules.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Software
    when standing up an MCPSecurity Audit MCP

    Permissions

    No special permissions declared or detected

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    It reads your MCP tools/call history for a stated observation window and compares what each agent role actually called against what it has been granted. It reports unused or overly broad grants as trim candidates and generates a starting least-privilege allowlist for you to review. Because a time window only shows what happened in that window, every proposal goes through a human review step before anything is applied.

    It generates configuration for Bifrost (virtual keys), agentgateway (CEL policy rules), Obot (registry role mapping) or a plain server-side scope table. Scoping is whole-tool unless your gateway can inspect arguments, as agentgateway's CEL rules can.

    No, the skill includes a 'Review Cycle' that flags rarely used but critical 'break-glass' tools, allowing you to manually retain important permissions that don't appear frequently in daily logs.

    Historical tools/call logs for the roles you want to scope, covering an observation window you choose, and attributing every call to a verified per-caller identity (an authenticated token or session, not a shared credential). If logs can't be tied to a role, the report says so and treats the per-role result as unverified. Longer windows give a more reliable result, and the skill's reference point is AWS's 90-day lookback.

    The skill acts as a diagnostic and configuration generator; it produces the policy files (like JSON or CEL rules) which you then apply to your specific gateway to enforce the new permissions.

    New in LLM Ops