Objdiff CLI MCP Server - #400
Draft
HaydnTrigg wants to merge 5 commits into
Draft
Conversation
New workspace crate `objdiff-mcp` exposing objdiff's diffing over the Model Context Protocol (rmcp 2.1) so a model can drive matching without UI. Runs persistently over stdio (--transport stdio) or a shared HTTP instance (--transport http --bind ...). State (loaded project + diff config) is shared across sessions for the life of the process. Tools: - open_project / list_units: load objdiff.json, refer to units by name - diff_function: side-by-side per-instruction diff + match% for one function - diff_overview: functions ranked worst-match-first - build: run the project's build command for a unit (via objdiff-core run_make) - set_config: persistent diff/disassembly config overrides - version diff_function / diff_overview accept either a project unit or explicit target/base object paths, plus per-call config overrides. Added to workspace members (not default-members) to keep default builds lean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MCP server for AI-driven decomp matching.
Important
Usage
Runs persistently over stdio (
--transport stdio) or a shared HTTP instance (--transport http --bind ...). State (loaded project + diff config) is shared across sessions for the life of the process.Tools:
open_project/list_units- loadobjdiff.json, refer to units by namelist_units(filter?)- units + resolved target/base pathsdiff_function(symbol, unit | target+base, config?)- side-by-side per-instruction diff + match% for one functiondiff_overview(unit | target+base, only_mismatches?, limit?, config?)- functions ranked worst-match-firstbuild(unit, target?)- run the project's build command for a unit (via objdiff-corerun_make)set_config(key, value)- persistent diff/disassembly config overrideslist_symbol_mappings(unit)- manual target=base mappingsset_symbol_mapping(unit, target_symbol?, base_symbol?)version()diff_function/diff_overviewaccept either a project unit or explicit target/base object paths, plus per-call config overrides.Testing
This code has been tested for over a month across two extremely large decompilation projects. Using three Claude Max 20x subscriptions using models Opus 4.8, Opus 5, Fable 5 in Ultracode mode. Rough estimates put token usage 30–50% lower than the command-line and logging workflow depending on context.
This seems to be caused by the models having short-circuits to use MCP servers compared to thinking about command line usage (we've switched over to a few other MCP servers before this and saw similar token usage reductions). Due to Anthropic mostly being a black box one can only speculate.