@trishchuk/coolors-mcp 1.0.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 (197) hide show
  1. package/.claude/settings.local.json +39 -0
  2. package/.env +2 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +73 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +71 -0
  5. package/.github/pull_request_template.md +97 -0
  6. package/.github/workflows/ci.yml +127 -0
  7. package/.github/workflows/deploy-docs.yml +56 -0
  8. package/.github/workflows/release.yml +99 -0
  9. package/.mcp.json +12 -0
  10. package/.prettierignore +1 -0
  11. package/CLAUDE.md +201 -0
  12. package/DOCUMENTATION.md +274 -0
  13. package/GEMINI.md +54 -0
  14. package/LICENSE +21 -0
  15. package/README.md +401 -0
  16. package/demo/content_based_color.png +0 -0
  17. package/demo/music-player.html +621 -0
  18. package/demo/podcast-player.html +903 -0
  19. package/dist/bin/coolors-mcp.d.ts +1 -0
  20. package/dist/bin/coolors-mcp.js +154 -0
  21. package/dist/bin/coolors-mcp.js.map +1 -0
  22. package/dist/bin/server.d.ts +1 -0
  23. package/dist/bin/server.js +3292 -0
  24. package/dist/bin/server.js.map +1 -0
  25. package/dist/chunk-IQ7NN26V.js +114 -0
  26. package/dist/chunk-IQ7NN26V.js.map +1 -0
  27. package/dist/chunk-P3ARRKLS.js +1214 -0
  28. package/dist/chunk-P3ARRKLS.js.map +1 -0
  29. package/dist/color/index.d.ts +716 -0
  30. package/dist/color/index.js +153 -0
  31. package/dist/color/index.js.map +1 -0
  32. package/dist/coolors-mcp.d.ts +136 -0
  33. package/dist/coolors-mcp.js +7 -0
  34. package/dist/coolors-mcp.js.map +1 -0
  35. package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js +93 -0
  36. package/docs/.vitepress/cache/deps/@braintree_sanitize-url.js.map +7 -0
  37. package/docs/.vitepress/cache/deps/_metadata.json +127 -0
  38. package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js +9 -0
  39. package/docs/.vitepress/cache/deps/chunk-BUSYA2B4.js.map +7 -0
  40. package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js +12683 -0
  41. package/docs/.vitepress/cache/deps/chunk-JD3CXNQ6.js.map +7 -0
  42. package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js +9719 -0
  43. package/docs/.vitepress/cache/deps/chunk-SYPOPCWC.js.map +7 -0
  44. package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js +4710 -0
  45. package/docs/.vitepress/cache/deps/cytoscape-cose-bilkent.js.map +7 -0
  46. package/docs/.vitepress/cache/deps/cytoscape.js +30278 -0
  47. package/docs/.vitepress/cache/deps/cytoscape.js.map +7 -0
  48. package/docs/.vitepress/cache/deps/dayjs.js +285 -0
  49. package/docs/.vitepress/cache/deps/dayjs.js.map +7 -0
  50. package/docs/.vitepress/cache/deps/debug.js +468 -0
  51. package/docs/.vitepress/cache/deps/debug.js.map +7 -0
  52. package/docs/.vitepress/cache/deps/package.json +3 -0
  53. package/docs/.vitepress/cache/deps/prismjs.js +1466 -0
  54. package/docs/.vitepress/cache/deps/prismjs.js.map +7 -0
  55. package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js +228 -0
  56. package/docs/.vitepress/cache/deps/prismjs_components_prism-bash.js.map +7 -0
  57. package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js +142 -0
  58. package/docs/.vitepress/cache/deps/prismjs_components_prism-javascript.js.map +7 -0
  59. package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js +27 -0
  60. package/docs/.vitepress/cache/deps/prismjs_components_prism-json.js.map +7 -0
  61. package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js +65 -0
  62. package/docs/.vitepress/cache/deps/prismjs_components_prism-python.js.map +7 -0
  63. package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js +53 -0
  64. package/docs/.vitepress/cache/deps/prismjs_components_prism-typescript.js.map +7 -0
  65. package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js +73 -0
  66. package/docs/.vitepress/cache/deps/prismjs_components_prism-yaml.js.map +7 -0
  67. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4507 -0
  68. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
  69. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +584 -0
  70. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
  71. package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +1146 -0
  72. package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map +7 -0
  73. package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +1667 -0
  74. package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map +7 -0
  75. package/docs/.vitepress/cache/deps/vitepress___minisearch.js +1814 -0
  76. package/docs/.vitepress/cache/deps/vitepress___minisearch.js.map +7 -0
  77. package/docs/.vitepress/cache/deps/vue.js +344 -0
  78. package/docs/.vitepress/cache/deps/vue.js.map +7 -0
  79. package/docs/.vitepress/components/ClientGrid.vue +125 -0
  80. package/docs/.vitepress/components/CodeBlock.vue +231 -0
  81. package/docs/.vitepress/components/ConfigModal.vue +477 -0
  82. package/docs/.vitepress/components/DiagramModal.vue +528 -0
  83. package/docs/.vitepress/components/TroubleshootingModal.vue +472 -0
  84. package/docs/.vitepress/config.js +162 -0
  85. package/docs/.vitepress/theme/FundingLayout.vue +251 -0
  86. package/docs/.vitepress/theme/Layout.vue +134 -0
  87. package/docs/.vitepress/theme/components/AdBanner.vue +317 -0
  88. package/docs/.vitepress/theme/components/AdPlaceholder.vue +78 -0
  89. package/docs/.vitepress/theme/components/FundingEffects.vue +322 -0
  90. package/docs/.vitepress/theme/components/FundingHero.vue +345 -0
  91. package/docs/.vitepress/theme/components/SupportSection.vue +511 -0
  92. package/docs/.vitepress/theme/custom-app.css +339 -0
  93. package/docs/.vitepress/theme/custom.css +699 -0
  94. package/docs/.vitepress/theme/index.js +25 -0
  95. package/docs/README.md +198 -0
  96. package/docs/concepts/accessibility.md +473 -0
  97. package/docs/concepts/color-spaces.md +222 -0
  98. package/docs/concepts/distance-metrics.md +384 -0
  99. package/docs/concepts/hct.md +261 -0
  100. package/docs/concepts/image-analysis.md +396 -0
  101. package/docs/concepts/material-design.md +306 -0
  102. package/docs/concepts/theme-matching.md +399 -0
  103. package/docs/examples/basic-colors.md +490 -0
  104. package/docs/examples/creating-themes.md +898 -0
  105. package/docs/examples/css-refactoring.md +824 -0
  106. package/docs/examples/image-extraction.md +882 -0
  107. package/docs/getting-started.md +366 -0
  108. package/docs/index.md +190 -0
  109. package/docs/installation.md +157 -0
  110. package/docs/tools/README.md +234 -0
  111. package/docs/tools/accessibility.md +614 -0
  112. package/docs/tools/color-operations.md +374 -0
  113. package/docs/tools/image-extraction.md +624 -0
  114. package/docs/tools/material-design.md +347 -0
  115. package/docs/tools/theme-matching.md +552 -0
  116. package/eslint.config.ts +14 -0
  117. package/examples/theme-matching.md +113 -0
  118. package/jsr.json +7 -0
  119. package/mcp-config.json +8 -0
  120. package/note.md +35 -0
  121. package/package.json +122 -0
  122. package/research_results.md +53 -0
  123. package/src/bin/coolors-mcp.ts +194 -0
  124. package/src/bin/server.ts +61 -0
  125. package/src/color/__tests__/conversions-argb.test.ts +198 -0
  126. package/src/color/__tests__/extract-colors.test.ts +360 -0
  127. package/src/color/__tests__/image-utils.test.ts +242 -0
  128. package/src/color/__tests__/reference-colors.test.ts +278 -0
  129. package/src/color/__tests__/round-trip.test.ts +197 -0
  130. package/src/color/conversions.test.ts +402 -0
  131. package/src/color/conversions.ts +393 -0
  132. package/src/color/dislike/__tests__/dislike-analyzer.test.ts +248 -0
  133. package/src/color/dislike/dislike-analyzer.ts +114 -0
  134. package/src/color/extract-colors.ts +228 -0
  135. package/src/color/hct/__tests__/hct-class.test.ts +232 -0
  136. package/src/color/hct/harmonization.ts +204 -0
  137. package/src/color/hct/hct-class.ts +109 -0
  138. package/src/color/hct/hct-solver.ts +168 -0
  139. package/src/color/hct/index.ts +39 -0
  140. package/src/color/hct/tonal-palette.ts +211 -0
  141. package/src/color/hct/types.ts +88 -0
  142. package/src/color/image-utils.ts +79 -0
  143. package/src/color/index.ts +87 -0
  144. package/src/color/material-theme.ts +157 -0
  145. package/src/color/metrics.test.ts +276 -0
  146. package/src/color/metrics.ts +281 -0
  147. package/src/color/quantize/__tests__/quantizer_celebi.test.ts +195 -0
  148. package/src/color/quantize/lab_point_provider.ts +55 -0
  149. package/src/color/quantize/point_provider.ts +27 -0
  150. package/src/color/quantize/quantizer_celebi.ts +51 -0
  151. package/src/color/quantize/quantizer_celebi_test.ts +71 -0
  152. package/src/color/quantize/quantizer_map.ts +47 -0
  153. package/src/color/quantize/quantizer_wsmeans.ts +232 -0
  154. package/src/color/quantize/quantizer_wu.ts +472 -0
  155. package/src/color/score/__tests__/score.test.ts +224 -0
  156. package/src/color/score/score.ts +175 -0
  157. package/src/color/types.ts +151 -0
  158. package/src/color/utils/color_utils.ts +292 -0
  159. package/src/color/utils/math_utils.ts +145 -0
  160. package/src/color/utils.test.ts +403 -0
  161. package/src/color/utils.ts +315 -0
  162. package/src/constants.ts +5 -0
  163. package/src/coolors-mcp.ts +37 -0
  164. package/src/examples/addition.ts +333 -0
  165. package/src/examples/color-demo.ts +125 -0
  166. package/src/examples/custom-logger.ts +201 -0
  167. package/src/examples/oauth-server.ts +113 -0
  168. package/src/examples/session-context.ts +269 -0
  169. package/src/session.ts +116 -0
  170. package/src/theme/__tests__/matcher.test.ts +180 -0
  171. package/src/theme/__tests__/parser.test.ts +148 -0
  172. package/src/theme/__tests__/refactor.test.ts +224 -0
  173. package/src/theme/index.ts +34 -0
  174. package/src/theme/matcher.ts +395 -0
  175. package/src/theme/parser.ts +392 -0
  176. package/src/theme/refactor.ts +360 -0
  177. package/src/theme/types.ts +152 -0
  178. package/src/tools/__tests__/gradient-generator.test.ts +206 -0
  179. package/src/tools/__tests__/palette-with-locks.test.ts +109 -0
  180. package/src/tools/color-conversion.tool.ts +54 -0
  181. package/src/tools/color-distance.tool.ts +41 -0
  182. package/src/tools/colors.ts +31 -0
  183. package/src/tools/contrast-checker.tool.ts +37 -0
  184. package/src/tools/dislike-analyzer.tool.ts +247 -0
  185. package/src/tools/gradient-generator.tool.ts +250 -0
  186. package/src/tools/image-extraction.tools.ts +289 -0
  187. package/src/tools/index.ts +39 -0
  188. package/src/tools/material-theme.tools.ts +250 -0
  189. package/src/tools/palette-generator.tool.ts +135 -0
  190. package/src/tools/palette-with-locks.tool.ts +221 -0
  191. package/src/tools/registry.ts +142 -0
  192. package/src/tools/simple-tools.ts +37 -0
  193. package/src/tools/theme-matching.tools.ts +334 -0
  194. package/src/types.ts +182 -0
  195. package/src/utils.ts +22 -0
  196. package/tsconfig.json +8 -0
  197. package/vitest.config.js +15 -0
