
Understand Anything - MCP
io.github.uamcp由 GitHub 账号 uamcp 发布v1.2.16更新于 Oct 24, 2026
A powerful MCP server for codebase architecture analysis and automated governance.
概览
一个本地 MCP 服务器,读取预先构建的 Understand-Anything 知识图谱,让助手分析代码库依赖、影响范围和架构规则。
- 可以做什么
- 查询文件的被依赖方与调用方,并沿图谱传递闭包做影响分析。在修改文件前执行架构风险预检,风险过高时弹出确认提示。读取图谱健康状态、节点与边统计、模块分组和高扇入文件报告。解释单个文件的一跳依赖并生成上手说明。执行自定义架构规则并校验图谱结构(Pro 版)。
- 适用场景
- 适用于项目已提交 Understand-Anything 知识图谱,并希望助手在改动前分析依赖关系、评估修改影响范围,或在合并前执行架构边界约束的场景。
- 运行要求
- 需要 Node.js v18 或更高版本,通过 npx 在本地运行。环境变量 UA_PROJECT_PATH 必须指向包含 .ua/knowledge-graph.json 的项目,该文件需先用独立的 Understand-Anything 扫描器生成。Pro 工具需要 UA_LICENSE_KEY,免费工具无需。
安装
在 SourceWeft 中
- 打开 控制台中的 Understand Anything - MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Understand-Anything MCP Server
[npm version] [license] [GitHub stars]
A Model Context Protocol (MCP) server that empowers your AI agents to understand your entire project architecture, and a headless CI gateway to enforce architectural rules before code is merged.
Quick Start
[!NOTE] Prerequisite:
ua-mcpis a lightweight reader that connects your AI assistant to your local Understand-Anything knowledge graph. It does not build the graph itself. You must install the core scanner from Egonex-AI/Understand-Anything and run/understandin your project to produce the.ua/knowledge-graph.jsonfile. Commit this file to your repository before proceeding.
Get your AI assistant hooked up with architectural context in 60 seconds. ua_find_callers, ua_impact_analysis, and ua_precheck work immediately for free with no license key required!
Claude Desktop
Add this to your claude_desktop_config.json:
Cursor
- Go to Settings > Features > MCP.
- Click + Add new MCP server.
- Name:
understand-anything - Type:
command - Command:
npx -y ua-mcp - Add an environment variable:
UA_PROJECT_PATH = /absolute/path/to/your/project
How UA-MCP compares to Understand-Anything Tool
The free upstream Understand-Anything tool is responsible for generating the local knowledge graph and performing manual local analysis. UA-MCP sits on top of this graph to provide an automated governance layer and safety net for your codebase. While the free tool is a diagnostic scanner, UA-MCP actively blocks risky merges via its CI/branch-protection gate (ua-ci) and enforces your custom .ua-rules.json architectural boundaries.
Privacy Policy
[!IMPORTANT] Link to Privacy Policy
Data Processing Details:
- License keys and email addresses are securely stored for billing purposes.
- Purely local, no network calls:
ua_status,ua_scan,ua_graph_summary,ua_explain,ua_onboarding_doc.- Sends graph data to the backend:
ua_precheck(Free and Pro), and all Pro-only tools (ua_rules,ua_ci_check,ua_find_callers,ua_impact_analysis,ua_validate_graph). When these tools are used, the full local graph object is sent to our backend for CI risk analysis, rule evaluation, and quota validation. All Pro-tier computation is handled remotely.- No source code contents are transmitted, only graph metadata (file paths and import relationships). All backend graph processing is done purely in-memory per-request and is never persisted.
Security Considerations
UA_API_URLdefaults to the official backend (https://ua-mcp-backend.onrender.com). Be extremely cautious if you change this to a custom endpoint, as the third-party backend will receive your full knowledge graph and source file paths.- Self-Hosting: If you are self-hosting the backend, note that a PostgreSQL
DATABASE_URLis required in production. SQLite is not supported for production deployments.
🚀 Features
- Branch Protection / CI Gate: Automatically block high-risk PRs based on the codebase graph.
- Architectural Rules: Define custom
.ua-rules.jsonto enforce boundaries. - Blast Radius Analysis: Detect exactly which downstream files will break if a module is modified.
- On-Demand Knowledge Graph: Let Claude instantly query dependencies across massive codebases without filling its context window.
[!TIP] System Instruction Recommended: For the best experience, add the following to your AI assistant's system prompt or custom instructions: "Always call
ua_precheckbefore modifying any file in this project."
How it works
- Your AI agent decides it wants to modify a critical file (e.g.,
src/auth.ts). - The agent (following its system instructions) triggers
ua_precheckbefore making the edit to run an Architectural Safety Linter. - The server analyzes the graph to determine the "blast radius" and checks it against your rules.
- If the blast radius is too large or violates a rule, a Safety Checkpoint (Elicitation Prompt) interrupts the agent, asking for your explicit confirmation before proceeding.
Configuration Rules (.ua-rules.json)
You can define specific boundaries in a .ua-rules.json file in the root of your workspace to dictate what the LLM is allowed to touch.
🔒 Usage: CI/CD Branch Protection (Enforcement)
CI Gateway (ua-ci)
A companion CLI that runs locally in your GitHub Actions or GitLab CI. It parses your PR diff and compares it to the local graph.
- Free Tier: Evaluates blast-radius and logs the risk level.
- Pro Tier: Automatically blocks the merge if the risk is
HIGHor violates architectural rules.
[!IMPORTANT] The True Enforcement Backstop: While local agents rely on system instructions to run
ua_precheck, theua-cicommand is designed to be your unbypassable safety net. By runningua-ciin your GitHub Actions and requiring it as a status check in GitHub Branch Protection, you ensure that no rogue edits can ever be merged into production without explicit approval.Note on Free Tier: If a valid Pro license key is not detected in the environment variables, the CI check will log a warning and silently pass (exit 0) so it does not block builds for non-paying users.
🛡️ Usage: Local Governance (Agents)
When connected to Claude Desktop or an MCP client, the following tools become available to the agent:
Claude Desktop (claude_desktop_config.json)
Add the following to your Claude Desktop config file (usually ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
Cursor
- Go to Settings > Features > MCP.
- Click + Add new MCP server.
- Name:
understand-anything - Type:
command - Command:
npx -y ua-mcp
Continue
Add to your config.json under mcpServers:
Available Tools & Tiering
The Understand-Anything MCP Server operates on a tiered licensing model.
Core Tools (Free Tier)
Available out of the box with no license required.
ua_find_callers: Retrieves reverse dependencies up to 2 hops (Now unlimited and free!).ua_impact_analysis: Retrieves full transitive closure of reverse dependencies (Now unlimited and free!).ua_precheck: Pre-flight architectural risk check (10 checks/day, default critical-path rules only)ua_status: Returns MCP health status.ua_scan: Forces a re-scan of the workspace.ua_graph_summary: Returns aggregated node/edge statistics.ua_architecture_report: Groups files by top-level modules.ua_dependency_report: Identifies files with the most incoming dependencies (fan-in).ua_explain: Retrieves 1-hop dependencies for a specific file.ua_onboarding_doc: Generates onboarding context.
Premium Tools (Pro Tier)
Pro Tier — Architectural Enforcement & CI Safety
Team Use: One Pro license key can be shared across your entire team's CI pipelines and MCP configurations — no per-seat pricing.
ua_rules&ua_rules_check: Enforce custom.ua-rules.jsonboundaries. Evaluates constraints to ensure recent changes haven't introduced violations.ua_ci_check&ua-ci: Block risky PRs in GitHub Actions before they reach production. Analyzes Git PR diffs for architectural impact.ua_precheck: Unlimited pre-flight checks with configurable critical paths and .ua-rules.json enforcementua_validate_graph: Checks the knowledge graph schema for corruption.
Pricing
Get your license key:
Troubleshooting
- Server fails to start: Ensure you have Node.js v18 or later installed.
- License key error: Verify your key in the
.envfile or Claude config matches the one on your dashboard. - Path not found: Ensure
UA_PROJECT_PATHis absolute or resolves correctly relative to where the server runs.
License
MIT License
来源:README.md,提交 fceb5cd
工具
0版本历史
1- v1.2.16最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分