Wendy - Codebase Q&A Agent
Wendy's MCP server exposes eleven codebase-exploration tools that let Claude Code and other MCP clients inspect files, history, symbols, semantics, and claims.
List files and map the repository tree.
Read files (truncated when large) and search text across the project with paths and line numbers.
Inspect git history: recent commits, per-line blame, and uncommitted diffs.
Analyze code symbols: list functions/classes and find definitions across the project.
Run semantic search to find code by meaning, not just matching text.
Verify natural-language claims about the code and return supported/contradicted findings with evidence line numbers.
Provides tools for exploring a codebase and its Git history, including listing files, reading files, searching, and inspecting git log, blame, diffs, and repository maps.
Wendy
A codebase Q&A agent built on Claude's tool-use API. Ask a question about a project and it explores the code itself, listing files, searching, and reading, then answers grounded in what it actually found.
Current version: 0.6.0 — see CHANGELOG.md.
Dedication
Dedicated to Wendy, that inspires me to always keep going.
Related MCP server: git-insights-mcp
What it does
Autonomous exploration: given a question, decides which tool it needs and runs it, chaining multiple tools until it has enough real information.
Three tools:
list_files(walk a directory),read_file(read a file), andsearch(find a string across the whole project with line numbers).Visible reasoning: prints every step of the loop, so you can watch it think instead of trusting a black box.
Bounded loop: after 10 tool-using turns, the agent pauses to ask you to continue and prompts Claude to justify itself before going on.
Robust: a crashing tool can't kill the run, results are truncated to a sane size, binary files and junk directories are filtered out, and API errors are retried with backoff and reported cleanly.
Command-line interface: ask questions directly:
wendy "question".History-aware:
git_log,git_blame,git_diff, andrepo_mapanswer the "why did this change?" questions that plain search can't.Symbol-aware:
list_symbolsandfind_definitionuse tree-sitter to parse code into syntax trees, so "where is X defined?" returns the real definition, not a string match.Semantic search:
semantic_searchfinds code by meaning: ask "where's the auth logic?" and it returns the matching functions even when those words never appear in the code, via a cached embedding index.Claim verification:
verify_claimchecks a natural-language claim about the code (for example, "run_loop has a step limit") and reports whether it is supported or contradicted, with the evidence line numbers, instead of guessing.MCP server: all eleven tools are exposed as a Model Context Protocol server (
wendy-server), so Claude Code and other MCP clients can use them.
How it works
Wendy runs a tool-use loop, the same pattern behind coding agents like Claude Code:
Send your question to Claude, along with the list of available tools.
Claude either answers, or replies with a tool request (e.g. "run
searchfordef run").Wendy executes the tool and feeds the result back into the conversation.
Repeat until Claude answers in plain text with no further tool requests.
The conversation history (the messages list) grows each iteration, so Claude
remembers everything it has already found.
To avoid runaway loops, after STEP_LIMIT (10) tool-using turns the agent
pauses and asks you whether to continue, and asks Claude to justify itself.
MCP server
Wendy's tools are also available as a Model Context Protocol server:
wendy-serverRegister it with Claude Code:
claude mcp add wendy -- /absolute/path/to/venv/bin/wendy-serverOr inspect it in a browser with the MCP Inspector:
.venv/bin/mcp dev wendy-server
Tech stack
Python 3.10+
anthropic: Claude API client (tool use)
python-dotenv: loads the API key from
.envmcp: Model Context Protocol (the MCP server interface)
tree-sitter + tree-sitter-python: symbol search (
list_symbols,find_definition)sentence-transformers: optional, for
semantic_search(see Setup)
Project structure
.
├── src/
│ └── wendy/
│ ├── agent.py # the agent: tool-use loop, CLI
│ ├── tools.py # the tools + helpers (shared by agent and server)
│ ├── server.py # MCP server exposing the tools to MCP clients
│ └── verify.py # claim verification
├── tests/
│ ├── test_agent.py # unit tests
│ └── test_verify.py # verify tests
├── docs/
│ └── CHANGELOG.md
├── pyproject.toml # packaging (hatchling) + dependencies
├── Dockerfile # container build for the MCP server
├── LICENSE
├── demo.tape # VHS source for the CLI demo
├── wendy-claude.gif # demo: Claude Code invoking the MCP server
├── .env # Anthropic API key (gitignored)
└── .gitignoreSetup
Create a virtualenv and install the package in editable mode:
python -m venv .venv .venv/bin/pip install -e .To use
semantic_search, install the extra instead (it pulls in torch):.venv/bin/pip install -e ".[semantic]"Create a
.envfile (never commit it):ANTHROPIC_API_KEY=sk-ant-api03-...Run:
wendy "what does run_agent do?"
Tests
python -m unittest discover -s testsCI runs the tests on Python 3.10, 3.12, and 3.13 on every push and pull request.
Status
Tool-use loop
Three tools (
list_files,read_file,search)CLI with step visibility
Step limit (nudge + human-in-the-loop gate)
Tool crash safety
Truncation
Noise filtering
API error handling (retry + clean messages)
MCP server (tools exposed to MCP clients)
Git history tools (
git_log,git_blame,git_diff,repo_map)Symbol search (
list_symbols,find_definitionvia tree-sitter)Semantic search (
semantic_searchvia embeddings + cached index)Claim verification (
verify_claim, supported/contradicted with evidence lines)Packaging (
pyproject.toml,wendyandwendy-serverentry points)CI (tests on Python 3.10, 3.12, 3.13)
Available Tools
11 toolsfind_definitionC
Find where a function or class is defined across the project.
Inputs: name (required), root. Returns: result
git_blameB
Show who last changed each line of a file, with commit hashes.
Inputs: path (required). Returns: result
git_diffA
Show uncommitted changes, optionally limited to one file.
Inputs: path. Returns: result
git_logB
Show the most recent git commits, optionally limited to one file.
Inputs: n, path. Returns: result
list_filesB
List files in a directory, skipping hidden and junk directories.
Inputs: directory (required). Returns: result
list_symbolsC
List the functions and classes defined in a file, with line numbers.
Inputs: path (required). Returns: result
read_fileB
Read the contents of a file, truncated if its too large.
Inputs: path (required). Returns: result
repo_mapC
Show a tree-style map of the project's directories and files.
Inputs: root. Returns: result
searchC
Search all files for a string, returning matching files paths and line numbers.
Inputs: query (required), root. Returns: result
semantic_searchC
Find functions/classes semantically related to a natural-language query.
Inputs: query (required), root, top_k. Returns: result
verify_claimB
Check whether a natural-language claim about the code is supported or contradicted.
Returns a summary plus per-check findings with evidence line numbers.
Inputs: claim (required), root, use_llm. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target clearly distinct operations (file listing, reading, git history, symbol lookup, semantic query, claim verification). The main overlap is between search (literal), semantic_search (semantic), list_symbols (per-file symbols), and find_definition (cross-project definition lookup), but the descriptions draw the boundaries well enough that misselection is unlikely.
All names use snake_case consistently. Most follow a verb_noun pattern (list_files, read_file, find_definition, verify_claim), with a few noun-style names (repo_map, git_log, git_blame, git_diff) and one bare verb (search) that slightly break the pattern but remain readable and predictable.
Eleven tools is well-scoped for a codebase Q&A agent, with each tool covering a distinct retrieval capability (files, content, search, structure, git history, symbols, semantics, verification). No redundant or filler tools are apparent.
The surface covers discovery (list_files, repo_map), reading (read_file), searching (search, semantic_search), structure (list_symbols, find_definition), and history (git_log, git_blame, git_diff), plus claim verification. Minor gaps exist—no regex/glob filtering or call-graph/reference-finding—but core Q&A workflows are fully supported.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Repository knowledge graph MCP server for codebase understanding and debugging.
An MCP server that gives your AI access to the source code and docs of all public github repos
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceA read-only MCP server that lets a Claude chat explore your local repository and answer questions about it, returning synthesized answers with file:line references.31MIT
- FlicenseNot gradedqualityDmaintenanceA local-only MCP server that exposes git repository history, diffs, and status as tools for LLM clients, working entirely against a local git repo on disk.-
- AlicenseAqualityDmaintenanceAnalyzes a local codebase and exposes its structure, per-file summaries, dependency graph, and complexity hotspots as tools for MCP clients like Claude.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients such as Claude Desktop and Claude Code to query an indexed source repository through path-guarded tools for hybrid keyword-and-vector code search, file snippets, symbol explanations, reference lookups, and test-skeleton suggestions. Serves those results over stdio with cited file:line locations so agents can answer questions about a codebase and drive grounded code review.MIT