@@ -0,0 +1,39 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(grep:*)",
5
+ "Bash(npm test)",
6
+ "Bash(npm test:*)",
7
+ "Bash(npm run build:*)",
8
+ "Bash(node:*)",
9
+ "Bash(npm run:*)",
10
+ "mcp__coolors__convert_color",
11
+ "mcp__coolors__generate_material_theme",
12
+ "mcp__coolors__generate_palette",
13
+ "mcp__gemini-cli__ask-gemini",
14
+ "Bash(open /Users/taras/www/MCP/coolors-mcp/demo/music-player.html)",
15
+ "Bash(open /Users/taras/www/MCP/coolors-mcp/demo/podcast-player.html)",
16
+ "mcp__coolors__generate_theme_css",
17
+ "mcp__coolors__refactor_css_with_theme",
18
+ "Bash(npx vitest run:*)",
19
+ "WebSearch",
20
+ "Bash(for i in {1..5})",
21
+ "Bash(do echo \"Run $i:\")",
22
+ "Bash(done)",
23
+ "Bash(npx prettier:*)",
24
+ "Bash(find:*)",
25
+ "Bash(npm install:*)",
26
+ "Bash(npx tsx:*)",
27
+ "Bash(git pull:*)",
28
+ "Bash(git config:*)",
29
+ "Bash(npm:*)"
30
+ ],
31
+ "deny": [],
32
+ "ask": []
33
+ },
34
+ "enabledMcpjsonServers": [
35
+ "gemini-cli",
36
+ "codex-cli",
37
+ "coolors"
38
+ ]
39
+ }
package/.env ADDED
@@ -0,0 +1,2 @@
1
+
2
+ GOOGLE_CLOUD_PROJECT=sincere-signal-457111-q3
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a bug in Coolors MCP
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Bug Description
10
+ <!-- A clear and concise description of what the bug is -->
11
+
12
+ ## Environment
13
+ - **Node.js version**:
14
+ - **npm version**:
15
+ - **Operating System**:
16
+ - **MCP Client**:
17
+ - [ ] Claude Desktop
18
+ - [ ] Claude Code
19
+ - [ ] Other (please specify):
20
+ - **MCP SDK version**:
21
+ - **Coolors MCP version**:
22
+
23
+ ## To Reproduce
24
+ Steps to reproduce the behavior:
25
+ 1. Install/configure '...'
26
+ 2. Run command '...'
27
+ 3. Use tool '...'
28
+ 4. See error
29
+
30
+ ## Expected Behavior
31
+ <!-- What you expected to happen -->
32
+
33
+ ## Actual Behavior
34
+ <!-- What actually happened -->
35
+
36
+ ## Error Messages / Logs
37
+ ```
38
+ <!-- Paste any error messages or relevant logs here -->
39
+ ```
40
+
41
+ ## MCP Tool Used
42
+ - [ ] convert_color
43
+ - [ ] color_distance
44
+ - [ ] check_contrast
45
+ - [ ] generate_palette
46
+ - [ ] generate_material_theme
47
+ - [ ] match_theme_color
48
+ - [ ] refactor_css_with_theme
49
+ - [ ] extract_image_colors
50
+
51
+ ## Command/Prompt Used
52
+ ```javascript
53
+ // Example of the exact command or prompt that caused the issue
54
+ {
55
+ "name": "convert_color",
56
+ "arguments": {
57
+ "color": "...",
58
+ "to": "..."
59
+ }
60
+ }
61
+ ```
62
+
63
+ ## Additional Context
64
+ <!-- Add any other context about the problem here -->
65
+
66
+ ## Possible Solution
67
+ <!-- If you have suggestions on how to fix the bug -->
68
+
69
+ ## Checklist
70
+ - [ ] I have checked existing issues for duplicates
71
+ - [ ] I have verified the MCP server is properly installed
72
+ - [ ] I have tried with the latest version of the tool
73
+ - [ ] I have included all relevant error messages
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new feature for Coolors MCP
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Feature Description
10
+ <!-- Clear description of the feature you'd like to see -->
11
+
12
+ ## Problem It Solves
13
+ <!-- What problem or limitation does this feature address? -->
14
+
15
+ ## Proposed Solution
16
+ <!-- How do you envision this feature working? -->
17
+
18
+ ## Use Cases
19
+ <!-- Specific examples of how this feature would be used -->
20
+ 1.
21
+ 2.
22
+ 3.
23
+
24
+ ## Tool Enhancement
25
+ <!-- Which tool(s) would this feature affect? -->
26
+ - [ ] Color conversion tools
27
+ - [ ] Material Design theme tools
28
+ - [ ] CSS theme matching tools
29
+ - [ ] Image color extraction
30
+ - [ ] New tool (please describe)
31
+ - [ ] Core MCP server functionality
32
+ - [ ] Integration/compatibility
33
+ - [ ] Documentation
34
+
35
+ ## Color Space Considerations
36
+ <!-- Which color spaces would this feature affect? -->
37
+ - [ ] RGB/Hex
38
+ - [ ] HSL/HSV
39
+ - [ ] LAB
40
+ - [ ] HCT (Material Design)
41
+ - [ ] All color spaces
42
+ - [ ] N/A - Not color space related
43
+
44
+ ## Example Implementation
45
+ ```javascript
46
+ // Example of how you would use this feature
47
+ {
48
+ "name": "tool-name",
49
+ "arguments": {
50
+ // your proposed API
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## Alternatives Considered
56
+ <!-- Have you considered other solutions or workarounds? -->
57
+
58
+ ## Additional Context
59
+ <!-- Any other context, mockups, or examples -->
60
+
61
+ ## Impact Assessment
62
+ - **Benefit to users**:
63
+ - **Implementation complexity**: Low / Medium / High
64
+ - **Breaking changes**: Yes / No
65
+ - **Documentation needs**:
66
+
67
+ ## Checklist
68
+ - [ ] I have searched existing issues for similar requests
69
+ - [ ] This feature aligns with the project's goals
70
+ - [ ] I would be willing to help implement this feature
71
+ - [ ] I have considered the impact on existing users
@@ -0,0 +1,97 @@
1
+ ## Description
2
+ <!-- Provide a brief description of the changes in this PR -->
3
+
4
+ ## Related Issue
5
+ <!-- Link to the issue this PR addresses, if applicable -->
6
+ Fixes #(issue number)
7
+
8
+ ## Type of Change
9
+ <!-- Mark the relevant option with an "x" -->
10
+ - [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
11
+ - [ ] ✨ New feature (non-breaking change which adds functionality)
12
+ - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
13
+ - [ ] 📝 Documentation update
14
+ - [ ] 🎨 Code style/refactoring
15
+ - [ ] ⚡ Performance improvement
16
+ - [ ] ✅ Test addition/modification
17
+ - [ ] 🔧 Configuration change
18
+
19
+ ## Changes Made
20
+ <!-- List the specific changes made in this PR -->
21
+ -
22
+ -
23
+ -
24
+
25
+ ## Testing
26
+ <!-- Describe the tests you ran to verify your changes -->
27
+
28
+ ### Test Configuration
29
+ - **Node.js version**:
30
+ - **MCP SDK version**:
31
+ - **Operating System**:
32
+
33
+ ### Test Steps
34
+ 1.
35
+ 2.
36
+ 3.
37
+
38
+ ### Test Results
39
+ <!-- Include any relevant test output or screenshots -->
40
+
41
+ ## Tool-Specific Testing
42
+ <!-- If your changes affect specific tools, mark which ones you've tested -->
43
+ - [ ] convert_color
44
+ - [ ] color_distance
45
+ - [ ] check_contrast
46
+ - [ ] generate_palette
47
+ - [ ] generate_material_theme
48
+ - [ ] match_theme_color
49
+ - [ ] refactor_css_with_theme
50
+ - [ ] extract_image_colors
51
+ - [ ] N/A - Core functionality change
52
+
53
+ ## Breaking Changes
54
+ <!-- If this PR introduces breaking changes, describe them here -->
55
+ - [ ] This PR includes breaking changes
56
+
57
+ If yes, describe:
58
+ - What breaks:
59
+ - Migration path:
60
+ - Affected users:
61
+
62
+ ## Documentation
63
+ <!-- Mark what documentation needs to be updated -->
64
+ - [ ] README.md updated
65
+ - [ ] API documentation updated
66
+ - [ ] VitePress docs updated
67
+ - [ ] Code comments added/updated
68
+ - [ ] CHANGELOG.md updated
69
+ - [ ] No documentation needed
70
+
71
+ ## Checklist
72
+ <!-- Ensure all items are completed before submitting the PR -->
73
+ - [ ] My code follows the project's style guidelines
74
+ - [ ] I have performed a self-review of my own code
75
+ - [ ] I have commented my code, particularly in hard-to-understand areas
76
+ - [ ] I have made corresponding changes to the documentation
77
+ - [ ] My changes generate no new warnings
78
+ - [ ] I have tested my changes locally with `npm run lint`
79
+ - [ ] I have tested my changes locally with `npm run build`
80
+ - [ ] I have tested the MCP integration with a real client (Claude Desktop/Code)
81
+ - [ ] Any dependent changes have been merged and published
82
+
83
+ ## Additional Notes
84
+ <!-- Add any additional notes, concerns, or discussion points -->
85
+
86
+ ## Screenshots
87
+ <!-- If applicable, add screenshots to help explain your changes -->
88
+
89
+ ## Reviewer Notes
90
+ <!-- Any specific areas you'd like reviewers to focus on -->
91
+
92
+ ---
93
+ **For Maintainers:**
94
+ - [ ] Changes reviewed
95
+ - [ ] Tests pass
96
+ - [ ] Documentation complete
97
+ - [ ] Ready to merge
@@ -0,0 +1,127 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ${{ matrix.os }}
13
+
14
+ strategy:
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest, windows-latest]
17
+ node-version: [18.x, 20.x, 22.x]
18
+ exclude:
19
+ # Skip some combinations to save CI time
20
+ - os: windows-latest
21
+ node-version: 18.x
22
+ - os: macos-latest
23
+ node-version: 18.x
24
+
25
+ steps:
26
+ - name: Checkout code
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Setup Node.js ${{ matrix.node-version }}
30
+ uses: actions/setup-node@v4
31
+ with:
32
+ node-version: ${{ matrix.node-version }}
33
+ cache: 'npm'
34
+
35
+ - name: Install dependencies
36
+ run: npm ci
37
+
38
+ - name: Lint TypeScript
39
+ run: npm run lint
40
+
41
+ - name: Build project
42
+ run: npm run build
43
+
44
+ - name: Run tests
45
+ run: npm test
46
+ continue-on-error: true
47
+
48
+ - name: Verify build output
49
+ run: |
50
+ if [ ! -f "dist/bin/server.js" ]; then
51
+ echo "Build failed: dist/bin/server.js not found"
52
+ exit 1
53
+ fi
54
+ shell: bash
55
+ if: runner.os != 'Windows'
56
+
57
+ - name: Verify build output (Windows)
58
+ run: |
59
+ if (!(Test-Path "dist/bin/server.js")) {
60
+ Write-Error "Build failed: dist/bin/server.js not found"
61
+ exit 1
62
+ }
63
+ shell: pwsh
64
+ if: runner.os == 'Windows'
65
+
66
+ package-validation:
67
+ runs-on: ubuntu-latest
68
+ needs: test
69
+
70
+ steps:
71
+ - name: Checkout code
72
+ uses: actions/checkout@v4
73
+
74
+ - name: Setup Node.js
75
+ uses: actions/setup-node@v4
76
+ with:
77
+ node-version: '20.x'
78
+ cache: 'npm'
79
+
80
+ - name: Install dependencies
81
+ run: npm ci
82
+
83
+ - name: Build
84
+ run: npm run build
85
+
86
+ - name: Test npm pack
87
+ run: |
88
+ npm pack
89
+ ls -la *.tgz
90
+
91
+ - name: Validate package contents
92
+ run: |
93
+ tar -tzf *.tgz | grep -E "(dist/|README|LICENSE|package.json)"
94
+
95
+ - name: Check package size
96
+ run: |
97
+ SIZE=$(stat -c%s *.tgz)
98
+ echo "Package size: $SIZE bytes"
99
+ if [ $SIZE -gt 10485760 ]; then
100
+ echo "Warning: Package size exceeds 10MB"
101
+ fi
102
+
103
+ docs-build:
104
+ runs-on: ubuntu-latest
105
+
106
+ steps:
107
+ - name: Checkout code
108
+ uses: actions/checkout@v4
109
+
110
+ - name: Setup Node.js
111
+ uses: actions/setup-node@v4
112
+ with:
113
+ node-version: '20.x'
114
+ cache: 'npm'
115
+
116
+ - name: Install dependencies
117
+ run: npm ci
118
+
119
+ - name: Build documentation
120
+ run: npm run docs:build
121
+
122
+ - name: Verify docs build
123
+ run: |
124
+ if [ ! -d "docs/.vitepress/dist" ]; then
125
+ echo "Documentation build failed"
126
+ exit 1
127
+ fi
@@ -0,0 +1,56 @@
1
+ name: Deploy Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: pages
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0 # For lastUpdated feature
26
+
27
+ - name: Setup Node.js
28
+ uses: actions/setup-node@v4
29
+ with:
30
+ node-version: '20'
31
+ cache: 'npm'
32
+
33
+ - name: Install dependencies
34
+ run: npm ci
35
+
36
+ - name: Build VitePress site
37
+ run: npm run docs:build
38
+ env:
39
+ NODE_ENV: production
40
+
41
+ - name: Upload artifact
42
+ uses: actions/upload-pages-artifact@v3
43
+ with:
44
+ path: docs/.vitepress/dist
45
+
46
+ deploy:
47
+ environment:
48
+ name: github-pages
49
+ url: ${{ steps.deployment.outputs.page_url }}
50
+ needs: build
51
+ runs-on: ubuntu-latest
52
+
53
+ steps:
54
+ - name: Deploy to GitHub Pages
55
+ id: deployment
56
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,99 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ version:
10
+ description: 'Release version (e.g., 1.0.0)'
11
+ required: true
12
+ type: string
13
+
14
+ permissions:
15
+ contents: write
16
+ packages: write
17
+
18
+ jobs:
19
+ publish:
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - name: Checkout code
24
+ uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+
28
+ - name: Setup Node.js
29
+ uses: actions/setup-node@v4
30
+ with:
31
+ node-version: '20'
32
+ registry-url: 'https://registry.npmjs.org'
33
+ cache: 'npm'
34
+
35
+ - name: Verify package name
36
+ run: |
37
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
38
+ if [ "$PACKAGE_NAME" != "@trishchuk/coolors-mcp" ]; then
39
+ echo "❌ Package name mismatch. Expected @trishchuk/coolors-mcp, got $PACKAGE_NAME"
40
+ exit 1
41
+ fi
42
+
43
+ - name: Install dependencies
44
+ run: npm ci
45
+
46
+ - name: Run tests and build
47
+ run: |
48
+ npm run lint
49
+ npm run build
50
+ npm test || true
51
+
52
+ - name: Verify build output
53
+ run: |
54
+ if [ ! -f "dist/bin/server.js" ]; then
55
+ echo "❌ Build failed: dist/bin/server.js not found"
56
+ exit 1
57
+ fi
58
+ echo "✅ Build output verified"
59
+
60
+ - name: Create tarball and check size
61
+ run: |
62
+ npm pack --dry-run
63
+ SIZE=$(npm pack --json | jq '.[0].size')
64
+ echo "📦 Package size: $SIZE bytes"
65
+ if [ $SIZE -gt 10485760 ]; then
66
+ echo "⚠️ Warning: Package size exceeds 10MB"
67
+ fi
68
+
69
+ - name: Publish to npm
70
+ run: |
71
+ npm publish --access public
72
+ env:
73
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
74
+
75
+ - name: Create GitHub Release
76
+ uses: softprops/action-gh-release@v2
77
+ with:
78
+ generate_release_notes: true
79
+ draft: false
80
+ prerelease: ${{ contains(github.ref, '-beta') || contains(github.ref, '-alpha') }}
81
+ body: |
82
+ ## 🎨 Coolors MCP Release
83
+
84
+ ### Installation
85
+ ```bash
86
+ # Claude Code
87
+ claude mcp add coolors -- npx -y @trishchuk/coolors-mcp
88
+
89
+ # Claude Desktop
90
+ npm install -g @trishchuk/coolors-mcp
91
+ ```
92
+
93
+ ### What's Changed
94
+ See below for the full changelog.
95
+
96
+ ### Links
97
+ - 📦 [NPM Package](https://www.npmjs.com/package/@trishchuk/coolors-mcp)
98
+ - 📖 [Documentation](https://x51xxx.github.io/coolors-mcp/)
99
+ - 🐛 [Report Issues](https://github.com/x51xxx/coolors-mcp/issues)
package/.mcp.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "gemini-cli": {
4
+ "command": "npx",
5
+ "args": ["-y", "gemini-mcp-tool"]
6
+ },
7
+ "coolors": {
8
+ "command": "node",
9
+ "args": ["/Users/taras/www/MCP/coolors-mcp/dist/bin/server.js"]
10
+ }
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ pnpm-lock.yaml