@mosvera/mcp 0.1.1

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 (75) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +165 -0
  3. package/dist/context.d.ts +18 -0
  4. package/dist/context.js +179 -0
  5. package/dist/errors.d.ts +8 -0
  6. package/dist/errors.js +19 -0
  7. package/dist/examples/README.md +16 -0
  8. package/dist/examples/cinematic-editorial/README.md +22 -0
  9. package/dist/examples/cinematic-editorial/composition.json +14 -0
  10. package/dist/examples/cinematic-editorial/manifests/illustrative-image.manifest.json +16 -0
  11. package/dist/examples/cinematic-editorial/merge-strategies.json +3 -0
  12. package/dist/examples/cinematic-editorial/modifier.golden-hour.json +10 -0
  13. package/dist/examples/cinematic-editorial/modifier.high-contrast.json +5 -0
  14. package/dist/examples/cinematic-editorial/palette.editorial-warm.json +10 -0
  15. package/dist/examples/cinematic-editorial/template.base.json +11 -0
  16. package/dist/examples/cinematic-editorial/template.noir.json +7 -0
  17. package/dist/examples/demo-aesthetics/README.md +11 -0
  18. package/dist/examples/demo-aesthetics/composition.cinematic-lab.json +5 -0
  19. package/dist/examples/demo-aesthetics/composition.claymation-playful-builder.json +5 -0
  20. package/dist/examples/demo-aesthetics/composition.quiet-editorial.json +5 -0
  21. package/dist/examples/demo-aesthetics/composition.technical-manual.json +5 -0
  22. package/dist/examples/demo-aesthetics/template.cinematic-lab-base.json +45 -0
  23. package/dist/examples/demo-aesthetics/template.claymation-playful-builder-base.json +45 -0
  24. package/dist/examples/demo-aesthetics/template.quiet-editorial-base.json +45 -0
  25. package/dist/examples/demo-aesthetics/template.technical-manual-base.json +45 -0
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.js +7 -0
  28. package/dist/mcp-result.d.ts +10 -0
  29. package/dist/mcp-result.js +26 -0
  30. package/dist/project-writes.d.ts +8 -0
  31. package/dist/project-writes.js +70 -0
  32. package/dist/registry/loader.d.ts +4 -0
  33. package/dist/registry/loader.js +85 -0
  34. package/dist/registry/preflight.d.ts +3 -0
  35. package/dist/registry/preflight.js +28 -0
  36. package/dist/registry/strategies.d.ts +9 -0
  37. package/dist/registry/strategies.js +30 -0
  38. package/dist/server.d.ts +6 -0
  39. package/dist/server.js +172 -0
  40. package/dist/tools/aesthetic.d.ts +57 -0
  41. package/dist/tools/aesthetic.js +331 -0
  42. package/dist/tools/compile-generation.d.ts +12 -0
  43. package/dist/tools/compile-generation.js +67 -0
  44. package/dist/tools/get-palette.d.ts +11 -0
  45. package/dist/tools/get-palette.js +23 -0
  46. package/dist/tools/list-templates.d.ts +6 -0
  47. package/dist/tools/list-templates.js +15 -0
  48. package/dist/tools/resolve-composition.d.ts +8 -0
  49. package/dist/tools/resolve-composition.js +38 -0
  50. package/dist/tools/validate-schema.d.ts +6 -0
  51. package/dist/tools/validate-schema.js +17 -0
  52. package/dist/types.d.ts +58 -0
  53. package/dist/types.js +7 -0
  54. package/examples/README.md +16 -0
  55. package/examples/cinematic-editorial/README.md +22 -0
  56. package/examples/cinematic-editorial/composition.json +14 -0
  57. package/examples/cinematic-editorial/manifests/illustrative-image.manifest.json +16 -0
  58. package/examples/cinematic-editorial/merge-strategies.json +3 -0
  59. package/examples/cinematic-editorial/modifier.golden-hour.json +10 -0
  60. package/examples/cinematic-editorial/modifier.high-contrast.json +5 -0
  61. package/examples/cinematic-editorial/palette.editorial-warm.json +10 -0
  62. package/examples/cinematic-editorial/template.base.json +11 -0
  63. package/examples/cinematic-editorial/template.noir.json +7 -0
  64. package/examples/demo-aesthetics/README.md +11 -0
  65. package/examples/demo-aesthetics/composition.cinematic-lab.json +5 -0
  66. package/examples/demo-aesthetics/composition.claymation-playful-builder.json +5 -0
  67. package/examples/demo-aesthetics/composition.quiet-editorial.json +5 -0
  68. package/examples/demo-aesthetics/composition.technical-manual.json +5 -0
  69. package/examples/demo-aesthetics/template.cinematic-lab-base.json +45 -0
  70. package/examples/demo-aesthetics/template.claymation-playful-builder-base.json +45 -0
  71. package/examples/demo-aesthetics/template.quiet-editorial-base.json +45 -0
  72. package/examples/demo-aesthetics/template.technical-manual-base.json +45 -0
  73. package/mcpb/icon.png +0 -0
  74. package/mcpb/manifest.json +73 -0
  75. package/package.json +74 -0
