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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tobidsn/anticms-mcp

v2.1.7

Published

MCP Server for generating AntiCMS v3 JSON component templates with validation and field type support. Supports both Streamable HTTP and Stdio transports.

Readme

AntiCMS v3 JSON Generator MCP Server

A Model Context Protocol (MCP) server for generating AntiCMS v3 JSON component templates with validation and field type support. Now supports both Streamable HTTP and Stdio transports for maximum compatibility.

🚀 Features

  • Generate complete AntiCMS v3 templates with multiple sections (hero, features, contact, gallery)
  • Custom field generation with all supported AntiCMS v3 field types
  • Template validation with comprehensive error reporting
  • Field type reference with complete documentation
  • MCP Resources: Access JSON resource files and examples via anticms:// URIs
  • MCP Prompts: Structured prompt templates for consistent LLM interactions
  • Dual transport support: Streamable HTTP and Stdio
  • Session management for HTTP transport
  • Health check endpoint for monitoring
  • CORS support for browser compatibility

🚀 MCP Installation & Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "anticms-generator": {
      "command": "npx",
      "args": ["@tobidsn/anticms-mcp"]
    }
  }
}

Cursor

Add to your MCP configuration:

{
  "mcpServers": {
    "anticms-mcp": {
      "command": "npx",
      "args": [
        "@tobidsn/anticms-mcp@latest"
      ]
    }
  }
}

VSCode

Create a new file .vscode/mcp.json:

touch .vscode/mcp.json
{
  "servers": {
    "anticms-mcp": {
      "command": "npx",
      "args": ["@tobidsn/anticms-mcp@latest"]
    }
  }
}

🛠 Installation

From NPM

npm install -g @tobidsn/anticms-mcp

From Source

git clone https://github.com/tobidsn/anticms-mcp.git
cd anticms-mcp
npm install

🎯 Usage

The server supports two transport modes:

1. Streamable HTTP Transport (Recommended)

Start the HTTP server:

# Default port 3000
npm run dev

# Custom port
npm run start:http:port

# Or directly
node src/index.js --http --port=3001

Access the server:

  • Health check: http://localhost:3000/health
  • MCP endpoint: http://localhost:3000/mcp
  • API documentation: Available via health check endpoint

2. Stdio Transport (Traditional)

# Default stdio mode
npm start

# Or directly
node src/index.js

Environment Variables

# Force HTTP transport
export MCP_TRANSPORT=http

# Or use command line flags
node src/index.js --http --port=3000

🔧 Configuration

For HTTP-based clients:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({
  name: "anticms-client",
  version: "1.0.0"
});

const transport = new StreamableHTTPClientTransport(
  new URL("http://localhost:3000/mcp")
);

await client.connect(transport);

🛠 Available Tools

1. generate_template

Generate a complete AntiCMS v3 template with multiple sections.

Parameters:

  • name (string, required): Template identifier (snake_case)
  • label (string, required): Human-readable template name
  • sections (array, required): Section types to include (["hero", "features", "contact", "gallery"])
  • description (string): Template description
  • is_content (boolean): Whether this is a content template (default: false)
  • multilanguage (boolean): Enable multilanguage support (default: true)
  • is_multiple (boolean): Allow multiple instances (default: false)
  • include_cta (boolean): Include call-to-action in hero section (default: false)
  • max_features (number): Maximum number of features (default: 6)
  • max_gallery_images (number): Maximum number of gallery images (default: 12)

Example:

{
  "name": "landing_page",
  "label": "Landing Page",
  "sections": ["hero", "features", "contact"],
  "include_cta": true,
  "max_features": 8
}

2. generate_custom_field

Generate a custom field with specific type and attributes.

Parameters:

  • name (string, required): Field identifier (snake_case)
  • label (string, required): Human-readable field label
  • field_type (string, required): AntiCMS v3 field type
  • multilanguage (boolean): Enable multilanguage support (default: false)
  • attributes (object): Field-specific attributes

Example:

{
  "name": "product_title",
  "label": "Product Title", 
  "field_type": "input",
  "multilanguage": true,
  "attributes": {
    "inputType": "text",
    "is_required": true,
    "maxLength": 100
  }
}

3. validate_template

Validate an AntiCMS v3 template JSON structure.

Parameters:

  • template_json (object, required): The template JSON to validate

4. list_field_types

List all supported AntiCMS v3 field types with their attributes.

Parameters: None

📂 MCP Resources

The server provides access to structured data via MCP Resources using anticms:// URIs:

Available Resource Types

1. File-based Resources (data/ folder)

  • anticms://pages/{name} - Page template JSON files
  • anticms://posts/{name} - Post template JSON files
  • anticms://field-types/{name} - Field type definition files

2. Project Examples

  • anticms://examples/ecommerce-landing - E-commerce landing page template
  • anticms://examples/restaurant-website - Restaurant website template

