multisite-cms-mcp 1.7.7 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +13 -0
  2. package/dist/index.js +107 -33
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -62,6 +62,19 @@ These tools work without authentication — perfect for converting and validatin
62
62
  | `get_example` | Get example code for common patterns |
63
63
  | `get_conversion_guide` | Step-by-step website conversion guide |
64
64
 
65
+ ### MCP Resources (Alternative to Tools)
66
+
67
+ The server also exposes static content as **MCP Resources** that can be browsed and fetched:
68
+
69
+ | Resource URI | Description |
70
+ |--------------|-------------|
71
+ | `fastmode://help` | Quick start guide |
72
+ | `fastmode://reference/field-types` | Available field types for creating collections |
73
+ | `fastmode://guide/{section}` | Conversion guide sections (full, first_steps, analysis, structure, seo, manifest, templates, tokens, forms, assets, checklist, common_mistakes) |
74
+ | `fastmode://examples/{type}` | Code examples (manifest_basic, blog_post_template, form_handling, etc.) |
75
+
76
+ Resources provide the same content as `get_field_types`, `get_conversion_guide`, and `get_example` tools but in a browsable format.
77
+
65
78
  ### What validate_template Checks
66
79
 
67
80
  The `validate_template` tool performs comprehensive validation:
package/dist/index.js CHANGED
@@ -650,51 +650,125 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
650
650
  };
651
651
  }
652
652
  });
653
- // Handle list resources request - helps agents that incorrectly call list_mcp_resources
653
+ // Example types for resources
654
+ const EXAMPLE_TYPES = [
655
+ 'manifest_basic', 'manifest_custom_paths', 'manifest_minimal_with_ui',
656
+ 'blog_index_template', 'blog_post_template', 'team_template', 'downloads_template',
657
+ 'authors_template', 'author_detail_template', 'custom_collection_template',
658
+ 'form_handling', 'asset_paths', 'image_handling', 'relation_fields', 'data_edit_keys',
659
+ 'each_loop', 'conditional_if', 'nested_fields', 'featured_posts', 'parent_context',
660
+ 'equality_comparison', 'comparison_helpers', 'youtube_embed', 'nested_collection_loop',
661
+ 'loop_variables', 'common_mistakes'
662
+ ];
663
+ // Guide sections for resources
664
+ const GUIDE_SECTIONS = [
665
+ 'full', 'first_steps', 'analysis', 'structure', 'seo', 'manifest',
666
+ 'templates', 'tokens', 'forms', 'assets', 'checklist', 'common_mistakes'
667
+ ];
668
+ // Handle list resources request
654
669
  server.setRequestHandler(types_js_1.ListResourcesRequestSchema, async () => {
655
- return {
656
- resources: [
657
- {
658
- uri: 'fastmode://help',
659
- name: 'How to Use FastMode MCP',
660
- description: 'Instructions for using FastMode tools - READ THIS if tools are not working',
661
- mimeType: 'text/plain',
662
- },
663
- ],
664
- };
670
+ const resources = [
671
+ // Help resource
672
+ {
673
+ uri: 'fastmode://help',
674
+ name: 'How to Use FastMode MCP',
675
+ description: 'Quick start guide for using FastMode tools and resources',
676
+ mimeType: 'text/plain',
677
+ },
678
+ // Field types reference
679
+ {
680
+ uri: 'fastmode://reference/field-types',
681
+ name: 'Available Field Types',
682
+ description: 'List of field types for creating collections (text, richText, image, etc.)',
683
+ mimeType: 'text/plain',
684
+ },
685
+ // Guide sections
686
+ ...GUIDE_SECTIONS.map(section => ({
687
+ uri: `fastmode://guide/${section}`,
688
+ name: `Conversion Guide: ${section.replace(/_/g, ' ')}`,
689
+ description: `Website conversion guide - ${section} section`,
690
+ mimeType: 'text/plain',
691
+ })),
692
+ // Code examples
693
+ ...EXAMPLE_TYPES.map(type => ({
694
+ uri: `fastmode://examples/${type}`,
695
+ name: `Example: ${type.replace(/_/g, ' ')}`,
696
+ description: `Code example for ${type.replace(/_/g, ' ')}`,
697
+ mimeType: 'text/plain',
698
+ })),
699
+ ];
700
+ return { resources };
665
701
  });
