MCP Server (@netpad/mcp-server)
The @netpad/mcp-server package (v2.3.0) is a comprehensive Model Context Protocol (MCP) server that integrates with AI assistants like Claude Desktop and Cursor IDE. It provides 80+ AI-powered tools across 8 categories for building forms, applications, workflows, extensions, conversational experiences, and MongoDB integrations.
What's New in v2.3.0โ
- Extension Generation: New
generate_extensiontool to create complete NetPad extensions with custom workflow nodes - Extension Reference Tools: New tools for listing node categories, config field types, icons, and colors
- Extension Prompts: New prompts for creating workflow and integration extensions
What's New in v2.2.0โ
- Validated TypeScript Output: All code-generating tools return self-contained TypeScript with inline types
- Consolidated Reference Tools: New
get_referenceandbrowse_templatestools replace multiple specialized tools - Auto-Validation & Fix: Automatic TypeScript validation with auto-fix for common errors
- No SDK Imports: Generated code runs standalone without requiring @netpad/* SDK imports
- 60+ Skip Patterns: Runtime types (fetch, React, Node.js, DOM) are automatically handled
What is the MCP Server?โ
The MCP server enables AI assistants to help you build NetPad applications through natural language. Instead of manually configuring forms and workflows, you can describe what you want, and the AI will generate the complete configuration using the 75 available tools.
Installationโ
Using npx (Recommended)โ
npx @netpad/mcp-server
Global Installationโ
npm install -g @netpad/mcp-server
netpad-mcp
Setupโ
Claude Desktop Setupโ
Add the MCP server to your Claude Desktop configuration file (claude_desktop_config.json):
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"netpad": {
"command": "npx",
"args": ["@netpad/mcp-server"]
}
}
}
Restart Claude Desktop after making changes.
Cursor IDE Setupโ
Add to your .cursor/mcp.json file:
{
"mcpServers": {
"netpad": {
"command": "npx",
"args": ["@netpad/mcp-server"]
}
}
}
Restart Cursor IDE after making changes.
Tool Categories (80+ Tools)โ
The MCP server provides tools organized into 8 main categories:
1. Form Building (6 tools)โ
Generate complete form configurations from natural language descriptions:
generate_form- Generate complete form configurations from natural languagegenerate_field- Create individual field configurations with validationgenerate_conditional_logic- Create show/hide logic for fieldsgenerate_computed_field- Create formula-based calculated fieldsgenerate_multipage_config- Generate multi-page wizard configurationsvalidate_form_config- Validate form configurations and identify issues
2. Application Management (7 tools)โ
Create and manage complete NetPad applications:
create_application- Generate code to create new applicationsgenerate_application_contract- Define API contracts for applicationsgenerate_application_release- Create versioned releaseslist_application_templates- Browse application templatespublish_to_marketplace- Publish applications to marketplace- Additional tools for application lifecycle management
3. Marketplace & npm (8 tools)โ
Publish, search, and install applications:
publish_to_marketplace- Publish applications to marketplacesearch_marketplace- Search for applications in marketplaceinstall_from_npm- Install applications from npm registrylist_npm_packages- Browse available npm packages- Additional tools for package management
4. Workflow Automation (10 tools)โ
Build workflows with 25+ node types:
create_workflow- Generate complete workflow configurationsadd_workflow_node- Add nodes to workflowsconnect_workflow_nodes- Connect nodes with edgeslist_workflow_node_types- Browse 25+ available node typeslist_workflow_templates- Get pre-built workflow templates- Additional tools for workflow management
5. Conversational & Search Forms (11 tools)โ
AI-powered data collection and RAG:
create_conversational_form- Create AI-powered conversational formsconfigure_rag_settings- Enable RAG with document retrievalcreate_search_form- Build MongoDB search interfaceslist_search_operators- Browse search operators by field typelist_conversational_templates- IT helpdesk, feedback, intake templates- Additional tools for conversational form configuration
6. Enhanced Templates (5 tools)โ
Access 25+ form templates:
list_form_templates- Browse 25+ form templates across 10 categoriesget_form_template- Get detailed template configurationcreate_form_from_template- Create forms with customizations- Template categories: Business, Events, Feedback, Support, Healthcare, Education, etc.
7. Data Browser (12 tools)โ
MongoDB queries, aggregations, schema analysis:
generate_connection_config- Configure MongoDB connectionsgenerate_data_browser_query- Generate find, aggregate, distinct queriesgenerate_aggregation_pipeline- Build complex aggregation pipelinesgenerate_index_recommendations- Get index suggestionsgenerate_schema_analysis- Analyze collection schemas- Additional tools for data exploration
8. Extension Development (5 tools) - New in v2.3.0โ
Create custom NetPad extensions with workflow nodes:
generate_extension- Generate complete extension packages with custom workflow nodeslist_node_categories- List available workflow node categories (triggers, logic, actions, etc.)list_config_field_types- List configuration field types (text, select, boolean, etc.)list_workflow_icons- List commonly used MUI icons for workflow nodeslist_workflow_colors- List suggested colors for workflow nodes
Example Usage:
"Create a NetPad extension with a custom workflow node that sends SMS messages via Twilio"
"Generate an extension with a node that validates data against an external API"
The generate_extension tool generates all files needed for a complete extension package:
package.json- NPM package configurationtsconfig.json- TypeScript configurationtsup.config.ts- Build configurationsrc/index.ts- Main extension code with handlersREADME.md- Documentation
See the Extensions documentation for more details on building extensions.
9. Consolidated Reference Tools (New in v2.2.0)โ
Two new consolidated tools provide unified access to reference data:
get_reference Toolโ
Unified access to all reference documentation:
- Field Types: All 30+ field type definitions and configurations
- Operators: Search operators by field type
- Formula Functions: Computed field formula functions
- Validation: Validation patterns and rules
- Themes: Theme configurations and presets
- Documentation: Feature documentation and guides
Usage:
"Get reference for field types"
"Show me available search operators for date fields"
"What formula functions are available for computed fields?"
browse_templates Toolโ
Browse all 40+ templates with filtering:
- Form Templates: 24 templates across 10 categories
- Application Templates: Pre-built application bundles
- Workflow Templates: 5 automation workflow templates
- Conversational Templates: 4 AI-powered form templates
- Query Templates: MongoDB query templates
Usage:
"Show me healthcare form templates"
"List all conversational form templates"
"Browse workflow templates"
10. Legacy Reference & Helper (16 tools)โ
Documentation, best practices, debugging (these are being consolidated into the new tools above):
get_documentation- Access NetPad documentationget_best_practices- Get best practices for specific featuresdebug_form_config- Debug form configuration issuesvalidate_workflow- Validate workflow configurations- Additional helper tools for development
Example Usageโ
Once configured, you can ask Claude to help you build comprehensive applications:
Example 1: Create a Customer Feedback Applicationโ
"Create a customer feedback application with an NPS survey form and a workflow
that sends thank-you emails and saves responses to MongoDB."
The AI will:
- Generate the NPS survey form with appropriate fields
- Create a workflow that triggers on form submission
- Configure email sending node
- Set up MongoDB write operations
- Connect all components together
Example 2: Use Templatesโ
"Create a form from the patient-intake template and customize it for our
healthcare clinic."
The AI will:
- Load the patient-intake template
- Customize fields based on your requirements
- Configure validation rules
- Set up conditional logic if needed
Example 3: Build a Search Interfaceโ
"Create a search form for our support tickets collection that allows filtering
by status, priority, and date range."
The AI will:
- Create a search form configuration
- Configure search operators for each field
- Set up result display options
- Configure pagination and sorting
Example 4: Create a Custom Extensionโ
"Create a NetPad extension with a workflow node that sends SMS messages.
The node should have fields for phone number, message text, and a provider
selection (Twilio or AWS SNS)."
The AI will:
- Generate a complete extension package structure
- Create the workflow node definition with config fields
- Implement a handler with placeholder logic
- Generate package.json, tsconfig, and build configuration
- Create a README with installation instructions
Available Resources (17 resources)โ
The MCP server provides access to documentation and reference materials:
netpad://docs/readme- Main documentationnetpad://docs/quick-start- Quick start guidenetpad://docs/extensions- Extensions documentationnetpad://reference/field-types- Field type referencenetpad://reference/application-templates- Application templatesnetpad://reference/workflow-nodes- Workflow node typesnetpad://reference/form-templates- 25+ form templatesnetpad://reference/conversational-templates- Conversational form templatesnetpad://reference/search-operators- Search operatorsnetpad://reference/connection-types- MongoDB connection typesnetpad://reference/query-templates- Query templatesnetpad://reference/extensions- Extension development reference (node categories, icons, colors)- Additional resources for development reference
Templates Availableโ
Form Templates (25+)โ
The MCP server provides access to 25+ form templates across 10 categories:
- Business: Contact forms, job applications, lead capture, quote requests
- Events: Registration, RSVP, volunteer signup, webinar registration
- Feedback: Customer satisfaction, NPS surveys, product feedback
- Support: Support tickets, appointment booking
- E-commerce: Order forms, return requests
- Healthcare: Patient intake, health screening (with encryption support)
- Finance: Expense reports, financial applications (with encryption)
- Education: Course enrollment, scholarship applications
- Real Estate: Property inquiries, rental applications
- General: Multi-purpose forms
Workflow Templates (5+)โ
Pre-configured workflows for common automation scenarios:
- Form Processing: Form to email, form to database
- Data Processing: Scheduled sync, data pipelines
- Integrations: Webhook processors, API monitoring
- AI Workflows: Text classification, data extraction
- Logic: Conditional routing, batch processing
Conversational Form Templates (4+)โ
Pre-configured conversational forms:
- IT Helpdesk: Technical support ticket creation
- Customer Feedback: Satisfaction and feedback collection
- Patient Intake: Healthcare patient information gathering
- General Intake: Flexible intake form
Best Practicesโ
-
Be Specific: When asking the AI to create forms or workflows, provide as much detail as possible about your requirements.
-
Use Templates: Start with templates when possible. Ask "list form templates" or "list workflow templates" to see what's available.
-
Iterate: The AI can help you refine configurations. Ask follow-up questions like "add validation to the email field" or "make the status field required."
-
Validate: Use validation tools to check your configurations before deploying.
-
Review Generated Code: Always review the generated configurations to ensure they match your requirements.
Troubleshootingโ
MCP Server Not Connectingโ
- Verify the configuration file is in the correct location
- Check that
npxis available in your PATH - Restart Claude Desktop or Cursor IDE after configuration changes
- Check the console for error messages
Tools Not Availableโ
- Ensure you're using the latest version:
npx @netpad/mcp-server@latest - Check that your NetPad instance is accessible
- Verify API keys and authentication if required
Generated Configurations Not Workingโ
- Use the validation tools to check for errors
- Review the generated configuration against the documentation
- Ask the AI to debug specific issues
Related Documentationโ
- Developer Packages - Overview of all NetPad packages
- Forms Package - React form renderer
- Workflows Package - Workflow API client
- Form Builder Guide - Manual form building
- Workflow Guide - Manual workflow creation
- Template Gallery - Browse templates manually
Resourcesโ
- NPM Package: @netpad/mcp-server
- GitHub: github.com/mongodb/netpad
- MCP Documentation: Model Context Protocol
Validated TypeScript Outputโ
A key feature of v2.2.0 is that all code-generating tools produce validated, self-contained TypeScript:
What This Meansโ
- Self-Contained Code: Generated code includes all necessary type definitions inline
- No SDK Imports: You don't need to install @netpad/forms or other packages to run the generated code
- Auto-Validation: TypeScript is validated at generation time
- Auto-Fix: Common errors (missing semicolons, type annotations) are automatically fixed
- Runtime Type Skipping: 60+ runtime types (fetch, React, Node.js, DOM) are handled automatically
Running Generated Codeโ
Generated TypeScript can be run directly:
# Save the generated code to a file
cat > my-form.ts << 'EOF'
// Generated code from MCP server
...
EOF
# Run directly with npx tsx
npx tsx my-form.ts
Versionโ
Current version: 2.3.0
The MCP server is actively maintained and updated with new tools and capabilities. Check the npm package page for the latest version and changelog.
Version Historyโ
| Version | Changes |
|---|---|
| 2.3.0 | Extension generation tools (generate_extension, list_node_categories, etc.), extension reference resources, prompts for creating extensions |
| 2.2.0 | Validated TypeScript output, consolidated tools (get_reference, browse_templates), auto-fix, 60+ skip patterns |
| 2.1.0 | Additional templates, improved error handling |
| 2.0.0 | 75 tools across 7 categories, comprehensive MCP implementation |