auto_remediate
Generate an automated security fix for a specific finding. Creates a GitHub PR with the patched code. Verifies the fix with Level 1 SAST before opening the PR. Requires authentication, 3 credits, and ANTHROPIC_API_KEY.
This record as markdown: /tools/com-graneth-mcp-server/auto-remediate.md
What auto_remediate does on Mcp Server
AI agents use auto_remediate to create or update resources in Mcp Server, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Server environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
ref | string | — | Git ref (branch/SHA) |
file | string | Yes | File path containing the vulnerability (relative, no traversal) |
line | integer | Yes | Line number of the finding |
repo | string | Yes | GitHub repository name |
owner | string | Yes | GitHub repository owner |
title | string | Yes | Finding title from scan results |
token | string | Yes | GitHub token with repo write access |
severity | string | Yes | Finding severity |
description | string | Yes | Finding description |
finding_type | string | Yes | Finding type e.g. 'command_injection', 'sql_injection' |
recommendation | string | Yes | Recommended fix from scan results |
Parameters from the server's own tool schema.
Why auto_remediate is rated Medium
Creates a pull request modifying code, a reversible write action with significant blast radius.
From the tool's definition Creates a GitHub PR with the patched code
Risk signalsAccepts file system path (file) · Handles credentials or secrets (token) · High parameter count (11 properties)
Attacks that exploit this kind of access
The rule that runs auto_remediate safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Server, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For auto_remediate, this is the rule to start with:
auto_remediate stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp Server, apply this rule, and every auto_remediate call is checked against it from then on.
Questions about auto_remediate
Generate an automated security fix for a specific finding. Creates a GitHub PR with the patched code. Verifies the fix with Level 1 SAST before opening the PR. Requires authentication, 3 credits, and ANTHROPIC_API_KEY. It is categorised as a Write tool in the Mcp Server MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
auto_remediate accepts 11 parameters: ref, file, line, repo, owner, title, token, severity, description, finding_type, recommendation. Required: file, line, repo, owner, title, token, severity, description, finding_type, recommendation. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Server MCP server in PolicyLayer and add a rule for auto_remediate: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Server. Nothing to install.
auto_remediate is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the auto_remediate rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for auto_remediate. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
auto_remediate is provided by the Mcp Server MCP server (@graneth/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Server, and thousands of servers like it.
This server
Across the catalogue