ChangeAtlas

io.github.robyrorov0.1.0更新于 Oct 9, 2026

Local Git change impact and related test discovery with inspectable import paths

已验证STDIO仅桌面Files & StorageDeveloper Tools

概览

AI 生成的概览

ChangeAtlas 让助手检查本地 Git 仓库,找出可能受某次改动影响的文件和测试,并给出可核查的导入路径。

功能
它从受跟踪的 Python、JavaScript 和 TypeScript 文件构建本地导入图,并从被改动文件沿反向链接找到附近的模块和测试。它提供四个工具:repository_overview、analyze_changes、trace_file 和 find_tests。结果会包含每个建议背后的文件链,analyze_changes 会把工作区(含已暂存改动)与某个 Git 提交比较。它不会运行项目代码、测试命令、包管理器或 Git 钩子。
适用场景
当你改动了某个模块,想在提交前得到一份简短、有依据的待检查位置清单时使用。它适合静态导入关系足以提示相关文件和测试的本地仓库。它不判断改动是否安全,也不判断测试是否覆盖了某个行为。
运行要求
需要 Python 3.11 或更高版本以及 Git。服务器通过 stdio 在本地运行,需要把 CHANGEATLAS_ROOT 环境变量设为要检查的 Git 仓库绝对路径。根目录由运行服务器的人设定,工具调用无法更改。
安装前请注意
它在本机读取仓库内容,不会把内容发送到外部服务。它会解析路径并拒绝指向所配置仓库之外的文件,文件和结果数量有固定上限。它无法跟踪运行时导入、包别名、monorepo 路径映射或非代码依赖,建议的测试只是导入路径,并非覆盖率结论。

安装

在 SourceWeft 中

  1. 打开 控制台中的 ChangeAtlas,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ChangeAtlas

ChangeAtlas shows which local files and tests may be affected by a Git change. It follows static imports and returns the file path behind every link, so you can inspect the evidence yourself. It runs on your machine, reads your repository, and does not send its contents to a service.

It is useful when you have changed a module and want a short, grounded list of places to check before committing. It does not decide whether a change is safe or whether a test covers a behavior.

Install

Requires Python 3.11 or newer and Git.

bash
pip install mcp-changeatlas

Point it at the exact root of a Git repository:

bash
mcp-changeatlas --root /path/to/repo overviewmcp-changeatlas --root /path/to/repo changes --base HEADmcp-changeatlas --root /path/to/repo trace src/app/core.pymcp-changeatlas --root /path/to/repo tests src/app/core.py

For an MCP client, configure a stdio server with command mcp-changeatlas and arguments --root, the repository path, and serve. For example:

json
{  "mcpServers": {    "changeatlas": {      "command": "mcp-changeatlas",      "args": ["--root", "/path/to/repo", "serve"]    }  }}

The four tools are repository_overview, analyze_changes, trace_file, and find_tests. The root is set by the person running the server and cannot be changed by a tool call.

The Docker image is for directory build checks and a self-contained demo. It analyzes the repository snapshot inside the image. To analyze your own work, install the package locally and set --root to your repository.

How it works

ChangeAtlas reads tracked Python, JavaScript, and TypeScript files and builds a local import graph. Python imports are parsed with the standard library AST. JS/TS relative import, export, and require links are found statically. It follows reverse links from a changed file to nearby modules and tests, up to a chosen depth. Results include the file chain that led to each suggestion.

analyze_changes compares the working tree, including staged changes, with a Git commit. include_untracked adds untracked file names. It never runs project code, test commands, package managers, or Git hooks. It resolves paths and rejects files that point outside the configured repository. File and result counts have fixed limits.

This first release resolves local Python imports and relative JS/TS imports. It cannot follow runtime imports, package aliases, monorepo path mappings, or non-code dependencies. Deleted and unsupported files are shown under unindexed_changes; an incomplete result is marked as such. A suggested test is a path through imports, not a coverage claim.

Development

bash
python -m venv .venvpython -m pip install -e ".[dev]"pytestruff check .mypypython -m build

Publishing

The package name and MCP Registry name are set in pyproject.toml, README.md, and server.json. Before the first PyPI release, create a pending trusted publisher for robyroro/mcp-changeatlas, workflow release.yml, environment pypi. Then publish a GitHub release tagged with the matching package version. The release workflow runs tests and publishes the wheel and source archive through PyPI's trusted publishing flow.

Once the exact version is visible on PyPI, run the Publish to MCP Registry GitHub Actions workflow. It validates server.json and publishes it with GitHub OIDC, following the Registry publisher guide. The registry is a separate publication step. A repository or PyPI release alone does not create a registry listing.

License

MIT

来源:README.md,提交 64fc723

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.1.0最新Oct 9, 2026