form-mcp

v0.10.2
@punica/form-mcp Checked 11 hours ago Published 5 days ago

MCP server for Punica Form: look up the exact API of its packages, read the rules and check code that uses them.

An MCP server that lets an AI assistant use Punica Form correctly: look up the exact API, read the rules and check the code it wrote. Punica Form is rarely in a model's training data, so without help a model guesses imports, service names and methods. With this server it looks them up and validates its answer. Resources: punica-form://guide and punica-form://api/.

Summary extracted from the README.

@punica/form-mcp

An MCP server that lets an AI assistant use Punica Form correctly: look up the exact API, read the rules and check the code it wrote.

Punica Form is rarely in a model's training data, so without help a model guesses imports, service names and methods. With this server it looks them up and validates its answer.

Tools

Tool What it does
get_guide The rules: what the packages provide and what your application builds, the lifecycle, services, events and a complete example
search_api Finds exports of the Punica Form packages (core, services, React hooks, form kit) by name or documentation
get_api The exact TypeScript declaration and documentation of one or more exports
validate_code Checks code for imports that do not exist, wrong service names and service calls that do not exist; each problem with a fix
get_form_schema The format of a form described as data (@punica/form-json): its JSON Schema, the types, rules and conditions
validate_form Checks a form definition before it is rendered: each problem with its path. Also turns a flat JSON Schema into a form definition

Resources: punica-form://guide and punica-form://api/<name>.

The API is read from the type declarations of the Punica Form packages installed in the project the server is started in, so the answers match those versions. For a package that is not installed it uses the version it was built with.

Set up

Claude Code

claude mcp add punica-form -- npx -y @punica/form-mcp

Cursor (.cursor/mcp.json), VS Code (.vscode/mcp.json, key servers), Claude Desktop and others:

{
  "mcpServers": {
    "punica-form": { "command": "npx", "args": ["-y", "@punica/form-mcp"] }
  }
}

Development

pnpm build   # in the repository root: builds the packages, then bundled/
pnpm --filter @punica/form-mcp test