666
702
  // Handle read resource request
667
703
  server.setRequestHandler(types_js_1.ReadResourceRequestSchema, async (request) => {
668
- if (request.params.uri === 'fastmode://help') {
704
+ const uri = request.params.uri;
705
+ // Help resource
706
+ if (uri === 'fastmode://help') {
669
707
  return {
670
- contents: [
671
- {
672
- uri: 'fastmode://help',
708
+ contents: [{
709
+ uri,
673
710
  mimeType: 'text/plain',
674
- text: `# FastMode MCP Server - How to Use
711
+ text: `# FastMode MCP Server
675
712
 
676
- This server exposes TOOLS, not resources. To use FastMode:
713
+ ## Quick Start
714
+ Call the **get_started** tool for guided help based on your task.
677
715
 
678
- ## Available Tools (use CallMcpTool to call these):
716
+ ## Available Tools
717
+ - **list_projects** - List your FastMode projects
718
+ - **get_tenant_schema** - Get collections/fields for a project
719
+ - **create_cms_item** / **update_cms_item** / **delete_cms_item** - Manage content
720
+ - **deploy_package** - Deploy a website
721
+ - **sync_schema** - Create collections and fields
722
+ - **validate_manifest** / **validate_template** - Validate your code
679
723
 
680
- 1. **list_projects** - List all your FastMode projects
681
- 2. **get_tenant_schema** - Get collections/fields for a project
682
- 3. **create_cms_item** - Create content items
683
- 4. **deploy_package** - Deploy a website
684
- 5. **get_started** - CALL THIS FIRST for guided help
724
+ ## Available Resources
725
+ - **fastmode://reference/field-types** - Field types for creating collections
726
+ - **fastmode://guide/{section}** - Website conversion guide sections
727
+ - **fastmode://examples/{type}** - Code examples for common patterns
685
728
 
686
- ## Example:
687
- Call the "list_projects" tool with no arguments to see your projects.
688
-
689
- ## Authentication:
690
- Authentication happens automatically via browser login on first use.
691
-
692
- DO NOT look for resources - use the TOOLS listed above.`,
693
- },
694
- ],
729
+ ## Authentication
730
+ Authentication happens automatically via browser login on first use.`,
731
+ }],
732
+ };
733
+ }
734
+ // Field types reference
735
+ if (uri === 'fastmode://reference/field-types') {
736
+ const content = await (0, get_field_types_1.getFieldTypes)();
737
+ return {
738
+ contents: [{
739
+ uri,
740
+ mimeType: 'text/plain',
741
+ text: content,
742
+ }],
743
+ };
744
+ }
745
+ // Guide sections
746
+ const guideMatch = uri.match(/^fastmode:\/\/guide\/(.+)$/);
747
+ if (guideMatch) {
748
+ const section = guideMatch[1];
749
+ const content = await (0, get_conversion_guide_1.getConversionGuide)(section);
750
+ return {
751
+ contents: [{
752
+ uri,
753
+ mimeType: 'text/plain',
754
+ text: content,
755
+ }],
756
+ };
757
+ }
758
+ // Code examples
759
+ const exampleMatch = uri.match(/^fastmode:\/\/examples\/(.+)$/);
760
+ if (exampleMatch) {
761
+ const exampleType = exampleMatch[1];
762
+ const content = await (0, get_example_1.getExample)(exampleType);
763
+ return {
764
+ contents: [{
765
+ uri,
766
+ mimeType: 'text/plain',
767
+ text: content,
768
+ }],
695
769
  };
696
770
  }
697
- throw new Error(`Unknown resource: ${request.params.uri}`);
771
+ throw new Error(`Unknown resource: ${uri}`);
698
772
  });
699
773
  async function main() {
700
774
  const transport = new stdio_js_1.StdioServerTransport();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multisite-cms-mcp",
3
- "version": "1.7.7",
3
+ "version": "1.8.0",
4
4
  "description": "MCP server for Fast Mode CMS. Convert websites, validate packages, and deploy directly to Fast Mode. Includes authentication, project creation, schema sync, and one-click deployment.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {