@forgespace/branding-mcp 0.4.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.
- package/.env.example +3 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- package/.github/workflows/ci.yml +73 -0
- package/.github/workflows/release-automation.yml +56 -0
- package/.github/workflows/security-scan.yml +37 -0
- package/.gitleaks.toml +14 -0
- package/.prettierrc.json +10 -0
- package/CHANGELOG.md +66 -0
- package/CONTRIBUTING.md +203 -0
- package/LICENSE +21 -0
- package/README.md +105 -0
- package/data/README.md +13 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/branding-core/ai/brand-interpreter.d.ts +5 -0
- package/dist/lib/branding-core/ai/brand-interpreter.d.ts.map +1 -0
- package/dist/lib/branding-core/ai/brand-interpreter.js +16 -0
- package/dist/lib/branding-core/ai/brand-interpreter.js.map +1 -0
- package/dist/lib/branding-core/ai/claude-interpreter.d.ts +5 -0
- package/dist/lib/branding-core/ai/claude-interpreter.d.ts.map +1 -0
- package/dist/lib/branding-core/ai/claude-interpreter.js +55 -0
- package/dist/lib/branding-core/ai/claude-interpreter.js.map +1 -0
- package/dist/lib/branding-core/ai/intent-applier.d.ts +4 -0
- package/dist/lib/branding-core/ai/intent-applier.d.ts.map +1 -0
- package/dist/lib/branding-core/ai/intent-applier.js +29 -0
- package/dist/lib/branding-core/ai/intent-applier.js.map +1 -0
- package/dist/lib/branding-core/ai/keyword-interpreter.d.ts +4 -0
- package/dist/lib/branding-core/ai/keyword-interpreter.d.ts.map +1 -0
- package/dist/lib/branding-core/ai/keyword-interpreter.js +85 -0
- package/dist/lib/branding-core/ai/keyword-interpreter.js.map +1 -0
- package/dist/lib/branding-core/ai/prompts.d.ts +4 -0
- package/dist/lib/branding-core/ai/prompts.d.ts.map +1 -0
- package/dist/lib/branding-core/ai/prompts.js +79 -0
- package/dist/lib/branding-core/ai/prompts.js.map +1 -0
- package/dist/lib/branding-core/ai/types.d.ts +27 -0
- package/dist/lib/branding-core/ai/types.d.ts.map +1 -0
- package/dist/lib/branding-core/ai/types.js +2 -0
- package/dist/lib/branding-core/ai/types.js.map +1 -0
- package/dist/lib/branding-core/documents/html-generator.d.ts +3 -0
- package/dist/lib/branding-core/documents/html-generator.d.ts.map +1 -0
- package/dist/lib/branding-core/documents/html-generator.js +31 -0
- package/dist/lib/branding-core/documents/html-generator.js.map +1 -0
- package/dist/lib/branding-core/documents/pdf-generator.d.ts +3 -0
- package/dist/lib/branding-core/documents/pdf-generator.d.ts.map +1 -0
- package/dist/lib/branding-core/documents/pdf-generator.js +20 -0
- package/dist/lib/branding-core/documents/pdf-generator.js.map +1 -0
- package/dist/lib/branding-core/exporters/css-variables.d.ts +3 -0
- package/dist/lib/branding-core/exporters/css-variables.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/css-variables.js +62 -0
- package/dist/lib/branding-core/exporters/css-variables.js.map +1 -0
- package/dist/lib/branding-core/exporters/design-tokens.d.ts +3 -0
- package/dist/lib/branding-core/exporters/design-tokens.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/design-tokens.js +75 -0
- package/dist/lib/branding-core/exporters/design-tokens.js.map +1 -0
- package/dist/lib/branding-core/exporters/figma-tokens.d.ts +9 -0
- package/dist/lib/branding-core/exporters/figma-tokens.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/figma-tokens.js +69 -0
- package/dist/lib/branding-core/exporters/figma-tokens.js.map +1 -0
- package/dist/lib/branding-core/exporters/react-theme.d.ts +3 -0
- package/dist/lib/branding-core/exporters/react-theme.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/react-theme.js +61 -0
- package/dist/lib/branding-core/exporters/react-theme.js.map +1 -0
- package/dist/lib/branding-core/exporters/sass-variables.d.ts +3 -0
- package/dist/lib/branding-core/exporters/sass-variables.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/sass-variables.js +65 -0
- package/dist/lib/branding-core/exporters/sass-variables.js.map +1 -0
- package/dist/lib/branding-core/exporters/tailwind-preset.d.ts +3 -0
- package/dist/lib/branding-core/exporters/tailwind-preset.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/tailwind-preset.js +55 -0
- package/dist/lib/branding-core/exporters/tailwind-preset.js.map +1 -0
- package/dist/lib/branding-core/generators/border-system.d.ts +3 -0
- package/dist/lib/branding-core/generators/border-system.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/border-system.js +37 -0
- package/dist/lib/branding-core/generators/border-system.js.map +1 -0
- package/dist/lib/branding-core/generators/color-palette.d.ts +7 -0
- package/dist/lib/branding-core/generators/color-palette.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/color-palette.js +117 -0
- package/dist/lib/branding-core/generators/color-palette.js.map +1 -0
- package/dist/lib/branding-core/generators/favicon-generator.d.ts +3 -0
- package/dist/lib/branding-core/generators/favicon-generator.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/favicon-generator.js +23 -0
- package/dist/lib/branding-core/generators/favicon-generator.js.map +1 -0
- package/dist/lib/branding-core/generators/gradient-system.d.ts +3 -0
- package/dist/lib/branding-core/generators/gradient-system.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/gradient-system.js +74 -0
- package/dist/lib/branding-core/generators/gradient-system.js.map +1 -0
- package/dist/lib/branding-core/generators/logo-generator.d.ts +4 -0
- package/dist/lib/branding-core/generators/logo-generator.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/logo-generator.js +130 -0
- package/dist/lib/branding-core/generators/logo-generator.js.map +1 -0
- package/dist/lib/branding-core/generators/motion-system.d.ts +3 -0
- package/dist/lib/branding-core/generators/motion-system.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/motion-system.js +91 -0
- package/dist/lib/branding-core/generators/motion-system.js.map +1 -0
- package/dist/lib/branding-core/generators/og-image-generator.d.ts +3 -0
- package/dist/lib/branding-core/generators/og-image-generator.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/og-image-generator.js +72 -0
- package/dist/lib/branding-core/generators/og-image-generator.js.map +1 -0
- package/dist/lib/branding-core/generators/shadow-system.d.ts +3 -0
- package/dist/lib/branding-core/generators/shadow-system.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/shadow-system.js +44 -0
- package/dist/lib/branding-core/generators/shadow-system.js.map +1 -0
- package/dist/lib/branding-core/generators/spacing-scale.d.ts +3 -0
- package/dist/lib/branding-core/generators/spacing-scale.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/spacing-scale.js +27 -0
- package/dist/lib/branding-core/generators/spacing-scale.js.map +1 -0
- package/dist/lib/branding-core/generators/typography-system.d.ts +3 -0
- package/dist/lib/branding-core/generators/typography-system.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/typography-system.js +121 -0
- package/dist/lib/branding-core/generators/typography-system.js.map +1 -0
- package/dist/lib/branding-core/index.d.ts +24 -0
- package/dist/lib/branding-core/index.d.ts.map +1 -0
- package/dist/lib/branding-core/index.js +22 -0
- package/dist/lib/branding-core/index.js.map +1 -0
- package/dist/lib/branding-core/validators/brand-consistency.d.ts +3 -0
- package/dist/lib/branding-core/validators/brand-consistency.d.ts.map +1 -0
- package/dist/lib/branding-core/validators/brand-consistency.js +70 -0
- package/dist/lib/branding-core/validators/brand-consistency.js.map +1 -0
- package/dist/lib/branding-core/validators/contrast-checker.d.ts +3 -0
- package/dist/lib/branding-core/validators/contrast-checker.d.ts.map +1 -0
- package/dist/lib/branding-core/validators/contrast-checker.js +33 -0
- package/dist/lib/branding-core/validators/contrast-checker.js.map +1 -0
- package/dist/lib/branding-core/validators/token-schema.d.ts +10 -0
- package/dist/lib/branding-core/validators/token-schema.d.ts.map +1 -0
- package/dist/lib/branding-core/validators/token-schema.js +43 -0
- package/dist/lib/branding-core/validators/token-schema.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +8 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/logger.d.ts +3 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +10 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/types.d.ts +208 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/resources/brand-knowledge.d.ts +3 -0
- package/dist/resources/brand-knowledge.d.ts.map +1 -0
- package/dist/resources/brand-knowledge.js +53 -0
- package/dist/resources/brand-knowledge.js.map +1 -0
- package/dist/resources/brand-templates.d.ts +3 -0
- package/dist/resources/brand-templates.d.ts.map +1 -0
- package/dist/resources/brand-templates.js +68 -0
- package/dist/resources/brand-templates.js.map +1 -0
- package/dist/tools/create-brand-guidelines.d.ts +3 -0
- package/dist/tools/create-brand-guidelines.d.ts.map +1 -0
- package/dist/tools/create-brand-guidelines.js +85 -0
- package/dist/tools/create-brand-guidelines.js.map +1 -0
- package/dist/tools/export-design-tokens.d.ts +3 -0
- package/dist/tools/export-design-tokens.d.ts.map +1 -0
- package/dist/tools/export-design-tokens.js +37 -0
- package/dist/tools/export-design-tokens.js.map +1 -0
- package/dist/tools/generate-brand-assets.d.ts +3 -0
- package/dist/tools/generate-brand-assets.d.ts.map +1 -0
- package/dist/tools/generate-brand-assets.js +37 -0
- package/dist/tools/generate-brand-assets.js.map +1 -0
- package/dist/tools/generate-brand-identity.d.ts +3 -0
- package/dist/tools/generate-brand-identity.d.ts.map +1 -0
- package/dist/tools/generate-brand-identity.js +73 -0
- package/dist/tools/generate-brand-identity.js.map +1 -0
- package/dist/tools/generate-color-palette.d.ts +3 -0
- package/dist/tools/generate-color-palette.d.ts.map +1 -0
- package/dist/tools/generate-color-palette.js +33 -0
- package/dist/tools/generate-color-palette.js.map +1 -0
- package/dist/tools/generate-typography-system.d.ts +3 -0
- package/dist/tools/generate-typography-system.d.ts.map +1 -0
- package/dist/tools/generate-typography-system.js +28 -0
- package/dist/tools/generate-typography-system.js.map +1 -0
- package/dist/tools/refine-brand-element.d.ts +3 -0
- package/dist/tools/refine-brand-element.d.ts.map +1 -0
- package/dist/tools/refine-brand-element.js +41 -0
- package/dist/tools/refine-brand-element.js.map +1 -0
- package/dist/tools/validate-brand-consistency.d.ts +3 -0
- package/dist/tools/validate-brand-consistency.d.ts.map +1 -0
- package/dist/tools/validate-brand-consistency.js +25 -0
- package/dist/tools/validate-brand-consistency.js.map +1 -0
- package/docs/API.md +110 -0
- package/docs/DATA_SOURCES.md +69 -0
- package/docs/INTEGRATION.md +58 -0
- package/eslint.config.js +52 -0
- package/jest.config.js +40 -0
- package/package.json +78 -0
- package/src/__tests__/integration/brand-generation.test.ts +84 -0
- package/src/__tests__/integration/mcp-server.test.ts +18 -0
- package/src/__tests__/unit/ai-interpreter.test.ts +172 -0
- package/src/__tests__/unit/border-system.test.ts +77 -0
- package/src/__tests__/unit/color-palette.test.ts +161 -0
- package/src/__tests__/unit/contrast-checker.test.ts +124 -0
- package/src/__tests__/unit/design-tokens.test.ts +184 -0
- package/src/__tests__/unit/favicon-generator.test.ts +80 -0
- package/src/__tests__/unit/gradient-system.test.ts +122 -0
- package/src/__tests__/unit/logo-generator.test.ts +146 -0
- package/src/__tests__/unit/motion-system.test.ts +91 -0
- package/src/__tests__/unit/og-image-generator.test.ts +115 -0
- package/src/__tests__/unit/shadow-system.test.ts +63 -0
- package/src/__tests__/unit/spacing-scale.test.ts +60 -0
- package/src/__tests__/unit/typography-system.test.ts +71 -0
- package/src/index.ts +59 -0
- package/src/lib/branding-core/ai/brand-interpreter.ts +30 -0
- package/src/lib/branding-core/ai/claude-interpreter.ts +76 -0
- package/src/lib/branding-core/ai/intent-applier.ts +59 -0
- package/src/lib/branding-core/ai/keyword-interpreter.ts +95 -0
- package/src/lib/branding-core/ai/prompts.ts +93 -0
- package/src/lib/branding-core/ai/types.ts +36 -0
- package/src/lib/branding-core/documents/html-generator.ts +32 -0
- package/src/lib/branding-core/documents/pdf-generator.ts +21 -0
- package/src/lib/branding-core/exporters/css-variables.ts +71 -0
- package/src/lib/branding-core/exporters/design-tokens.ts +86 -0
- package/src/lib/branding-core/exporters/figma-tokens.ts +87 -0
- package/src/lib/branding-core/exporters/react-theme.ts +69 -0
- package/src/lib/branding-core/exporters/sass-variables.ts +74 -0
- package/src/lib/branding-core/exporters/tailwind-preset.ts +67 -0
- package/src/lib/branding-core/generators/border-system.ts +41 -0
- package/src/lib/branding-core/generators/color-palette.ts +147 -0
- package/src/lib/branding-core/generators/favicon-generator.ts +33 -0
- package/src/lib/branding-core/generators/gradient-system.ts +120 -0
- package/src/lib/branding-core/generators/logo-generator.ts +152 -0
- package/src/lib/branding-core/generators/motion-system.ts +98 -0
- package/src/lib/branding-core/generators/og-image-generator.ts +97 -0
- package/src/lib/branding-core/generators/shadow-system.ts +66 -0
- package/src/lib/branding-core/generators/spacing-scale.ts +29 -0
- package/src/lib/branding-core/generators/typography-system.ts +128 -0
- package/src/lib/branding-core/index.ts +28 -0
- package/src/lib/branding-core/validators/brand-consistency.ts +79 -0
- package/src/lib/branding-core/validators/contrast-checker.ts +37 -0
- package/src/lib/branding-core/validators/token-schema.ts +50 -0
- package/src/lib/config.ts +13 -0
- package/src/lib/logger.ts +12 -0
- package/src/lib/types.ts +236 -0
- package/src/resources/brand-knowledge.ts +60 -0
- package/src/resources/brand-templates.ts +70 -0
- package/src/tools/create-brand-guidelines.ts +94 -0
- package/src/tools/export-design-tokens.ts +52 -0
- package/src/tools/generate-brand-assets.ts +48 -0
- package/src/tools/generate-brand-identity.ts +115 -0
- package/src/tools/generate-color-palette.ts +43 -0
- package/src/tools/generate-typography-system.ts +42 -0
- package/src/tools/refine-brand-element.ts +65 -0
- package/src/tools/validate-brand-consistency.ts +32 -0
- package/tsconfig.json +21 -0
package/.env.example
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- Brief description of what this PR does -->
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
<!-- Bullet list of changes -->
|
|
8
|
+
|
|
9
|
+
## Type
|
|
10
|
+
|
|
11
|
+
- [ ] feat: New feature
|
|
12
|
+
- [ ] fix: Bug fix
|
|
13
|
+
- [ ] refactor: Code refactoring
|
|
14
|
+
- [ ] chore: Maintenance
|
|
15
|
+
- [ ] docs: Documentation
|
|
16
|
+
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- [ ] `npm run validate` passes
|
|
20
|
+
- [ ] Tests cover new functionality
|
|
21
|
+
- [ ] CHANGELOG.md updated
|
|
22
|
+
- [ ] No secrets or credentials committed
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
name: Lint & Format
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: 22
|
|
22
|
+
cache: npm
|
|
23
|
+
- run: npm ci
|
|
24
|
+
- run: npm run lint:check
|
|
25
|
+
- run: npm run format:check
|
|
26
|
+
|
|
27
|
+
typecheck:
|
|
28
|
+
name: Type Check
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-node@v4
|
|
33
|
+
with:
|
|
34
|
+
node-version: 22
|
|
35
|
+
cache: npm
|
|
36
|
+
- run: npm ci
|
|
37
|
+
- run: npm run typecheck
|
|
38
|
+
|
|
39
|
+
test:
|
|
40
|
+
name: Test (Node ${{ matrix.node-version }})
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
strategy:
|
|
43
|
+
matrix:
|
|
44
|
+
node-version: [22, 24]
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: actions/setup-node@v4
|
|
48
|
+
with:
|
|
49
|
+
node-version: ${{ matrix.node-version }}
|
|
50
|
+
cache: npm
|
|
51
|
+
- run: npm ci
|
|
52
|
+
- run: npm run test:coverage
|
|
53
|
+
- name: Upload coverage
|
|
54
|
+
if: matrix.node-version == 22
|
|
55
|
+
uses: codecov/codecov-action@v5
|
|
56
|
+
with:
|
|
57
|
+
file: ./coverage/lcov.info
|
|
58
|
+
fail_ci_if_error: false
|
|
59
|
+
|
|
60
|
+
build:
|
|
61
|
+
name: Build
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
needs: [lint, typecheck, test]
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
- uses: actions/setup-node@v4
|
|
67
|
+
with:
|
|
68
|
+
node-version: 22
|
|
69
|
+
cache: npm
|
|
70
|
+
- run: npm ci
|
|
71
|
+
- run: npm run build
|
|
72
|
+
- name: Verify dist output
|
|
73
|
+
run: test -f dist/index.js
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: release
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
validate:
|
|
14
|
+
name: Validate
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: 22
|
|
21
|
+
cache: npm
|
|
22
|
+
- run: npm ci
|
|
23
|
+
- run: npm run build
|
|
24
|
+
- run: npm run test
|
|
25
|
+
|
|
26
|
+
release:
|
|
27
|
+
name: Create Release
|
|
28
|
+
needs: [validate]
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
permissions:
|
|
31
|
+
contents: write
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- name: Create GitHub Release
|
|
35
|
+
uses: softprops/action-gh-release@v2
|
|
36
|
+
with:
|
|
37
|
+
generate_release_notes: true
|
|
38
|
+
|
|
39
|
+
publish:
|
|
40
|
+
name: Publish to npm
|
|
41
|
+
needs: [validate]
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
permissions:
|
|
44
|
+
contents: read
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: actions/setup-node@v4
|
|
48
|
+
with:
|
|
49
|
+
node-version: 22
|
|
50
|
+
cache: npm
|
|
51
|
+
registry-url: https://registry.npmjs.org
|
|
52
|
+
- run: npm ci
|
|
53
|
+
- run: npm run build
|
|
54
|
+
- run: npm publish --access public
|
|
55
|
+
env:
|
|
56
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Security Scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '0 6 * * 1'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
audit:
|
|
13
|
+
name: Dependency Audit
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: 22
|
|
20
|
+
cache: npm
|
|
21
|
+
- run: npm ci
|
|
22
|
+
- name: Audit production dependencies
|
|
23
|
+
run: npm audit --omit=dev --audit-level=high
|
|
24
|
+
- name: Audit dev dependencies (advisory only)
|
|
25
|
+
run: npm audit --audit-level=high || echo "::warning::Dev dependencies have vulnerabilities. Review manually."
|
|
26
|
+
continue-on-error: true
|
|
27
|
+
|
|
28
|
+
secret-scanning:
|
|
29
|
+
name: Secret Scanning
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
with:
|
|
34
|
+
fetch-depth: 0
|
|
35
|
+
- uses: trufflesecurity/trufflehog@v3.93.4
|
|
36
|
+
with:
|
|
37
|
+
extra_args: --only-verified
|
package/.gitleaks.toml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
title = "Branding MCP Gitleaks Config"
|
|
2
|
+
|
|
3
|
+
[allowlist]
|
|
4
|
+
description = "Allowlist for placeholder values"
|
|
5
|
+
regexTarget = "match"
|
|
6
|
+
regexes = [
|
|
7
|
+
'''REPLACE_WITH_.*''',
|
|
8
|
+
'''your-.*-here''',
|
|
9
|
+
'''example\.com''',
|
|
10
|
+
]
|
|
11
|
+
paths = [
|
|
12
|
+
'''.env\.example''',
|
|
13
|
+
'''data/.*''',
|
|
14
|
+
]
|
package/.prettierrc.json
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.4.0] - 2026-02-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Gradient system generator with 5 style-aware presets (hero, button, card, text, background) across 8 brand styles
|
|
10
|
+
- Multi-variant logo generator: wordmark, monogram, abstract, icon (4 SVG variants per brand)
|
|
11
|
+
- Favicon generator producing 4 sizes (16, 32, 180, 512) with stroke optimization for small sizes
|
|
12
|
+
- OG image templates: default (1200x630), article (1200x630), social (1200x1200) with brand gradient backgrounds
|
|
13
|
+
- New MCP tool: `generate_brand_assets` for favicon and OG image generation from existing brand identity
|
|
14
|
+
- All 6 exporters support gradient tokens (CSS, Tailwind, W3C JSON, Figma, React, Sass)
|
|
15
|
+
- 55 new tests (188 total), 15 test suites
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Logo generator uses brand typography font instead of hardcoded Inter
|
|
20
|
+
- `LogoOutput` now includes `variants` record alongside backward-compatible `svg` field
|
|
21
|
+
- `LogoConfig` accepts optional `style` for style-aware monogram/abstract shapes
|
|
22
|
+
|
|
23
|
+
## [0.3.0] - 2026-02-28
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Shadow/elevation system generator with 6 levels (none, sm, md, lg, xl, 2xl), brand-tinted colors, light/dark theme support
|
|
28
|
+
- Border/shape system generator with style-aware radius scales and border widths for all 8 brand styles
|
|
29
|
+
- Motion/animation system generator with duration scales, cubic-bezier easings, and transition presets per brand style
|
|
30
|
+
- New token types in `BrandIdentity`: `shadows`, `borders`, `motion` (backward-compatible, optional)
|
|
31
|
+
- All 6 exporters updated: CSS variables, Tailwind preset, W3C JSON, Figma tokens, React theme, Sass variables now include shadow, border, and motion tokens
|
|
32
|
+
- `generate_brand_identity` tool now includes shadows, borders, and motion in output
|
|
33
|
+
- 36 new tests (133 total), 98.36% statement coverage, 100% function coverage
|
|
34
|
+
|
|
35
|
+
## [0.2.0] - 2026-02-24
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- AI interpretation layer for natural language brand refinement (`src/lib/branding-core/ai/`)
|
|
40
|
+
- Strategy pattern: keyword (zero-cost), Claude API (Anthropic Messages), and auto (fallback) interpreters
|
|
41
|
+
- `BrandIntent` abstraction decoupling NL understanding from generator execution
|
|
42
|
+
- 20+ color keywords (warm, vibrant, premium, muted, dark, elegant, etc.) with HSL shift values
|
|
43
|
+
- 15+ typography keywords (serif, editorial, dramatic, modern, compact, etc.) with font/scale mapping
|
|
44
|
+
- `intent-applier` module applying HSL hue/saturation/lightness shifts before palette generation
|
|
45
|
+
- Structured Claude prompts with brand context, JSON schema, and design principles
|
|
46
|
+
- Optional `strategy` parameter on `refine_brand_element` tool (keyword/ai/auto)
|
|
47
|
+
- `_interpretation` metadata in refinement responses showing strategy used and reasoning
|
|
48
|
+
- 24 new tests for AI interpreter, intent applier, and strategy selection (97 total)
|
|
49
|
+
|
|
50
|
+
## [0.1.0] - 2026-02-24
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- Initial project structure with MCP server architecture
|
|
55
|
+
- Color palette generator with 6 harmony modes (complementary, analogous, triadic, split-complementary, tetradic, monochromatic)
|
|
56
|
+
- Typography system generator with modular type scales and curated font pairings
|
|
57
|
+
- Spacing scale generator with geometric progression
|
|
58
|
+
- SVG logo generator with brand colors and initials
|
|
59
|
+
- 6 design token exporters: W3C JSON, CSS custom properties, Tailwind preset, Figma tokens, React theme, Sass variables
|
|
60
|
+
- WCAG contrast checker (AA/AAA compliance)
|
|
61
|
+
- Brand consistency validator with scoring
|
|
62
|
+
- HTML brand guidelines generator
|
|
63
|
+
- 7 MCP tools: generate_brand_identity, generate_color_palette, generate_typography_system, export_design_tokens, create_brand_guidelines, validate_brand_consistency, refine_brand_element
|
|
64
|
+
- 2 MCP resources: brand templates catalog, brand knowledge base
|
|
65
|
+
- Unit and integration test suite
|
|
66
|
+
- CI/CD workflows (lint, test, build, security scan)
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Contributing to Branding MCP
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to Branding MCP. This guide covers everything you need to know to submit high-quality contributions.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Code of Conduct](#code-of-conduct)
|
|
8
|
+
- [Getting Started](#getting-started)
|
|
9
|
+
- [Development Workflow](#development-workflow)
|
|
10
|
+
- [Code Standards](#code-standards)
|
|
11
|
+
- [Testing Requirements](#testing-requirements)
|
|
12
|
+
- [Pull Request Process](#pull-request-process)
|
|
13
|
+
- [Review Process](#review-process)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Code of Conduct
|
|
18
|
+
|
|
19
|
+
All contributors are expected to be respectful, constructive, and professional. Harassment or exclusionary behavior will not be tolerated.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Getting Started
|
|
24
|
+
|
|
25
|
+
### 1. Fork and clone
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/Forge-Space/branding-mcp.git
|
|
29
|
+
cd branding-mcp
|
|
30
|
+
npm install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Create a feature branch
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git checkout -b feat/my-feature
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 3. Validate your environment
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run validate
|
|
43
|
+
npm test
|
|
44
|
+
npm run build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Development Workflow
|
|
50
|
+
|
|
51
|
+
### Repository structure
|
|
52
|
+
|
|
53
|
+
Branding MCP is a TypeScript-based MCP server that provides brand identity resources for the Forge Space ecosystem.
|
|
54
|
+
|
|
55
|
+
### Commands
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install # Install dependencies
|
|
59
|
+
npm run build # Build TypeScript to JavaScript
|
|
60
|
+
npm run validate # Validate MCP server configuration
|
|
61
|
+
npm test # Run test suite
|
|
62
|
+
npm run dev # Development mode with watch
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Branch flow
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
feature → main
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This repository uses simplified trunk-based development. Feature branches merge directly to `main` after review.
|
|
72
|
+
|
|
73
|
+
### Commit message format
|
|
74
|
+
|
|
75
|
+
Follow Angular conventional commits:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
feat(tools): add brand color palette tool
|
|
79
|
+
fix(server): resolve resource loading error
|
|
80
|
+
docs(readme): update usage examples
|
|
81
|
+
refactor(types): simplify brand schema types
|
|
82
|
+
test(tools): add validation tests
|
|
83
|
+
chore(deps): upgrade @modelcontextprotocol/sdk
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `perf`, `chore`
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Code Standards
|
|
91
|
+
|
|
92
|
+
### TypeScript
|
|
93
|
+
|
|
94
|
+
- Strict mode enabled
|
|
95
|
+
- No `any` types without justification
|
|
96
|
+
- All functions must have explicit return types
|
|
97
|
+
- Use type imports: `import type { ... }`
|
|
98
|
+
|
|
99
|
+
### Code quality
|
|
100
|
+
|
|
101
|
+
- Functions: maximum 50 lines
|
|
102
|
+
- Cyclomatic complexity: maximum 10
|
|
103
|
+
- Line width: maximum 100 characters
|
|
104
|
+
- No comments unless explicitly requested or documenting complex algorithms
|
|
105
|
+
|
|
106
|
+
### MCP conventions
|
|
107
|
+
|
|
108
|
+
- Follow Model Context Protocol specification
|
|
109
|
+
- Tools must have clear descriptions and schemas
|
|
110
|
+
- Resources must be properly typed
|
|
111
|
+
- Prompts should be concise and actionable
|
|
112
|
+
|
|
113
|
+
### Security
|
|
114
|
+
|
|
115
|
+
- Never commit secrets or credentials
|
|
116
|
+
- Use environment variables for configuration
|
|
117
|
+
- Validate all user inputs
|
|
118
|
+
- Sanitize all outputs
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Testing Requirements
|
|
123
|
+
|
|
124
|
+
### Coverage targets
|
|
125
|
+
|
|
126
|
+
- Overall coverage: minimum 80%
|
|
127
|
+
- Tool handlers: 100%
|
|
128
|
+
- Edge cases and error conditions required
|
|
129
|
+
|
|
130
|
+
### What to test
|
|
131
|
+
|
|
132
|
+
- Tool handler logic
|
|
133
|
+
- Resource loading and validation
|
|
134
|
+
- Schema validation
|
|
135
|
+
- Error handling and edge cases
|
|
136
|
+
- MCP protocol compliance
|
|
137
|
+
|
|
138
|
+
### What NOT to test
|
|
139
|
+
|
|
140
|
+
- Trivial getters/setters
|
|
141
|
+
- Simple enum definitions
|
|
142
|
+
- Third-party library behavior
|
|
143
|
+
|
|
144
|
+
### Running tests
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm test # Run all tests
|
|
148
|
+
npm test -- --coverage # Generate coverage report
|
|
149
|
+
npm test -- --watch # Watch mode
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Pull Request Process
|
|
155
|
+
|
|
156
|
+
### Before opening a PR
|
|
157
|
+
|
|
158
|
+
Ensure all of the following pass:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
- [ ] npm run validate passes
|
|
162
|
+
- [ ] npm test passes with all tests green
|
|
163
|
+
- [ ] npm run build succeeds
|
|
164
|
+
- [ ] MCP server starts without errors
|
|
165
|
+
- [ ] No secrets or credentials committed
|
|
166
|
+
- [ ] CHANGELOG.md updated under [Unreleased]
|
|
167
|
+
- [ ] README.md updated if tools or resources changed
|
|
168
|
+
- [ ] Commit messages follow conventional commit format
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### PR checklist
|
|
172
|
+
|
|
173
|
+
1. Push your branch: `git push origin feat/my-feature`
|
|
174
|
+
2. Open PR targeting `main` branch
|
|
175
|
+
3. Fill in the PR template completely
|
|
176
|
+
4. Link related issues using `Closes #123` syntax
|
|
177
|
+
5. Request review from maintainers
|
|
178
|
+
6. Address all review feedback
|
|
179
|
+
|
|
180
|
+
### PR title format
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
feat(tools): add logo variants tool
|
|
184
|
+
fix(resources): resolve SVG encoding issue
|
|
185
|
+
docs: update tool usage guide
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Review Process
|
|
191
|
+
|
|
192
|
+
1. **Automated CI** runs lint, type-check, build, tests, and MCP validation
|
|
193
|
+
2. **Maintainer review** checks code quality, MCP compliance, and standards
|
|
194
|
+
3. **Approval** requires CI passing + at least 1 maintainer approval
|
|
195
|
+
4. **Merge** is done by a maintainer using squash merge to `main`
|
|
196
|
+
|
|
197
|
+
Typical review turnaround: 2-5 business days.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Questions?
|
|
202
|
+
|
|
203
|
+
Open a [GitHub Discussion](https://github.com/Forge-Space/branding-mcp/discussions) or file an [issue](https://github.com/Forge-Space/branding-mcp/issues).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Siza
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# @forgespace/branding-mcp
|
|
2
|
+
|
|
3
|
+
> **AI-powered brand identity generation via MCP — part of the [Forge Space](https://github.com/Forge-Space) open developer workspace.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/Forge-Space/branding-mcp/actions/workflows/ci.yml)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
Generate complete design systems — colors, typography, spacing, shadows, borders, motion tokens, gradients, multi-variant logos, favicons, and OG images with multi-format export. 8 MCP tools, zero API dependencies, algorithmic-first generation.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Color Palette Generation** — HSL-based color harmonies (complementary, analogous, triadic, etc.) with WCAG contrast validation
|
|
13
|
+
- **Typography System** — Modular type scales with curated font pairings
|
|
14
|
+
- **Spacing Scale** — Geometric progression spacing system
|
|
15
|
+
- **Shadow/Elevation System** — 6-level elevation scale with brand-tinted shadows, light/dark theme support
|
|
16
|
+
- **Border/Shape System** — Style-aware radius scales and border widths for all 8 brand styles
|
|
17
|
+
- **Motion/Animation System** — Duration scales, cubic-bezier easings, and transition presets per brand style
|
|
18
|
+
- **Gradient System** — 5 style-aware gradient presets (hero, button, card, text, background)
|
|
19
|
+
- **Multi-Variant Logo** — Wordmark, monogram, abstract, and icon variants with style-aware shapes
|
|
20
|
+
- **Favicon Generation** — 4 sizes (16, 32, 180 apple-touch, 512 PWA) from brand icon
|
|
21
|
+
- **OG Image Templates** — Default, article, and social formats with brand gradients
|
|
22
|
+
- **Multi-Format Export** — W3C Design Tokens, CSS custom properties, Tailwind preset, Figma tokens, React theme, Sass variables
|
|
23
|
+
- **Brand Validation** — WCAG contrast checking, completeness scoring, consistency analysis
|
|
24
|
+
- **Brand Guidelines** — HTML brand book generation
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install
|
|
30
|
+
npm run build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### As MCP Server (stdio)
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"branding": {
|
|
39
|
+
"command": "node",
|
|
40
|
+
"args": ["path/to/branding-mcp/dist/index.js"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### MCP Tools
|
|
47
|
+
|
|
48
|
+
| Tool | Description |
|
|
49
|
+
| ---------------------------- | -------------------------------------------------- |
|
|
50
|
+
| `generate_brand_identity` | Complete brand from name, industry, and style |
|
|
51
|
+
| `generate_color_palette` | Color palette with harmony and WCAG data |
|
|
52
|
+
| `generate_typography_system` | Font pairing + modular type scale |
|
|
53
|
+
| `export_design_tokens` | Export brand to JSON/CSS/Tailwind/Figma/React/Sass |
|
|
54
|
+
| `create_brand_guidelines` | Generate HTML brand book |
|
|
55
|
+
| `validate_brand_consistency` | Check WCAG compliance and completeness |
|
|
56
|
+
| `refine_brand_element` | Iterate on specific brand elements |
|
|
57
|
+
| `generate_brand_assets` | Generate favicons and OG images from brand |
|
|
58
|
+
|
|
59
|
+
### MCP Resources
|
|
60
|
+
|
|
61
|
+
| Resource | URI | Description |
|
|
62
|
+
| --------------- | ------------------- | --------------------------------- |
|
|
63
|
+
| Brand Templates | `brand://templates` | Pre-configured industry templates |
|
|
64
|
+
| Brand Knowledge | `brand://knowledge` | Color theory and typography rules |
|
|
65
|
+
|
|
66
|
+
## Development
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run dev # Watch mode
|
|
70
|
+
npm run validate # Lint + format + test
|
|
71
|
+
npm run test # Run tests
|
|
72
|
+
npm run test:coverage # Coverage report
|
|
73
|
+
npm run build # Build TypeScript
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Architecture
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
src/
|
|
80
|
+
├── index.ts # MCP server entry
|
|
81
|
+
├── lib/
|
|
82
|
+
│ ├── branding-core/ # Core library (reusable)
|
|
83
|
+
│ │ ├── generators/ # Color, typography, spacing, logo, gradients, favicons, OG
|
|
84
|
+
│ │ ├── exporters/ # Multi-format token export
|
|
85
|
+
│ │ ├── validators/ # WCAG, consistency checks
|
|
86
|
+
│ │ └── documents/ # Brand book generation
|
|
87
|
+
│ ├── config.ts # Environment config
|
|
88
|
+
│ ├── logger.ts # Pino logging
|
|
89
|
+
│ └── types.ts # TypeScript interfaces
|
|
90
|
+
├── tools/ # 8 MCP tool registrations
|
|
91
|
+
└── resources/ # Templates + knowledge base
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Ecosystem Integration
|
|
95
|
+
|
|
96
|
+
Part of the [Forge Space](https://github.com/Forge-Space) ecosystem:
|
|
97
|
+
|
|
98
|
+
- **mcp-gateway** — Register as MCP server (port 8033)
|
|
99
|
+
- **uiforge-mcp** — Consumes brand tokens via `brandId` parameter
|
|
100
|
+
- **uiforge-webapp** — Brand management UI at `/branding/*`
|
|
101
|
+
- **forge-patterns** — Shared configs and conventions
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT
|
package/data/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Knowledge Base
|
|
2
|
+
|
|
3
|
+
This directory contains reference data for brand identity generation.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
- `color-theory/` — Color harmony rules, psychology, and accessibility standards
|
|
8
|
+
- `typography/` — Font pairing data, type scale references, and readability guidelines
|
|
9
|
+
- `brand-guidelines-examples/` — Reference brand guides for pattern extraction
|
|
10
|
+
|
|
11
|
+
## Sources
|
|
12
|
+
|
|
13
|
+
All data is sourced from open-licensed references. See `docs/DATA_SOURCES.md` for the complete catalog.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { loadConfig } from './lib/config.js';
|
|
5
|
+
import { logger } from './lib/logger.js';
|
|
6
|
+
import { registerGenerateBrandIdentity } from './tools/generate-brand-identity.js';
|
|
7
|
+
import { registerGenerateColorPalette } from './tools/generate-color-palette.js';
|
|
8
|
+
import { registerGenerateTypographySystem } from './tools/generate-typography-system.js';
|
|
9
|
+
import { registerExportDesignTokens } from './tools/export-design-tokens.js';
|
|
10
|
+
import { registerCreateBrandGuidelines } from './tools/create-brand-guidelines.js';
|
|
11
|
+
import { registerValidateBrandConsistency } from './tools/validate-brand-consistency.js';
|
|
12
|
+
import { registerRefineBrandElement } from './tools/refine-brand-element.js';
|
|
13
|
+
import { registerGenerateBrandAssets } from './tools/generate-brand-assets.js';
|
|
14
|
+
import { registerBrandTemplates } from './resources/brand-templates.js';
|
|
15
|
+
import { registerBrandKnowledge } from './resources/brand-knowledge.js';
|
|
16
|
+
async function main() {
|
|
17
|
+
const config = loadConfig();
|
|
18
|
+
logger.info({ env: config.nodeEnv }, 'Starting branding-mcp server');
|
|
19
|
+
const server = new McpServer({
|
|
20
|
+
name: '@forgespace/branding-mcp',
|
|
21
|
+
version: '0.1.0',
|
|
22
|
+
});
|
|
23
|
+
registerGenerateBrandIdentity(server);
|
|
24
|
+
registerGenerateColorPalette(server);
|
|
25
|
+
registerGenerateTypographySystem(server);
|
|
26
|
+
registerExportDesignTokens(server);
|
|
27
|
+
registerCreateBrandGuidelines(server);
|
|
28
|
+
registerValidateBrandConsistency(server);
|
|
29
|
+
registerRefineBrandElement(server);
|
|
30
|
+
registerGenerateBrandAssets(server);
|
|
31
|
+
registerBrandTemplates(server);
|
|
32
|
+
registerBrandKnowledge(server);
|
|
33
|
+
const transport = new StdioServerTransport();
|
|
34
|
+
await server.connect(transport);
|
|
35
|
+
logger.info('Branding MCP server connected via stdio');
|
|
36
|
+
}
|
|
37
|
+
main().catch((error) => {
|
|
38
|
+
logger.fatal(error, 'Failed to start branding-mcp server');
|
|
39
|
+
process.exit(1);
|
|
40
|
+
});
|
|
41
|
+
process.on('SIGTERM', () => {
|
|
42
|
+
logger.info('Received SIGTERM, shutting down');
|
|
43
|
+
process.exit(0);
|
|
44
|
+
});
|
|
45
|
+
process.on('SIGINT', () => {
|
|
46
|
+
logger.info('Received SIGINT, shutting down');
|
|
47
|
+
process.exit(0);
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=index.js.map
|