Formly Agent Contracts
Click on "Install 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., "@Formly Agent ContractsGet the profile form contract and generate a typed Playwright E2E intent."
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.
Formly Contract
Formly Contract turns selected Angular Formly configurations into deterministic, versioned JSON. Test authors and coding agents can use that JSON to understand a form without loading Formly runtime objects or inventing selectors.
Pre-release status: schema, compiler, workspace, and Angular runtime-host packages are prepared for an initial npm release but are not published yet. A private driver-binding experiment exists, but a production MCP server, automatic Playwright generation/execution, and live-browser observation are not shipped.
Read the documentation · See current product status · Integrate an Angular forms library · Run a workplace pilot
What you get
A Form Contract can describe:
controls, groups, display content, and repeatable templates in source order;
model paths, Formly types, labels, constraints, choices, and defaults;
declared or scenario-resolved visibility, required, readonly, and disabled state;
exact or application-derived locator candidates such as
data-testidanddata-cy;reviewed interaction semantics for custom field types; and
explicit diagnostics and unknowns when behavior cannot be projected safely.
Contracts are strictly validated, canonically serialized, and content-hashed, which makes unexpected form changes visible in source control or CI.
Related MCP server: SpecBridge MCP
Is this for your project?
Formly Contract is useful when your team:
builds substantial Angular forms from Formly configuration;
wants reviewable form metadata for E2E planning, CI checks, or coding agents;
needs locator evidence without allowing tools to invent CSS or XPath; or
wants unsupported and dynamic behavior reported explicitly instead of hidden behind a best-effort result.
It is build-time tooling, not a replacement for Formly or a browser test runner. It is also still pre-release: use the repository-linked packages for an evaluation today, but do not expect a drop-in npm install, MCP server, or automatic Playwright suite yet.
How it works
application-owned Formly factories
|
explicitly registered roots
|
declared or scenario compilation
|
validated, content-hashed contracts
|
workspace index / CI / E2E tooling / agentsChoose the forms. The application explicitly registers complete form roots. Formly Contract does not guess which exports represent real forms.
Generate trusted evidence. Node-side tooling projects declared configuration or runs an intentionally configured synthetic scenario.
Publish deterministic artifacts. Contracts and indexes are validated, canonically serialized, and linked by stable IDs and hashes.
Consume without guessing. Tests and agents read semantic model paths, constraints, choices, states, and locator candidates. Missing evidence stays missing.
A generated contract has this representative shape (abridged):
{
"schemaVersion": "0.4.0",
"formId": "profile.edit",
"nodes": [
{
"id": "profile.edit::path:s_profile.s_name",
"kind": "control",
"modelPath": ["profile", "name"],
"semanticType": "text",
"constraints": [{ "kind": "required" }],
"locators": [
{
"strategy": "testId",
"attribute": "data-testid",
"value": "profile-name",
"confidence": "exact",
"evidence": "declared"
}
],
"evidence": "declared"
}
],
"diagnostics": [],
"contentHash": "sha256:…"
}The real schema contains additional normalized fields and strict validation; this example highlights the information a consumer usually starts with.
Try the repository
Prerequisites:
Node.js
22.22.1(packages support>=22.13.0 <23)pnpm
10.23.0
pnpm install --frozen-lockfile
pnpm demopnpm demo builds the core package slice and prints a canonical contract for a
synthetic form. Run the full repository gate with:
pnpm checkThat command runs linting, tests, builds, package checks, the demo smoke test, and documentation validation.
Extract one form
Use the compiler in trusted Node-side build or test tooling when you already
have a fresh FormlyFieldConfig[]:
import type { FormlyFieldConfig } from '@ngx-formly/core';
import { extractFormContract } from '@formly-contract/compiler';
const fields: FormlyFieldConfig[] = [
{
key: 'profile.name',
type: 'input',
props: {
label: 'Name',
required: true,
attributes: { 'data-testid': 'profile-name' },
},
},
];
const { contract, diagnostics } = extractFormContract({
formId: 'profile.edit',
fields,
});Declared extraction does not execute callbacks, subscribe to Observables, or
render Angular components. Unsupported behavior is reported in diagnostics
instead of being guessed or silently discarded.
For repository-wide generation, explicitly register application-owned form roots and use the workspace CLI:
pnpm exec formly-contracts list
pnpm exec formly-contracts generate
pnpm exec formly-contracts checklistinventories configured projects and sources without running form factories, retaining healthy inventory plus safe per-config failures.generatewrites content-addressed contracts and publishes the workspace index last.checkverifies the expected canonical bytes without changing generated output.author-factory-inputsis an optional, read-only aid for reviewing supported typed factory inputs.
Use repeatable --project selectors when every project config loads, or an
exact workspace-relative --project-config selector to avoid importing a
known browser-only sibling. Selected runs publish a separate deterministic
scoped index.
The packages are not available from npm yet. Follow the
installation guide to use
the latest GitHub pilot RC, build and link a sibling checkout, or create a
portable pnpm pilot:pack tarball bundle, then use the
end-to-end workspace guide for
configuration and form registration.
Packages
Package | Responsibility | Status |
Versioned DTOs, strict parsers, canonical JSON, hashing, profiles, effects, and pure query data |
| |
Allowlisted declared extraction and trusted Formly scenario compilation |
| |
Trusted config loading, discovery, generation, checking, source usage, and CLI tooling |
| |
Guarded project-local Angular JIT runtime hosting and disposable worker composition |
| |
Trusted-local driver inventory and validated-plan call-binding experiment |
|
The main dependency direction is:
angular -> workspace -> compiler -> schema
playwright -----------------------> schemaSee the package guide for ownership boundaries and public entry points.
Evidence, not guesses
Formly Contract keeps three kinds of evidence separate:
Evidence | Meaning | Available now? |
Declared | Safely projected from supplied Formly configuration | Yes |
Resolved | Produced by a controlled Formly build for a synthetic scenario | Yes |
Observed | Captured from a rendered browser DOM | Schema-ready; capture is not implemented |
A resolved value is never presented as browser-observed. Empty locator arrays, opaque callbacks, asynchronous behavior, and incomplete source coverage remain explicit rather than being replaced with inferred values.
Current boundaries
Available today:
Form Contract schema
0.4.0, runtime validation, canonical JSON, and SHA-256 hashes;declared extraction and trusted scenario compilation for Formly 6.x;
deterministic multi-project discovery and artifact generation;
explicit form registration and optional direct-call source indexing;
custom-field profiles, cross-field effect metadata, and browser-safe compact authoring for reviewed choice, input, autocomplete, row-selection, repeater, stepper, and wrapper behavior;
pure agent-context queries plus strict typed test-intent validation and source-bound canonical plans over caller-assembled artifacts; and
Angular CLI, Nx, and browser-rendered synthetic examples.
Not shipped:
a production MCP server or CLI-managed query service;
automatic test-intent generation or executable Playwright/Cypress tests;
browser-executing field drivers or live DOM observation;
automatic route/render discovery or complete interprocedural source tracing; and
compact authoring presets beyond the current closed behavior vocabulary.
The optional source index recognizes a deliberately narrow direct-call convention and fails closed when it cannot prove an exact link. It does not execute or serialize application call arguments. Read the product status for the precise capability boundary.
Supported environment
The complete Angular runtime-host package supports Angular 20.x with Formly
6.x. The deepest compatibility coverage uses Angular 20.3.29 with Formly
6.1.8; validate other minor or patch combinations in the consuming
application. The compiler itself peers only on Formly 6.x.
The compiler and workspace packages are Node-side tooling and should not enter
an Angular browser bundle. Paired custom-field declarations and production
type registration use the schema package's dedicated browser-safe
@formly-contract/schema/field-type-authoring entry point.
Examples and documentation
Start here | Use it for |
Product-oriented evaluation, concepts, and reference | |
Supported package entry points and their trust boundaries | |
A complete Angular or Nx integration path | |
Evaluating a private application repository | |
Detailed configuration semantics | |
Choosing the Angular, Nx, or single-project example | |
Evidence, trust, identity, and package boundaries |
Repository navigation guides are also available for
packages/, apps/,
fixtures/, and docs/.
Contributing
Read CONTRIBUTING.md and the Code of Conduct before participating. Report security issues through the private process in SECURITY.md.
Formly Contract is available under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Machine-native capabilities with explicit contracts and machine-readable commerce.
Define, ship & query your analytics tracking from one source of truth, trusted by humans and agents.
API governance for AI agents. Detects breaking changes, scores blast radius, blocks unsafe calls.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes TypeScript Language Server Protocol functionality to AI agents, enabling them to query types at specific positions, find definitions and references, get diagnostics, run type tests, and type-check inline code just like in an IDE.91463MIT
- FlicenseAqualityDmaintenanceA clone-and-own MCP server that exposes OpenAPI/Huma contract intelligence to AI agents by turning API specifications into deterministic endpoint metadata, schemas, validation facts, and TypeScript declarations.6
- FlicenseAqualityDmaintenanceEnables AI agents to query component governance rules, validate component props, and generate development prompts for questionnaire editors.4
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to browse, read, compare, and validate OpenAPI contracts for providers and consumers.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dills122/formly-contract'
If you have feedback or need assistance with the MCP directory API, please join our Discord server