npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@netpad/mcp-server

v0.2.0

Published

MCP server to help developers build form applications with @netpad/forms - 22 tools for form generation, workflow integration, and more

Readme

@netpad/mcp-server

An MCP (Model Context Protocol) server that helps developers build form applications with @netpad/forms and the NetPad platform.

Features

Form Building

  • Form Generation: Generate complete form configurations from natural language descriptions
  • Field Configuration: Create individual field configs with validation, conditional logic, and computed fields
  • Multi-Page Wizards: Generate step-by-step form configurations
  • Validation: Configure and validate form schemas

Application Development

  • Next.js Scaffolding: Generate complete Next.js applications with forms
  • Workflow Integration: Connect forms to NetPad workflows for processing
  • MongoDB Queries: Generate queries for form submission data
  • API Routes: Generate Next.js API routes for form operations

Developer Experience

  • Use Case Templates: Pre-built templates for common form types
  • Field Suggestions: Get recommended fields for your use case
  • Best Practices: Access guidelines for form design, security, and workflows
  • Error Debugging: Explain errors and get solutions
  • Documentation: Embedded docs and examples

Installation

npm install @netpad/mcp-server

Or install globally:

npm install -g @netpad/mcp-server

Usage with Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "netpad-forms": {
      "command": "npx",
      "args": ["@netpad/mcp-server"]
    }
  }
}

Usage with Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "netpad-forms": {
      "command": "npx",
      "args": ["@netpad/mcp-server"]
    }
  }
}

Available Tools (22 total)

Form Building Tools

| Tool | Description | |------|-------------| | generate_form | Generate a complete form from a natural language description | | generate_field | Generate a single field configuration | | generate_conditional_logic | Create show/hide logic for fields | | generate_computed_field | Create formula-based calculated fields | | generate_multipage_config | Generate multi-page wizard configuration | | validate_form_config | Validate a form configuration |

Application Building Tools

| Tool | Description | |------|-------------| | scaffold_nextjs_app | Generate a complete Next.js application with forms | | generate_workflow_integration | Generate workflow integration code | | generate_mongodb_query | Generate MongoDB queries for form data | | generate_api_route | Generate Next.js API routes | | generate_react_code | Generate React components for forms |

Reference Tools

| Tool | Description | |------|-------------| | list_field_types | List all 28+ supported field types | | list_operators | List conditional logic operators | | list_formula_functions | List formula functions for computed fields | | list_validation_options | List validation rule options | | list_theme_options | List theme customization options |

Helper Tools

| Tool | Description | |------|-------------| | get_use_case_template | Get pre-built templates (leadCapture, eventRegistration, feedbackSurvey) | | suggest_form_fields | Get field recommendations for your use case | | get_best_practices | Get best practices (formDesign, workflowPatterns, securityGuidelines, troubleshooting) | | debug_form_config | Analyze form configuration for issues | | explain_error | Explain error codes and provide solutions | | get_documentation | Access documentation topics |

Example Interactions

Create a Form from Description

User: Create a lead capture form for a SaaS product

Claude: [Uses generate_form and suggest_form_fields tools]
Here's your lead capture form with recommended fields for SaaS:
- First Name, Last Name, Work Email, Company, Job Title
- Company Size dropdown
- Interest checkboxes (Demo, Pricing, Docs, Partnership)
- Message field

Generate a Complete Application

User: Scaffold a Next.js app for this contact form

Claude: [Uses scaffold_nextjs_app tool]
Here's your complete Next.js application:
- package.json with all dependencies
- Form page component with submission handling
- Layout with Material-UI theming
- Environment variable template
- Setup instructions

Connect Form to Workflow

User: I want to save form submissions to MongoDB and send a notification email

Claude: [Uses generate_workflow_integration with 'full_pipeline' type]
Here's the integration code:
- NetPad client setup
- Form submission handler
- Workflow trigger with payload
- Status polling and error handling
- Example workflow configuration

Debug a Form Issue

User: I'm getting a 401 error when submitting the form

Claude: [Uses explain_error tool]
## Error: 401

**Explanation:** Authentication failed. The API key is missing, invalid, or expired.

**Solutions:**
1. Verify your API key is correct in environment variables
2. Check that the key starts with np_live_ or np_test_
3. Ensure the key has not been revoked in the NetPad dashboard
4. For test environments, use np_test_ prefixed keys

Get Field Suggestions

User: What fields should I include for a healthcare appointment form?

Claude: [Uses suggest_form_fields with industry: 'healthcare']
Recommended fields:
- Patient name, email, phone
- Date of birth, insurance info
- Preferred appointment date/time
- Reason for visit

Tips:
- Ensure HIPAA compliance for health data
- Add clear consent checkboxes for data usage

Available Prompts

Pre-built prompts for common form types:

| Prompt | Description | |--------|-------------| | create-contact-form | Generate a basic contact form | | create-registration-form | Generate a user registration form | | create-survey-form | Generate a multi-page survey | | create-order-form | Generate an order form with computed totals | | explain-conditional-logic | Explain how conditional logic works |

Resources

The server exposes documentation as MCP resources:

  • netpad://docs/readme - Main documentation
  • netpad://docs/architecture - Architecture guide
  • netpad://docs/quick-start - Quick start guide
  • netpad://docs/examples - Code examples
  • netpad://reference/field-types - Field type reference
  • netpad://reference/operators - Operator reference
  • netpad://reference/formulas - Formula function reference

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Type check
npm run typecheck

# Start the server
npm start

Testing

Use the MCP Inspector to test the server:

npx @modelcontextprotocol/inspector node dist/index.js

Or test via command line:

# List all tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js

# Call a tool
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_field_types","arguments":{"category":"text"}}}' | node dist/index.js

Related Packages

License

Apache-2.0