3. Field Type Examples

  • anticms://field-examples/input - Input field configuration examples
  • anticms://field-examples/media - Media field configuration examples
  • anticms://field-examples/repeater - Repeater field configuration examples
  • (All field types available)

4. Best Practices

  • anticms://best-practices/naming-conventions - Naming convention guidelines
  • anticms://best-practices/validation-rules - Field validation best practices
  • anticms://best-practices/component-structure - Component organization guidelines
  • anticms://best-practices/multilanguage-setup - Multilanguage configuration guide

Using Resources

// Read a specific page template
const homeTemplate = await client.readResource({
  uri: "anticms://pages/home"
});

// Access field examples
const mediaExamples = await client.readResource({
  uri: "anticms://field-examples/media"
});

// Get best practices
const namingConventions = await client.readResource({
  uri: "anticms://best-practices/naming-conventions"
});

💬 MCP Prompts

Structured prompt templates for consistent LLM interactions:

Available Prompts

1. Template Creation Prompts

  • create-landing-page - Generate landing page templates

    • Arguments: templateName, sections, includeCTA
  • create-blog-post - Generate blog post templates

    • Arguments: templateName, sections, optionalSections
  • validate-template - Validate template structure

    • Arguments: templateJson

2. Field Creation Prompts

  • create-field - Generate custom fields
    • Arguments: fieldName, fieldType, requirements

3. Best Practices Prompts

  • check-best-practices - Review template compliance

    • Arguments: templateJson
  • learn-field-types - Learn about field types with examples

    • Arguments: fieldType, useCase

Using Prompts

// Generate a landing page template
const landingPagePrompt = await client.getPrompt({
  name: "create-landing-page",
  arguments: {
    templateName: "product_landing",
    sections: "hero, features, contact",
    includeCTA: "true"
  }
});

// Learn about media fields
const fieldLearningPrompt = await client.getPrompt({
  name: "learn-field-types", 
  arguments: {
    fieldType: "media",
    useCase: "product image upload with size constraints"
  }
});

📚 Supported Field Types

The server supports all AntiCMS v3 field types:

Basic Fields

  • input: Text, number, email, URL inputs
  • textarea: Multi-line text input
  • texteditor: WYSIWYG rich text editor (full/simple)
  • select: Dropdown selection
  • toggle: Boolean on/off switch

Media Fields

  • media: Modern media upload (images, videos, audio, documents)

Complex Fields

  • repeater: Repeatable groups of fields
  • group: Single, non-repeatable field groups
  • table: Tabular data with custom columns

Relationship Fields

  • relationship: Post relationships with filters
  • post_object: Post object selection
  • post_related: Post related configuration

🌐 HTTP API Examples

Health Check

curl http://localhost:3000/health

Response:

{
  "status": "healthy",
  "server": "anticms-json-generator", 
  "version": "2.0.0",
  "transport": "streamable-http"
}

Generate Template via HTTP

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call", 
    "params": {
      "name": "generate_template",
      "arguments": {
        "name": "product_page",
        "label": "Product Page",
        "sections": ["hero", "features"]
      }
    }
  }'

🔄 Migration from v1.x

The new version maintains full backward compatibility while adding HTTP transport support:

Before (v1.x):

node index.js  # Stdio only

Now (v2.x):

node src/index.js           # Stdio (default)
node src/index.js --http    # HTTP transport

All existing MCP client configurations continue to work unchanged.

🚦 Transport Comparison

| Feature | Streamable HTTP | Stdio | |---------|----------------|-------| | Performance | High (persistent connections) | Good | | Session Management | ✅ Built-in | ❌ Not applicable | | Browser Support | ✅ Yes (with CORS) | ❌ No | | Debugging | ✅ Easy (REST endpoints) | ⚠️ Limited | | Monitoring | ✅ Health checks | ❌ No built-in | | Claude Desktop | ⚠️ Requires setup | ✅ Native support | | Multiple Clients | ✅ Yes | ❌ Single process |

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

🆕 What's New in v2.0

  • Streamable HTTP Transport: Modern HTTP-based transport with session management
  • 🏗️ Restructured Project: Organized into src/ and data/ directories
  • 🔧 Dual Transport Support: Both HTTP and Stdio in a single package
  • 📂 MCP Resources: Access to structured data via anticms:// URIs including:
    • File-based resources from data/ folder
    • Project examples (e-commerce, restaurant, etc.)
    • Field type examples and documentation
    • Best practices and guidelines
  • 💬 MCP Prompts: Structured prompt templates for consistent LLM interactions
  • 📡 Health Monitoring: Built-in health check endpoint
  • 🌐 CORS Support: Ready for browser-based clients
  • 📚 Enhanced Documentation: Complete field type reference in JSON format
  • 🎯 Better Error Handling: Improved error messages and validation
  • 🚀 Performance Improvements: Optimized for both transport types

Built with ❤️ for the AntiCMS and Model Context Protocol communities