How RubberDuck MCP Works
RubberDuck plugs into your IDE as two MCP servers: instead of your agent guessing from training data or grepping raw text, it calls RubberDuck directly and gets back a queryable model of the code you loaded, which you can pin to an exact commit.
What happens when you ask RubberDuck a question
Your agent picks a RubberDuck tool
A prompt like "trace how this variable flows" or "audit this repo for security issues" tells the agent which RubberDuck tool fits, no manual tool selection required.
RubberDuck queries its model, not your files
Instead of re-reading source files from scratch, RubberDuck consults the semantic graph (or repo analysis) it already built for your project.
Every claim comes back with evidence
Results are tagged with the exact file, line, and tool call that produced them, so RubberDuck's answer is grounded, not paraphrased.
RubberDuck's two MCP servers
Repo-level analysis
Codebase Intelligence
Scans the whole repository for structural health, security posture, and change risk. This is what runs when a prompt asks for an audit, a grade, or a PR-wide risk read.
quick_repo_analysisdetailed_repo_analysisbatch_analysisGraph-level queries
Semantic Intelligence
Builds an internal graph of the code you load, then answers precise questions against it: where a symbol is defined, what calls it, how a variable flows, whether a finding is real. assess alone covers most of what gets advertised: security, change impact, and PR review.
get_starteddiscoverload_codesearch_coderead_sourcequery_actionanalyze_codescan_bug_signalsassessread_source returns the source already captured in the loaded graph, it never re-reads files from disk. query_action is one tool with several actions, trace_variable, call_chain and control_guards among them. Every query_action call needs an analysis_id: load_code returns one per file it loads, and discover(action="list_loaded") lists the ids you already have.
Every use case below is built from these same MCP calls
UC-01 through UC-10 aren’t separate features, they’re prompts that chainload_code,search_code,assess, and the rest of the tools above for a specific job. Pick one and try it:
Understand a codebase
Trace call chains and data flow to find the right place to start.
Investigate security
Audit sensitive paths and get a verified verdict, not a guess.
Trace a bug
Find the root cause and confirm the fix actually holds.
Review a PR / change
Catch what a diff-only reviewer would miss.
Generate a patch
Propose a committable fix, gated on verify.
Plan a feature
Scope the change and its blast radius before you write a line of code.