re-patch
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@re-patchApply a byte-level patch to the firmware binary at offset 0x100 with value 0x90"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
re-patch
MCP server for on-disk patching of binary artifacts. Provides:
SHA-256 manifest of a binary (so the original can be verified / restored)
Byte-level patch application: copy a file, write
new_bytesatoffset, save the resultManifest-driven restore: read the manifest, copy the original back
The server does not enforce policy — it surfaces an audit log
(confirm_legal parameter) so the calling agent records the
justification for every patch. The user / run policy is the
caller's responsibility.
Why
The 2026-06-05 stress test surfaced a need for an on-disk patch primitive that's:
Auditable — every call carries a
confirm_legaltext the analyst must type inReversible — the SHA-256 manifest + restore_original tool let the analyst roll back to the exact original bytes
Non-destructive —
apply_patchwrites a copy atdst, not in place; the original atsrcis never modified
Related MCP server: hashline-mcp
Tools
Tool | What it does |
| Health check — |
| Return the SHA-256 of path (hex-encoded) |
| Copy |
| Copy |
Install
Part of the RE-AI plugin; ./install.sh installs the package. To
install standalone:
pip install -e ./servers/re-patchRun
re-patch # stdio transport (default for MCP)
python -m re_patch # equivalentAvailable Tools
4 toolsapply_patchA
Copy src to dst, then splice new_bytes_b64 at offset.
This is the on-disk patch primitive. The original bytes at src are never modified; the patch is written to a copy at dst. The function returns both the pre-patch and post-patch SHA-256 so the analyst can record the patch's net effect in the report.
Args: src: source file (the original; never modified) dst: destination file (created or overwritten with the patched copy) offset: byte offset into dst at which to write (0-based) new_bytes_b64: base64-encoded bytes to splice in confirm_legal: free-text justification (the audit trail; the server does not enforce policy)
Returns::
{
"src": "...",
"dst": "...",
"src_sha256": "<original>",
"dst_sha256": "<patched>",
"src_size": N,
"dst_size": N,
"offset": N,
"patched_bytes": M,
"confirm_legal": "...",
}Override-scope contract: this tool is gated behind
the run's policy override (see override-scope.md of
the active run). The override authorizes on-disk patches
only inside Output/<run-id>/patches/; the
confirm_legal text must reference the override file
and the rationale.
| Name | Required | Description | Default |
|---|---|---|---|
| src | Yes | ||
| dst | Yes | ||
| offset | Yes | ||
| new_bytes_b64 | Yes | ||
| confirm_legal | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description thoroughly discloses behavior: src is never modified, dst is created or overwritten, returns pre- and post-patch SHA-256, explains confirm_legal as audit trail (not enforced), and details return object keys. No annotations are present, so the description bears full responsibility and meets it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with sections (summary, args, returns, override-scope contract) and is front-loaded. It is slightly lengthy but every sentence adds value; minor conciseness improvements could be made.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is remarkably complete. It covers behavior, parameter semantics, return value structure, and policy constraints (override scope). It provides all necessary information for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining each parameter: src (source file, never modified), dst (destination file, created/overwritten), offset (0-based byte offset), new_bytes_b64 (base64-encoded bytes), confirm_legal (free-text justification). This adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: copy src to dst, then splice new_bytes_b64 at offset. It is identified as the 'on-disk patch primitive', which distinguishes it from sibling tools like check_patch, restore_original, and sha256_manifest.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context on when to use the tool via the 'Override-scope contract' section, explaining it is gated behind a policy override and restricted to Output/<run-id>/patches/. However, it does not explicitly state when not to use it or mention alternative approaches.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_patchA
Return server status + version. Always status: OK —
re-patch has no external system dependencies (pure
Python stdlib + mcp / pydantic).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries full burden. It sufficiently discloses key traits: deterministic output ('Always `status: OK`'), no external dependencies (pure Python), and return of version. It does not mention error scenarios, but the simplicity warrants a high score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loads the primary action, and contains no redundant information. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema), the description is mostly complete. It covers status and version but omits details on return format or potential error conditions. Slightly more detail could warrant a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0 parameters, baseline is 4. The description adds value by explaining the tool's return content and lack of dependencies, but parameter semantics are inherently N/A.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('Return server status + version') and distinguishes it from siblings like 'apply_patch' and 'restore_original' by emphasizing it always returns 'status: OK' and has no external dependencies, making it a safe read-only check.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking server status and version, but it does not explicitly state when to prefer this tool over siblings like 'sha256_manifest' or in what contexts (e.g., before applying patches). The lack of explicit guidance lowers the score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
restore_originalA
Copy original back to restore_target, optionally verifying the original's SHA-256 against expected_sha256 first.
This is the rollback primitive. The function:
Computes the SHA-256 of original.
If expected_sha256 is non-empty, verifies the computed hash matches (refuses to proceed otherwise).
Copies original to restore_target (overwriting).
Args: original: file whose bytes are the canonical "original" (typically the source the patch was applied from) restore_target: file to write the original bytes to (typically the patched copy) expected_sha256: optional hex-encoded SHA-256 to verify original against confirm_legal: free-text justification (audit trail)
Returns::
{
"original": "...",
"restore_target": "...",
"original_sha256": "<hash>",
"expected_sha256": "<hash>" or null,
"verified": bool,
"confirm_legal": "...",
}
| Name | Required | Description | Default |
|---|---|---|---|
| original | Yes | ||
| restore_target | Yes | ||
| expected_sha256 | No | ||
| confirm_legal | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, but the description fully discloses the three-step process: compute hash, optionally verify, and overwrite target. It adds behavioral context beyond schema by explaining verification logic.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with summary, numbered steps, Args, and Returns. It is slightly lengthy but every element adds value, and the action is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
In the absence of an output schema, the description provides a complete return structure. All four parameters are covered, and the use case is fully explained with step-by-step logic.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description includes an 'Args' block that explains the purpose of each parameter, including optionality of expected_sha256 and the audit trail role of confirm_legal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool copies original to restore_target and calls it a rollback primitive. This distinguishes it from siblings apply_patch (forward) and check_patch/sha256_manifest (verification/list).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description identifies it as a rollback primitive, implying use for reverting patched files. It does not explicitly state when not to use or list alternatives, but context from siblings provides differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sha256_manifestA
Compute the SHA-256 manifest of path.
Args: path: file to hash
Returns::
{
"path": "...",
"size": N,
"sha256": "<64 hex chars>",
}Use this to record the canonical SHA-256 of the original
binary before any patch is applied. The hash is the
rollback key: restore_original(original, target, expected_sha256=...) will refuse to proceed if the
original's hash has drifted.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the burden. It explains the tool computes a hash (read-only), describes the output format including path, size, and sha256, and notes its role in the patching process. No contradictions with annotations since none exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with docstring format (Args, Returns, usage note). Every sentence adds value: the core purpose, parameter definition, return structure, and use case. It is appropriately sized with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema) and context signals, the description covers all necessary information: input, output, and usage context. There are no gaps; it is complete for an agent to understand and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must explain the parameter. It documents 'path: file to hash' explicitly, adding meaning beyond the schema's type-only definition. The description covers the single parameter comprehensively.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool computes a SHA-256 manifest of a path, specifying the verb 'Compute' and the resource 'SHA-256 manifest'. It distinguishes from sibling tools (apply_patch, check_patch, restore_original) by explicitly tying into the patching workflow as a prerequisite step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this to record the canonical SHA-256 of the original binary before any patch is applied', providing clear guidance on when to use it. It also connects to restore_original, indicating the hash is used as a rollback key, which helps differentiate from siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
apply_patch - First observed
check_patch - First observed
restore_original - First observed
sha256_manifest
TDQS
Each tool has a distinct purpose: applying patches, health check, rollback, and hash computation. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (apply_patch, check_patch, restore_original, sha256_manifest).
4 tools is well-scoped for a focused patching utility; each tool is necessary and justified.
Core patching workflow (hash, apply, rollback, health) is covered, though a tool to list applied patches is missing.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
111The MCP server that vets MCP servers: identity, risk grade and per-tool risk before you install.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA deterministic MCP server that enforces auditable workflows by requiring AI agents to provide structured justifications and obtain human approval for file operations. It provides a secure, tamper-evident pipeline for tracking agent intent and codebase changes through cryptographic signatures and SQLite indexing.-
- FlicenseNot gradedqualityDmaintenanceAn MCP server for precise, hash-referenced file editing that enables atomic edits using line:hash references instead of fragile line numbers or full content reproduction.-
- AlicenseNot gradedqualityBmaintenanceA filesystem MCP server that journals every file operation (write, delete, move, mkdir) and outbound commands (exec, http) into an append-only ledger, enabling undo and compensation of actions.MIT
- AlicenseAqualityBmaintenanceA local-first, model-neutral MCP server for collecting and normalizing change-scoped release evidence. It provides deterministic Git change summaries, evidence collection, and review bundles for agent review.718Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Heretek-RE/re-patch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server