
Angular Signal Forms Migration Mcp
io.github.Alvi97由 GitHub 账号 Alvi97 发布v0.9.1更新于 Oct 24, 2026
Finds Angular Reactive Forms and returns verified Signal Forms recipes. Never edits code.
概览
一个本地 MCP 服务器,在代码库中定位 Angular Reactive Forms,并返回经核实的 Signal Forms 前后对照改写方案,不修改任何文件。
- 可以做什么
- 在指定路径中查找 Reactive Forms 构造,并区分机械式改名与需要人工判断的部分
- 查询某个构造经核实的前后对照改写方案,附带注意事项与来源信息
- 评估迁移工作量并建议从哪个文件开始,或把整份报告输出为一份 markdown 文档
- 检查已迁移的文件中那些能编译但实际仍有问题的陷阱
- 当项目低于 v21 时给出 Angular 升级方案
- 适用场景
- 适合在把 Angular 应用从 Reactive Forms 迁移到 Signal Forms 时使用,让编码助手依据对照真实 Angular 版本核实过的方案工作,而不是凭模型记忆。也适合评估迁移规模或复核已完成的迁移。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js 20 或更高版本。无需账号、API 密钥或环境变量。要获得迁移建议,项目应为 Angular 21+ 且 moduleResolution 支持 exports(bundler、node16 或 nodenext);低于 v21 时只返回升级方案。可选环境变量 SIGNAL_FORMS_MCP_NO_UPDATE_CHECK 可关闭每日版本检查。
安装
在 SourceWeft 中
- 打开 控制台中的 Angular Signal Forms Migration Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
angular-signal-forms-migration-mcp
An MCP server that helps an AI coding agent migrate Angular Reactive Forms to Angular Signal Forms.
It finds the Reactive Forms constructs in your codebase, separates the safe mechanical renames from the ones that need a human decision, and hands back before→after recipes that are verified against a real Angular release rather than written from memory.
Install
Requires Node.js 20+. Nothing to clone — npx fetches it on demand.
Or add it to any MCP client config:
@latest makes npx re-resolve on every launch, so restarting your editor picks up new
releases. Without it, npx keeps serving whichever version it cached first — repoint the
config at @latest, or clear the cache with npm cache clean --force.
The server also checks for a newer version once a day and writes a one-line notice to
stderr. It is throttled, times out after 2 seconds, never touches stdout, and stays
silent on any failure. To turn it off, add
"env": { "SIGNAL_FORMS_MCP_NO_UPDATE_CHECK": "1" } to the config block above. To see what
is actually running:
[!IMPORTANT] Do not
npm installthis into your Angular app. It is a standalone process your editor spawns, not a library your project depends on.npxkeeps it in a cache outside your project entirely.
[!NOTE] It detects and advises. It never edits your code. There is no tool here that writes to your source files, and there never will be. The server returns findings and recipes; your agent decides what to change and makes the edits, so every change still goes through your normal review and version control.
What it looks like
Prerequisites it checks before advising anything
A migration report leads with the things that make migration impossible, because a plan you cannot execute is worse than no plan:
- Angular 21+.
@angular/forms/signalsdoes not exist before v21. Below that the server returns an upgrade plan instead of a migration plan. - Declared and installed versions agree. An old branch checked out over newer
node_modulesstraddles the v21 line. Migrating against what is installed means the nextnpm cireverts you to a version where the target API is absent — so the server refuses to pick a side and says so. moduleResolutionis exports-aware (bundler,node16, ornodenext).@angular/forms/signalsis a package-exports subpath; legacynoderesolution cannot see it, and the import fails with an error that looks like a missing dependency.
Tools
Full parameters, response shapes and scope limits: docs/TOOLS.md.
How the recipes are verified
Signal Forms is new and is not reliably present in any model's training data — recipes written from memory are wrong in ways that look right. So none of these are.
Recipes are verified against Angular v22 using the official Angular CLI MCP server,
cross-checked against angular.dev, and carry structured provenance
(verifiedAgainstVersion, retrievedISO, sources) that ships in the tool response so
your agent can judge how current the advice is. A recipe with an empty sources list
fails CI.
Where the docs do not answer the question, the recipe says so in its caveats rather
than inventing an answer — UNVERIFIED — confirm on <url>, or UNVERIFIED — tool-authored guidance where Angular documents no migration path at all (the RxJS stream tiers are the
main case: the primitives are documented and compile, but choosing between them is this
tool's judgement, not Angular's). 14 of 37 recipes currently carry such a marker. That
is the honest part of the output, not an oversight — and a test keeps this number true.
The recipes also compile. CI installs a real @angular/forms@22 and typechecks
fixtures exercising every API the recipes use, so a recipe naming a function that does not
exist — or calling it with the wrong argument shape — fails the build. That is what
established disabled(path, { when }) as the v22 signature; the docs demonstrate neither
it nor the nested schema() + apply() composition.
Two things this caught that memory gets wrong:
- The binding directive is
[formField]/FormField— not[control]/Control, which appeared in pre-release v21 material and is what models reproduce. disabled()/hidden()gained an options-object form on v22 and marked the bare callback@deprecatedrather than removing it — so a v21-shaped rule still compiles, with a warning. Established by diffing the shipped overloads, not the guides.
Recipes whose behaviour genuinely differs across releases carry a VERSION-SENSITIVE
caveat naming the form each version takes, and the server resolves them against your
project's detected version. Read the caveats array — that is where the sharp edges
live.
The re-verification procedure for a new Angular release is REVERIFICATION.md.
It tells you when there is no clean answer
Not every Reactive Forms pattern has a Signal Forms equivalent, and a migration tool that
pretends otherwise is worse than none. Form streams are graded by the RxJS operators in
their .pipe() chain:
For the hard tier the recipe says so outright and offers three real strategies — async
validation rules, rxResource, or keeping RxJS behind toObservable/toSignal — rather
than inventing a one-liner that does not exist.
Likewise addControl() / removeControl() have no counterpart at all: the field tree is
derived from the model signal's type. The recipe explains the three actual answers instead
of implying an API that would not compile.
What it will not do
- Edit your files. By design, permanently.
- Prove your migration is correct.
verify_migrationproves the absence of known defects. Run it aftertsc, not instead of it. - Migrate template-driven forms.
ngModelmigration is undocumented upstream; guessing it would be the exact failure mode this project exists to avoid. - Read template literals with
${...}substitutions, because their text is not what the Angular compiler sees. Inlinetemplate:strings without substitutions are scanned. - Scan CSS/SCSS, or resolve types across files — detection is a single-file syntactic
pass, not a
ts.Program.
ROADMAP.md tracks these; the migration report repeats them in its own "Scope" section rather than letting the totals imply completeness.
Why not just the official Angular MCP server?
Use both. The official @angular/cli MCP server knows about Angular; this one knows
about migration — which constructs exist in your code, which are mechanical, which need
a decision, and what the verified replacement is. Your agent can pull findings and recipes
from here, then confirm anything current or project-specific there before it edits.
Status
Feature-complete through M16. Six tools ship, with doc-verified recipes covering basic
constructs, arrays, runtime shape mutation, async validators, custom controls, the three
RxJS stream tiers, reading and writing form state, submission, model-shape constraints,
CSS status classes, spec-file migration, and the .html template layer — bindings, state
reads, the <select multiple> blocker, and the silent error-key rename.
The transport is stdio, so stdout is reserved for the protocol and all logging goes to stderr.
Contributions and local development: CONTRIBUTING.md.
License
MIT
来源:README.md,提交 5d71d9f
工具
0版本历史
1- v0.9.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分