@@ -0,0 +1,6 @@
1
+ import type { Registry } from "@mosvera/runtime";
2
+ import type { TemplateSummary, ToolContext } from "../types.ts";
3
+ export interface ListTemplatesArgs {
4
+ registry?: Registry;
5
+ }
6
+ export declare function runListTemplates(ctx: ToolContext, args: ListTemplatesArgs): TemplateSummary[];
@@ -0,0 +1,15 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // list_templates tool handler. Enumerates templates in the effective registry
4
+ // (loaded project merged with an optional inline override), reporting each
5
+ // template's id and its $extends parent if present.
6
+ import { mergeRegistry } from "../registry/strategies.js";
7
+ export function runListTemplates(ctx, args) {
8
+ const reg = mergeRegistry(ctx.project.registry, args.registry);
9
+ const templates = reg.templates ?? {};
10
+ return Object.keys(templates).map((name) => {
11
+ const doc = templates[name];
12
+ const parent = doc["$extends"];
13
+ return typeof parent === "string" ? { name, extends: parent } : { name };
14
+ });
15
+ }
@@ -0,0 +1,8 @@
1
+ import { type MergeStrategies, type Registry } from "@mosvera/runtime";
2
+ import type { ResolveResult, ToolContext } from "../types.ts";
3
+ export interface ResolveArgs {
4
+ composition: object | string;
5
+ registry?: Registry;
6
+ merge_strategies?: MergeStrategies;
7
+ }
8
+ export declare function runResolveComposition(ctx: ToolContext, args: ResolveArgs): ResolveResult;
@@ -0,0 +1,38 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // resolve_composition tool handler. Validates the composition, builds effective
4
+ // merge strategies (schema+project base, then inline override), pre-flights
5
+ // references (emitting unknown_reference before the runtime), then resolves to
6
+ // the canonical model. Runtime ResolutionErrors map to the taxonomy.
7
+ import { parse, resolveComposition, } from "@mosvera/runtime";
8
+ import { invalidDocument, isResolutionError, mapResolutionError, toolError } from "../errors.js";
9
+ import { collectMissingReferences } from "../registry/preflight.js";
10
+ import { composeStrategies, mergeRegistry } from "../registry/strategies.js";
11
+ export function runResolveComposition(ctx, args) {
12
+ let composition;
13
+ try {
14
+ composition = parse(args.composition);
15
+ }
16
+ catch (e) {
17
+ const message = e instanceof Error ? e.message : String(e);
18
+ return invalidDocument([{ path: "", message: `parse error: ${message}` }]);
19
+ }
20
+ const v = ctx.validator.validate(composition, "composition");
21
+ if (!v.valid)
22
+ return invalidDocument(v.errors);
23
+ const registry = mergeRegistry(ctx.project.registry, args.registry);
24
+ const missing = collectMissingReferences(composition, registry);
25
+ if (missing.length > 0) {
26
+ return toolError("unknown_reference", { missing });
27
+ }
28
+ const strategies = composeStrategies(ctx.baseStrategies, args.merge_strategies);
29
+ try {
30
+ const canonical = resolveComposition(composition, registry, strategies);
31
+ return { canonical };
32
+ }
33
+ catch (e) {
34
+ if (isResolutionError(e))
35
+ return mapResolutionError(e);
36
+ throw e;
37
+ }
38
+ }
@@ -0,0 +1,6 @@
1
+ import { type DocumentKind, type Validator, type ValidationResult } from "@mosvera/runtime";
2
+ export interface ValidateArgs {
3
+ document: object | string;
4
+ kind: DocumentKind;
5
+ }
6
+ export declare function runValidateSchema(validator: Validator, args: ValidateArgs): ValidationResult;
@@ -0,0 +1,17 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // validate_schema tool handler. Validates a document against a canonical
4
+ // schema kind. A validation failure is a SUCCESSFUL call returning
5
+ // { valid:false, errors }, not an error result.
6
+ import { parse } from "@mosvera/runtime";
7
+ export function runValidateSchema(validator, args) {
8
+ let doc;
9
+ try {
10
+ doc = parse(args.document);
11
+ }
12
+ catch (e) {
13
+ const message = e instanceof Error ? e.message : String(e);
14
+ return { valid: false, errors: [{ path: "", message: `parse error: ${message}` }] };
15
+ }
16
+ return validator.validate(doc, args.kind);
17
+ }
@@ -0,0 +1,58 @@
1
+ import type { CapabilityManifest, CompileWarning, JsonObject, MergeStrategies, RegistryDiagnostic, Registry, Validator } from "@mosvera/runtime";
2
+ import type { EmissionResult, ProviderAdapter } from "@mosvera/provider-base";
3
+ /** A loaded aesthetic-system "project" directory. */
4
+ export interface LoadedProject {
5
+ registry: Registry;
6
+ manifests: Record<string, CapabilityManifest>;
7
+ /** Project-declared aesthetic-field strategies (merge-strategies.json). */
8
+ strategies: MergeStrategies;
9
+ }
10
+ /** Per-server context passed to every pure tool handler. */
11
+ export interface ToolContext {
12
+ /** Absolute registry directory currently loaded by the server. */
13
+ registryDir: string;
14
+ /** True when persistence tools may write into registryDir. */
15
+ registryWritable: boolean;
16
+ /** True when write tools are intentionally suppressed. */
17
+ readOnlyMode: boolean;
18
+ /** True when the packaged examples were used because the configured registry could not be loaded. */
19
+ fallbackRegistry: boolean;
20
+ fallbackReason?: string;
21
+ loadDiagnostics: RegistryDiagnostic[];
22
+ project: LoadedProject;
23
+ validator: Validator;
24
+ /** schema-derived defaults composed with the project's strategies. */
25
+ baseStrategies: MergeStrategies;
26
+ /** Optional provider adapters for deterministic payload emission. */
27
+ adapters?: Record<string, ProviderAdapter>;
28
+ }
29
+ /** Closed MCP-layer error taxonomy (D2/D7 in the design spec). */
30
+ export type ToolErrorCode = "invalid_document" | "unknown_reference" | "unknown_provider" | "unsafe_filename" | "schema_failure" | "write_disabled" | "registry_unwritable" | "inheritance_cycle" | "reference_cycle" | "multiple_inheritance_unsupported";
31
+ export interface ToolError {
32
+ error: ToolErrorCode;
33
+ detail?: JsonObject | string;
34
+ }
35
+ export type ResolveResult = {
36
+ canonical: JsonObject;
37
+ } | ToolError;
38
+ export interface TemplateSummary {
39
+ name: string;
40
+ extends?: string;
41
+ }
42
+ export type CompileOk = {
43
+ status: "compiled";
44
+ warnings: CompileWarning[];
45
+ canonical: JsonObject;
46
+ };
47
+ export type CompileEmitOk = {
48
+ status: "compiled";
49
+ canonical: JsonObject;
50
+ emission: EmissionResult;
51
+ };
52
+ export type CompileHardError = {
53
+ status: "error";
54
+ error: "required_unsupported";
55
+ construct: string;
56
+ canonical: JsonObject;
57
+ };
58
+ export type CompileResultMcp = CompileOk | CompileEmitOk | CompileHardError | ToolError;
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ //
3
+ // MCP-layer shared types. The MCP surface is a thin orchestration layer over
4
+ // @mosvera/runtime; these types describe the loaded project and the structured
5
+ // results/errors the pure tool handlers return (never thrown across the MCP
6
+ // boundary).
7
+ export {};
@@ -0,0 +1,16 @@
1
+ <!--
2
+ SPDX-License-Identifier: CC-BY-4.0
3
+ -->
4
+
5
+ # MCP Examples
6
+
7
+ `demo-aesthetics/` is the default registry seed used by `@mosvera/mcp`.
8
+ On first run, the server copies those public-safe aesthetics into the user's
9
+ local registry directory.
10
+
11
+ `cinematic-editorial/` is retained as a compact provider-compilation fixture
12
+ for tests and advanced examples.
13
+
14
+ The public MCP surface is documented in the repository README. Use
15
+ `server_status` first when debugging an install; it reports the active registry
16
+ path, write mode, versions, document counts, and diagnostics.
@@ -0,0 +1,22 @@
1
+ <!--
2
+ SPDX-License-Identifier: CC-BY-4.0
3
+ -->
4
+
5
+ # Example: Cinematic Editorial
6
+
7
+ A worked Mosvera aesthetic system expressed entirely in schema-valid documents.
8
+ It demonstrates single inheritance (`noir` extends `cinematic-editorial-base`),
9
+ modifier composition (`golden-hour`, `high-contrast`), an inline override, and a
10
+ project-level `merge-strategies.json` declaring that the open aesthetic field
11
+ `lights` merges by the `name` key (MEP-0001 `merge_by`). The composition also
12
+ includes the Phase 4 image-generation fields (`subject`, `aspect_ratio`,
13
+ `quality`, `safety`, and `palette.accent`) used by the provider adapters.
14
+
15
+ `manifests/illustrative-image.manifest.json` is an **illustrative** capability
16
+ manifest used only to exercise the MEP-0003 compilation contract end-to-end. It
17
+ is NOT a real provider adapter. The real reference adapters live in
18
+ [`mosvera/providers`](https://github.com/mosvera/providers).
19
+
20
+ This directory is retained as a compact provider-compilation fixture. The
21
+ default first-run registry seed for the public MCP server is
22
+ [`../demo-aesthetics/`](../demo-aesthetics/).
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/composition",
3
+ "id": "editorial-noir-golden",
4
+ "base": "noir",
5
+ "modifiers": ["golden-hour", "high-contrast"],
6
+ "overrides": {
7
+ "subject": "a lighthouse on a basalt cliff at dusk",
8
+ "medium": "cinematic",
9
+ "palette": { "accent": "#c8943f" },
10
+ "aspect_ratio": "3:2",
11
+ "quality": "high",
12
+ "safety": "standard"
13
+ }
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/capability-manifest",
3
+ "provider": "illustrative-image",
4
+ "adapter_version": "0.0.0-illustrative",
5
+ "constructs": {
6
+ "subject": { "lowering_action": "native" },
7
+ "medium": { "lowering_action": "native" },
8
+ "aspect_ratio": { "lowering_action": "native" },
9
+ "quality": { "lowering_action": "native" },
10
+ "safety": { "lowering_action": "unsupported", "note": "ILLUSTRATIVE ONLY — no tunable moderation control." },
11
+ "lighting": { "lowering_action": "approximate", "note": "ILLUSTRATIVE ONLY — not a real provider. lighting scheme/mood folded into a prompt phrase." },
12
+ "color_grade": { "lowering_action": "approximate", "note": "ILLUSTRATIVE ONLY — contrast/saturation folded into prompt adjectives." },
13
+ "palette": { "lowering_action": "approximate", "note": "ILLUSTRATIVE ONLY — accent color folded into prompt phrase." },
14
+ "lights": { "lowering_action": "emulate", "note": "ILLUSTRATIVE ONLY — named lights emulated via descriptive prompt clauses." }
15
+ }
16
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "lights": { "strategy": "merge_by", "key": "name" }
3
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/modifier",
3
+ "id": "golden-hour",
4
+ "lighting": { "mood": "warm" },
5
+ "lights": [
6
+ { "name": "fill", "power": 5 },
7
+ { "name": "rim", "power": 2 }
8
+ ],
9
+ "color_temperature": "warm"
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/modifier",
3
+ "id": "high-contrast",
4
+ "color_grade": { "contrast": "very_high" }
5
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/palette",
3
+ "id": "editorial-warm",
4
+ "roles": {
5
+ "background": "#1a1410",
6
+ "foreground": "#f5e6d3",
7
+ "accent": "#c8943f",
8
+ "shadow": "#0a0805"
9
+ }
10
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/template",
3
+ "id": "cinematic-editorial-base",
4
+ "medium": "photographic",
5
+ "lighting": { "scheme": "three_point", "mood": "neutral" },
6
+ "lights": [
7
+ { "name": "key", "power": 6 },
8
+ { "name": "fill", "power": 3 }
9
+ ],
10
+ "color_grade": { "contrast": "medium", "saturation": "natural" }
11
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/template",
3
+ "id": "noir",
4
+ "$extends": "cinematic-editorial-base",
5
+ "lighting": { "mood": "moody" },
6
+ "color_grade": { "contrast": "high", "saturation": "desaturated" }
7
+ }
@@ -0,0 +1,11 @@
1
+ <!--
2
+ SPDX-License-Identifier: CC-BY-4.0
3
+ -->
4
+
5
+ # Demo Aesthetics
6
+
7
+ Default local registry seed for the Mosvera MCP server. On first run, the
8
+ server copies these public-safe documents into the user's registry directory
9
+ and then reads/writes only that user-owned copy.
10
+
11
+ These examples mirror the four live `mosvera.io` demonstrator aesthetics.
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/composition",
3
+ "base": "cinematic-lab-base",
4
+ "id": "cinematic-lab"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/composition",
3
+ "base": "claymation-playful-builder-base",
4
+ "id": "claymation-playful-builder"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/composition",
3
+ "base": "quiet-editorial-base",
4
+ "id": "quiet-editorial"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/composition",
3
+ "base": "technical-manual-base",
4
+ "id": "technical-manual"
5
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/template",
3
+ "id": "cinematic-lab-base",
4
+ "imagery": {
5
+ "alt": "Spotlit high-contrast Mosvera tesserae arranged for a cinematic lab surface.",
6
+ "blend": "screen",
7
+ "contrast": "1.22",
8
+ "saturation": "1.08",
9
+ "src": "/assets/aesthetics/hero-cinematic-lab.webp",
10
+ "treatment": "spotlit"
11
+ },
12
+ "layout": {
13
+ "density": "spacious",
14
+ "max_width": "1240px",
15
+ "radius": "8px",
16
+ "shadow": "0 28px 80px rgba(0, 0, 0, 0.42)"
17
+ },
18
+ "motion": {
19
+ "duration": "320ms",
20
+ "pace": "cinematic"
21
+ },
22
+ "palette": {
23
+ "accent": "#e05b45",
24
+ "accent_2": "#7cc9d8",
25
+ "background": "#12100f",
26
+ "border": "#4c3b39",
27
+ "code_bg": "#080707",
28
+ "code_ink": "#f8e6c8",
29
+ "ink": "#f6eee6",
30
+ "muted": "#c7b8aa",
31
+ "surface": "#1e1a18",
32
+ "surface_alt": "#2f2524"
33
+ },
34
+ "typography": {
35
+ "body": "Hanken Grotesk",
36
+ "display": "Fraunces",
37
+ "mono": "IBM Plex Mono",
38
+ "scale": "large"
39
+ },
40
+ "voice": {
41
+ "body": "Cinematic Lab pushes contrast, scale, and image presence while the same composition, schema, and token panes stay readable.",
42
+ "eyebrow": "Visual research mode",
43
+ "headline": "The standard can carry drama without losing structure."
44
+ }
45
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/template",
3
+ "id": "claymation-playful-builder-base",
4
+ "imagery": {
5
+ "alt": "Tactile clay-like Mosvera tesserae under warm builder-table light.",
6
+ "blend": "normal",
7
+ "contrast": "0.96",
8
+ "saturation": "1.12",
9
+ "src": "/assets/aesthetics/hero-claymation-playful-builder.webp",
10
+ "treatment": "tabletop_model"
11
+ },
12
+ "layout": {
13
+ "density": "roomy",
14
+ "max_width": "1160px",
15
+ "radius": "8px",
16
+ "shadow": "0 18px 0 rgba(96, 63, 39, 0.26)"
17
+ },
18
+ "motion": {
19
+ "duration": "260ms",
20
+ "pace": "bouncy"
21
+ },
22
+ "palette": {
23
+ "accent": "#d45f3f",
24
+ "accent_2": "#2f8f9d",
25
+ "background": "#f6e7cc",
26
+ "border": "#c99a68",
27
+ "code_bg": "#2b2119",
28
+ "code_ink": "#ffe3bc",
29
+ "ink": "#2a2118",
30
+ "muted": "#695946",
31
+ "surface": "#fff3dc",
32
+ "surface_alt": "#ead2ad"
33
+ },
34
+ "typography": {
35
+ "body": "Hanken Grotesk",
36
+ "display": "Fraunces",
37
+ "mono": "IBM Plex Mono",
38
+ "scale": "friendly"
39
+ },
40
+ "voice": {
41
+ "body": "This mode keeps the spec serious while the surface becomes handmade, constructive, and a little mischievous.",
42
+ "eyebrow": "Tactile builder mode",
43
+ "headline": "Same architecture, built out of warm clay and shop light."
44
+ }
45
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/template",
3
+ "id": "quiet-editorial-base",
4
+ "imagery": {
5
+ "alt": "Warm paper-toned Mosvera tesserae arranged as a calm editorial composition.",
6
+ "blend": "normal",
7
+ "contrast": "1.02",
8
+ "saturation": "0.92",
9
+ "src": "/assets/aesthetics/hero-quiet-editorial.webp",
10
+ "treatment": "paper_field"
11
+ },
12
+ "layout": {
13
+ "density": "comfortable",
14
+ "max_width": "1160px",
15
+ "radius": "6px",
16
+ "shadow": "0 18px 55px rgba(58, 38, 21, 0.16)"
17
+ },
18
+ "motion": {
19
+ "duration": "220ms",
20
+ "pace": "steady"
21
+ },
22
+ "palette": {
23
+ "accent": "#bd5838",
24
+ "accent_2": "#2e6b5f",
25
+ "background": "#f7f2e7",
26
+ "border": "#d8c8b6",
27
+ "code_bg": "#181513",
28
+ "code_ink": "#f5ebdd",
29
+ "ink": "#211b16",
30
+ "muted": "#665c50",
31
+ "surface": "#fffaf0",
32
+ "surface_alt": "#eee3d4"
33
+ },
34
+ "typography": {
35
+ "body": "Hanken Grotesk",
36
+ "display": "Fraunces",
37
+ "mono": "IBM Plex Mono",
38
+ "scale": "editorial"
39
+ },
40
+ "voice": {
41
+ "body": "Mosvera turns aesthetic intent into typed, portable, reviewable artifacts that teams can run inside their own platforms.",
42
+ "eyebrow": "Canonical public home",
43
+ "headline": "Aesthetic infrastructure you can inspect."
44
+ }
45
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://mosvera.io/schema/0.1/template",
3
+ "id": "technical-manual-base",
4
+ "imagery": {
5
+ "alt": "High-key schematic Mosvera tesserae rendered like a technical reference plate.",
6
+ "blend": "multiply",
7
+ "contrast": "1.14",
8
+ "saturation": "0.72",
9
+ "src": "/assets/aesthetics/hero-technical-manual.webp",
10
+ "treatment": "schematic"
11
+ },
12
+ "layout": {
13
+ "density": "compact",
14
+ "max_width": "1220px",
15
+ "radius": "2px",
16
+ "shadow": "0 1px 0 rgba(16, 33, 28, 0.24)"
17
+ },
18
+ "motion": {
19
+ "duration": "120ms",
20
+ "pace": "quick"
21
+ },
22
+ "palette": {
23
+ "accent": "#17745f",
24
+ "accent_2": "#5847a6",
25
+ "background": "#f2f5f1",
26
+ "border": "#b9c8c0",
27
+ "code_bg": "#07130f",
28
+ "code_ink": "#d9f7ea",
29
+ "ink": "#10211c",
30
+ "muted": "#50615b",
31
+ "surface": "#ffffff",
32
+ "surface_alt": "#dfe8e2"
33
+ },
34
+ "typography": {
35
+ "body": "Hanken Grotesk",
36
+ "display": "IBM Plex Mono",
37
+ "mono": "IBM Plex Mono",
38
+ "scale": "compact"
39
+ },
40
+ "voice": {
41
+ "body": "This mode compresses the interface, raises structure, and makes the underlying Mosvera artifacts feel like a spec you can build from.",
42
+ "eyebrow": "Implementation reference",
43
+ "headline": "Same site, compiled as a technical surface."
44
+ }
45
+ }
package/mcpb/icon.png ADDED
Binary file
@@ -0,0 +1,73 @@
1
+ {
2
+ "manifest_version": "0.3",
3
+ "name": "mosvera-mcp",
4
+ "display_name": "Mosvera",
5
+ "version": "0.1.1",
6
+ "description": "Resolve, compile, and save local Mosvera aesthetics from Claude Desktop.",
7
+ "long_description": "Mosvera runs locally against your own aesthetic registry. It lets Claude list named aesthetics, resolve them to canonical Mosvera models, compile portable design tokens and CSS variables, and save registry documents without sending provider requests or storing secrets.",
8
+ "author": {
9
+ "name": "Mosvera",
10
+ "email": "nic@niclydon.io",
11
+ "url": "https://mosvera.io"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/mosvera/mcp"
16
+ },
17
+ "homepage": "https://mosvera.io",
18
+ "documentation": "https://github.com/mosvera/mcp#readme",
19
+ "support": "https://github.com/mosvera/mcp/issues",
20
+ "icon": "icon.png",
21
+ "server": {
22
+ "type": "node",
23
+ "entry_point": "server/dist/server.js",
24
+ "mcp_config": {
25
+ "command": "node",
26
+ "args": [
27
+ "${__dirname}/server/dist/server.js",
28
+ "--registry=${user_config.registry_directory}",
29
+ "--read-only=${user_config.read_only_mode}"
30
+ ]
31
+ }
32
+ },
33
+ "tools": [
34
+ { "name": "server_status", "description": "Show registry path, write mode, versions, counts, and diagnostics." },
35
+ { "name": "list_aesthetics", "description": "List named aesthetics in the active local registry." },
36
+ { "name": "get_registry_document", "description": "Fetch a template, modifier, palette, composition, or capability manifest." },
37
+ { "name": "validate_document", "description": "Validate one Mosvera document against a schema kind." },
38
+ { "name": "validate_registry", "description": "Validate the active local registry." },
39
+ { "name": "resolve_aesthetic", "description": "Resolve a named or inline aesthetic to the canonical Mosvera model." },
40
+ { "name": "compile_design_tokens", "description": "Compile an aesthetic into portable design tokens and CSS variables." },
41
+ { "name": "compile_provider_payload", "description": "Compile a deterministic provider payload without making provider HTTP calls." },
42
+ { "name": "draft_aesthetic", "description": "Draft a valid composition document without saving it." },
43
+ { "name": "save_aesthetic", "description": "Create or update a named aesthetic in the active local registry." },
44
+ { "name": "save_registry_document", "description": "Create or update an advanced registry document." },
45
+ { "name": "delete_registry_document", "description": "Delete a registry document from the active local registry." },
46
+ { "name": "write_merge_strategies", "description": "Replace merge-strategies.json with deterministic JSON." }
47
+ ],
48
+ "keywords": ["mosvera", "aesthetic-infrastructure", "mcp", "design-tokens"],
49
+ "license": "Apache-2.0",
50
+ "privacy_policies": [],
51
+ "compatibility": {
52
+ "claude_desktop": ">=0.10.0",
53
+ "platforms": ["darwin", "win32", "linux"],
54
+ "runtimes": {
55
+ "node": ">=20.0.0"
56
+ }
57
+ },
58
+ "user_config": {
59
+ "registry_directory": {
60
+ "type": "directory",
61
+ "title": "Mosvera Registry Directory",
62
+ "description": "Optional local folder for your Mosvera aesthetic registry. Leave empty to use the platform default.",
63
+ "required": false
64
+ },
65
+ "read_only_mode": {
66
+ "type": "boolean",
67
+ "title": "Read-only mode",
68
+ "description": "Hide registry-writing tools and use Mosvera only for inspection and compilation.",
69
+ "default": false,
70
+ "required": false
71
+ }
72
+ }
73
+ }