App Analysis MCP
Click on "Deploy 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., "@App Analysis MCP Inspect ./my-app, create a debug case, and report evidence-backed findings"
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.
App Analysis MCP
A local MCP server for understanding applications, investigating bugs, and planning fixes with evidence.
App Analysis MCP brings REA, Craft Anything, and source analysis tools into one investigation. Your MCP client handles reasoning; the server collects structured observations, runs authorized checks, and keeps the original evidence available.
What you can do
Understand functions with Tree-sitter AST queries and syntactic call relationships.
Combine language-specific linting, local Semgrep rules, Git history, crash stacks, and test results.
Detect project languages and available checks before choosing an analysis workflow.
Read compact summaries or retrieve the complete recorded evidence with provenance.
Distinguish hypotheses, source-reviewed findings, and reproduced failures.
Hand an evidence-linked diagnosis to Craft Anything for a coding agent to continue.
The server exposes 14 tools. AST, source inspection, Git, and log parsing work without either backend. REA and Craft are started only when requested. A Craft handoff saves a repair brief; the connected coding agent performs subsequent code generation and editing.
Related MCP server: EngineeringOS MCP
Quick start
The core requires Node.js 22 or newer and npm. Git is needed for history analysis and backend checkout. The setup helper and project-command execution require macOS/Linux. Real backend integration has been verified on macOS arm64; Linux backend integration has not been verified.
git clone --depth 1 https://github.com/tanjialin-labs/app-analysis-mcp.git
cd app-analysis-mcp
npm ci
npm run check
npm testGenerate the MCP configuration for your actual installation path:
# JSON for clients using the mcpServers format
npm run config --silent
# TOML for Codex
npm run config --silent -- --codexMerge the generated entry into your client's existing configuration. It points directly to Node and bin/server.mjs using absolute paths. The server uses stdio, has no web interface, and reserves stdout for the MCP protocol. Restart the client connection after changing the installation or configuration.
For Codex, the generated block belongs in ~/.codex/config.toml. Keep your existing settings and other MCP entries; avoid adding a duplicate app_analysis entry. The generated tool timeout is 300 seconds. If you intentionally run longer checks, increase the client's timeout as well as the tool's timeout_ms.
Then ask your client:
Use app_analysis to inspect /absolute/path/to/my-project. Create a debug case, identify the project and available checks, inspect the relevant function, and report evidence-backed findings. Ask before executing project code unless I have already authorized it.
To enable REA and Craft, follow Backend setup. To inspect their readiness:
npm run doctordoctor exits with status 1 when either backend is missing. That does not prevent the independent source-analysis tools from working.
Tools
Tool | Purpose |
| Inspect local runtime readiness, page through investigations, and list configured checks. |
| Create a |
| Identify project languages, manifests, available adapters, and named checks; select an appropriate route. |
| Search a live REA or Craft catalog and retrieve an exact tool's input schema. |
| Invoke an allowed upstream tool and retain its original response and session identity. |
| List files, search literal text, or read source with line numbers. |
| Run AST, lint, Git, Semgrep, stack symbolization, or log analysis through one structured interface. |
| Collect bounded evidence for a selected function and files, with explicit coverage gaps. |
| Execute an authorized, named project check and retain logs, exit status, and parsed results. |
| Read summaries, typed items, JSON Pointer fields, or paged original JSON. |
| Save a caller-authored diagnosis, verification level, recommendations, and evidence references. |
| Validate a saved finding and write its diagnosis and repair/test request to Craft. |
| Generate a Markdown report with findings, evidence, coverage, and limitations. |
| Close backend sessions and release subprocesses while retaining evidence. |
The server also provides the reverse_app, debug_app, and optimize_app prompts.
Analysis adapters
Select an adapter with workbench_analyze.analysis.kind:
Kind | Capability | Requirements and limits |
| Function ASTs, Tree-sitter queries, and syntactic call candidates. | Included WASM grammars for Python, C/C++, Go, JS/TS/TSX, Rust, Java, Swift, and Objective-C. No whole-program type resolution or runtime call graph. |
|
| Local Git repository; shallow clones have limited history. |
| Ruff, clang-tidy, golangci-lint v2, ESLint, or SwiftLint. | Install the relevant tool separately. ESLint requires execution authorization because it can load executable configuration. |
| Search for candidate bug patterns using local rules. | Optional Semgrep; three small bundled rules, or a caller-selected rule file inside the source root. No remote rule registry is fetched. |
| Parse stacks and map native addresses to source locations. | Native lookup needs LLVM symbolizer or addr2line, matching symbols, and an explicit load bias for runtime addresses. |
| Parse compiler diagnostics, JUnit, Jest/Vitest JSON, pytest JSON reports, Go test JSONL, and text stacks. | Input text or a local log file. Unknown formats and unparsed lines remain explicit. |
Missing tools, malformed scanner output, and skipped analysis are reported explicitly. A static warning is a candidate issue; absence of warnings does not prove correctness. See Configuration and adapter setup.
Example: investigate a crashing function
Call workbench_create_case:
{
"mode": "debug",
"target": "/absolute/path/to/project",
"source_root": "/absolute/path/to/project",
"goal": "Find why countItems crashes on missing input",
"expected": "Return zero for missing input",
"actual": "TypeError while reading length",
"allow_execution": true
}Set allow_execution: true only when you authorize running this project's checks. Use the returned UUID to call workbench_triage, then workbench_investigate_crash:
{
"case_id": "<returned-case-uuid>",
"function_name": "countItems",
"target_file_filter": ["src/items.js"],
"timeout_ms": 60000,
"max_lines": 200
}The workflow chooses available adapters, records each result, and explains skipped capabilities. The first file is used for function selection and blame; additional files provide context. include_backends: true requests supplementary REA/Craft analysis where applicable. Ordinary source code is not treated as a compiled binary.
Next, the client reads evidence, considers alternative explanations, and runs a check by an exact name returned from triage, such as npm-test:. or swift-test:Packages/Core. It records a finding, optionally hands it to Craft using the returned finding_id, writes a report, and closes the case.
Evidence and limits
Tool results are JSON. Original responses, command output, arguments, timestamps, identities, and hashes remain in local evidence records.
workbench_read_recorddefaults toview: "summary"; useitems,field, orrawfor detail. Follownext_offsetwhen present.Location grouping preserves separate observations and references. It does not infer a shared root cause.
A
reproducedfinding requires a completed project-check record and reproduction details. Its causal interpretation remains the caller's responsibility.Craft handoffs use the saved finding and revalidate its evidence hashes. Cross-case references and changed evidence are rejected.
Analysis accepts at most 10 exact relative file paths, defaults to 30 seconds, and has a 120-second maximum.
max_linesbounds returned rows/nodes, with truncation and coverage reported.Named project checks support up to 600 seconds. Default storage budgets are 16 MiB per record and 256 MiB per case, with at most 3 active cases. Backend-owned databases are outside that disk budget.
Closing a case retains its records. Restarting the server does not restore old upstream sessions or make their IDs valid in new sessions.
Evidence can contain source code and logs. It stays under .workbench/ by default; your MCP client controls what it sends to its model provider. Review evidence before sharing it. Source inspection does not execute the target, but authorized checks and executable linter configuration do. This server is not an operating-system sandbox.
Development and verification
npm run check
npm test
# Optional: requires ready REA/Craft backends plus Ruff and Semgrep
npm run test:integrationThe default suite is self-contained and does not need backend installations, credentials, or a production application. It covers MCP contracts, source analysis, evidence integrity, project checks, failure handling, resource limits, and backend checkout preservation.
The optional integration test uses the deliberately broken crash demo. It exercises real REA/Craft, Tree-sitter, Ruff, Semgrep, JUnit parsing, a failing reproducer, a Craft handoff, reporting, and cleanup. Its receipt is written to .workbench/last-integration.json. Real native decompilers, browsers/devices, paid coding agents, and all optional linters are outside that test's coverage.
See CONTRIBUTING.md for contribution and verification guidance.
Upgrading from 0.1
workbench_handoff_to_craftnow takesfinding_id, rather than independent diagnosis, verification, and evidence fields. Record the finding first.workbench_read_recordnow defaults to a summary. Specifyview: "raw"for the previous text-pagination behavior. Existing record IDs and stored evidence remain readable.
License and acknowledgements
App Analysis MCP is released under the MIT License. REA and Craft Anything remain separate upstream projects with their own licenses. This repository contains the integration layer, not bundled upstream source or binaries. See THIRD_PARTY.md.
Available Tools
14 toolsworkbench_analyzeB
Structured analysis: Tree-sitter AST/query including Swift and syntactic call edges; Ruff/clang-tidy/golangci-lint/ESLint/SwiftLint; Git diff/blame/log; addr2line/LLVM symbolizer; local Semgrep rules; compiler/test/stack parsing. Missing tools or malformed output never imply a clean scan. ESLint requires execution authorization.
Inputs: case_id (required), analysis (required), target_file_filter (required), max_lines, +1 more.
workbench_callB
Call an exact advertised upstream tool. Stores the original response with arguments, runtime/session identity and hash. Returns a compact preview and record ID. Failures are retained and surfaced as errors.
Inputs: tool (required), backend (required), case_id (required), arguments.
workbench_close_caseA
Close this case’s two upstream sessions and release subprocesses. Retains original evidence. New calls create new sessions; old upstream IDs and target state are not restored.
Inputs: case_id (required).
workbench_create_caseA
Start a shared reverse-engineering, bug-diagnosis or optimization investigation. Set source_root for source inspection. allow_execution authorizes named project test commands only; use it only with user authorization.
Inputs: goal (required), mode (required), target (required), actual, +4 more.
workbench_discover_toolsARead-only
Search a live backend catalog. Use exact_name to get its actual JSON input schema before calling. callable indicates this wrapper’s reviewed policy, not provider readiness.
Inputs: backend (required), case_id (required), limit, query, +2 more.
workbench_handoff_to_craftA
Persist an evidence-linked diagnosis and repair/test request into the real Craft Anything investigation via core_handoff_write. This prepares the coding agent handoff; it does not secretly invoke a paid model or edit source. The host/Craft coding agent then generates the fix and tests.
Inputs: case_id (required), finding_id (required), constraints.
workbench_inspect_sourceBRead-only
Inspect the caller-selected source_root: list files, literal search or a line-numbered read. No code is executed. Symlinks and generated directories are excluded from discovery. Partial coverage is explicit.
Inputs: action (required), case_id (required), path, limit, +2 more.
workbench_investigate_crashB
Bounded crash evidence collection for exact files: function AST/call candidates, Semgrep, language linter, Git blame/log, optional stack mapping, then two-engine static context. Does not claim an automatic root cause. Every step retains its structured output and failure state.
Inputs: case_id (required), function_name (required), target_file_filter (required), stack, +8 more.
workbench_read_recordARead-only
Read evidence as a compact summary with location-grouped diagnostics, typed items, a JSON Pointer field, or complete original JSON text. Related records are grouped only by location, not assumed to share a root cause. Follow next_offset; sha256 always covers the complete stored record. Raw offsets count UTF-16 units; structured offsets count rows.
Inputs: case_id (required), record_id (required), view, limit, +5 more.
workbench_record_findingB
Record a caller-authored, evidence-linked finding. reproduced requires an actual completed project check and reproduction details. Do not classify inference or fake-provider tests as real-provider verification.
Inputs: title (required), case_id (required), category (required), severity (required), +7 more.
workbench_reportB
Write a new Markdown investigation report with findings, evidence index, engine coverage and verification limitations. Never claims there are no bugs because no finding was recorded.
Inputs: case_id (required).
workbench_run_checkA
Execute one configured or currently declared project check by its exact discovered name. Requires case allow_execution=true. Captures exit code, bounded original logs, parsed XCTest/TAP results and compiler diagnostics; timeouts/cancellation are never reported as passing.
Inputs: check (required), case_id (required), timeout_ms.
workbench_statusARead-only
Check local repositories, runtime entrypoints, active cases, a page of stored cases and available project checks. Follow cases_page.next_offset for more cases. Does not launch either engine.
Inputs: limit, offset.
workbench_triageB
Read project manifests and sample languages; discover named test/lint/typecheck commands and installed adapters without executing project code. Source projects receive a plan; compiled/ASAR artifacts or explicit target_type=javascript/native/artifact use the appropriate real backends. Missing capability is explicit.
Inputs: case_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Tools map cleanly onto a case lifecycle (status, create, triage, discover, call, inspect, run, read, record, report, close) with distinct purposes. The main overlap is workbench_analyze vs workbench_investigate_crash, since the crash tool bundles the same AST/linter/Semgrep/git primitives as analyze; workbench_call also acts as a generic escape hatch that could tempt use where run_check or analyze is intended. Descriptions largely resolve these boundaries.
All 14 tools share a workbench_ prefix and snake_case, with verbs mostly leading (create_case, run_check, record_finding, close_case). A few names are noun-only or ambiguous as verb/noun (workbench_status, workbench_report, workbench_triage), a minor deviation from the verb_noun pattern. Still highly predictable and scannable.
14 tools sit in the well-scoped 3-15 range and each covers a distinct stage of an investigation workflow rather than duplicating surface. Nothing appears redundant or filler, and the count reflects the genuine breadth of triage, evidence capture, execution, and reporting.
Full case lifecycle is covered: creation, triage, source inspection, check execution, evidence reading, finding recording, reporting, handoff, and close. Gaps are minor: there is no way to update or supersede a recorded finding, and no explicit resume/reopen operation for a closed case. Agents can work around these by creating new cases or records, but the surface is not entirely dead-end free.
Maintenance
Related MCP Connectors
Discover software problems, analyze evidence, and create implementation-ready Build plans.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Read-only release evidence for coding agents: findings, deliveries, source and runtime data.
Diagnose exported Airflow DAG source and task incidents with evidence and explicit coverage gaps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to inspect backend systems through structured engineering tools including Git history, Winston logs, OpenAPI contracts, and sandboxed source code.2ISC
- FlicenseCqualityCmaintenanceEnables MCP clients to run evidence-first engineering investigations by gathering code, Git, log, and test evidence while avoiding fabricated root-cause claims.27-
- AlicenseAqualityBmaintenanceEnables users to build and continuously refresh a code index of a repository, then query it to answer architecture, impact, tracing and log questions with verifiable evidence lines. Also checks Java, Kotlin and TypeScript/JavaScript names against real sources and classpaths, and supports commit review and Minecraft/JVM analysis directly from an agent session.51Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to inspect local software structure, code, and runtime behavior through evidence-backed analysis, including sources, coverage, and limitations.1MIT