{
  "name": "spatial-compiler",
  "title": "Spatial Compiler",
  "version": "0.1.0",
  "description": "Headless GPU compilation for 3D geometry and physics. Turn raw AI-generated meshes into production-ready, simulation-ready assets with one API call, delivered natively via MCP and REST. The tools compile_3d_asset and simulate_fx_vat run the mesh and physics pipeline, and bake, check, schema, sweep and wire map one to one onto the commands of the spatial-compiler program for the pyro module. The local MCP server reads a SPATIAL_API_KEY environment variable; the hosted server uses an OAuth 2.1 browser login.",
  "serverInfo": {
    "name": "spatial-compiler",
    "title": "Spatial Compiler",
    "version": "0.1.0",
    "vendor": "Applied Manifold"
  },
  "websiteUrl": "https://appliedmanifold.com/docs/",
  "transport": {
    "type": "streamable-http",
    "endpoint": "https://mcp.spatialcompiler.dev"
  },
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://mcp.spatialcompiler.dev"
    }
  ],
  "packages": [
    {
      "registryType": "npm",
      "identifier": "@spatial-compiler/mcp",
      "version": "0.1.0",
      "transport": {
        "type": "stdio"
      },
      "environmentVariables": [
        {
          "name": "SPATIAL_API_KEY",
          "description": "Spatial Compiler API key for the local MCP server, read from the environment.",
          "isRequired": true,
          "isSecret": true
        }
      ]
    }
  ],
  "authentication": {
    "hosted": {
      "type": "oauth2",
      "description": "OAuth 2.1 browser login with PKCE (S256).",
      "authorizationServers": [
        "https://mcp.spatialcompiler.dev"
      ],
      "protectedResourceMetadata": "https://appliedmanifold.com/.well-known/oauth-protected-resource"
    },
    "local": {
      "type": "api_key",
      "variable": "SPATIAL_API_KEY",
      "description": "API key passed as SPATIAL_API_KEY; sent to the API as a bearer token."
    },
    "description": "The local MCP server reads a SPATIAL_API_KEY environment variable; the hosted server uses an OAuth 2.1 browser login.",
    "documentation": "https://appliedmanifold.com/auth.md"
  },
  "capabilities": {
    "tools": {
      "listChanged": false
    }
  },
  "tools": [
    {
      "name": "compile_3d_asset",
      "title": "Geometry & Materials",
      "description": "Welds non-manifold edges, decimates to exact triangle budgets via meshoptimizer, packs non-overlapping xatlas UV atlases, and bakes channel-packed ORM textures in a single VRAM pass.",
      "inputSchema": {
        "type": "object",
        "description": "Geometry & Materials arguments.",
        "properties": {
          "file": {
            "type": "string",
            "description": "Path or URL of a .glb / CAD file."
          },
          "target_tris": {
            "type": "integer",
            "description": "Exact triangle budget."
          },
          "dry_run": {
            "type": "boolean",
            "description": "Zero-cost pre-flight estimate (0 credits)."
          }
        },
        "required": [
          "file"
        ]
      }
    },
    {
      "name": "simulate_fx_vat",
      "title": "Physics",
      "description": "Runs parallel GPU XPBD cloth and Voronoi rigid-body fracture rollouts, exporting zero-CPU-cost Vertex Animated Textures (VATs) and drop-in engine shaders.",
      "inputSchema": {
        "type": "object",
        "description": "Physics arguments.",
        "properties": {
          "file": {
            "type": "string",
            "description": "Path or URL of a .glb file."
          },
          "effect": {
            "type": "string",
            "enum": [
              "xpbd_cloth",
              "voronoi_fracture"
            ],
            "description": "Simulation to run."
          },
          "dry_run": {
            "type": "boolean",
            "description": "Zero-cost pre-flight estimate (0 credits)."
          }
        },
        "required": [
          "file"
        ]
      }
    },
    {
      "name": "bake",
      "title": "Bake",
      "description": "Bake a .pyro.toml spec into flipbook sheets, previews, an animated preview and a JSON report.",
      "inputSchema": {
        "type": "object",
        "description": "Bake arguments.",
        "properties": {
          "spec": {
            "type": "string",
            "description": "Path of a .pyro.toml spec."
          },
          "out": {
            "type": "string",
            "description": "Output folder."
          },
          "quality": {
            "type": "string",
            "enum": [
              "draft",
              "final"
            ],
            "description": "Bake quality."
          },
          "seed": {
            "type": "integer",
            "description": "Seed; a new seed gives a new instance of the same effect."
          },
          "set": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Overrides as section.key=value, one per item."
          }
        },
        "required": [
          "spec",
          "out"
        ]
      }
    },
    {
      "name": "check",
      "title": "Check",
      "description": "Validate a spec without the GPU. Each error names the key and the nearest valid key or the range.",
      "inputSchema": {
        "type": "object",
        "description": "Check arguments.",
        "properties": {
          "spec": {
            "type": "string",
            "description": "Path of a .pyro.toml spec."
          },
          "set": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Overrides as section.key=value, one per item."
          }
        },
        "required": [
          "spec"
        ]
      }
    },
    {
      "name": "schema",
      "title": "Schema",
      "description": "Return every field, range, default, warning and metric as JSON.",
      "inputSchema": {
        "type": "object",
        "description": "Schema arguments.",
        "properties": {},
        "required": []
      }
    },
    {
      "name": "sweep",
      "title": "Sweep",
      "description": "Bake draft variants of one or two keys onto one labelled comparison sheet.",
      "inputSchema": {
        "type": "object",
        "description": "Sweep arguments.",
        "properties": {
          "spec": {
            "type": "string",
            "description": "Path of a .pyro.toml spec."
          },
          "out": {
            "type": "string",
            "description": "Output folder."
          },
          "set": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Overrides as section.key=value, one per item."
          }
        },
        "required": [
          "spec",
          "set",
          "out"
        ]
      }
    },
    {
      "name": "wire",
      "title": "Wire",
      "description": "Write a Godot 4 scene for a bake, installing the six-way shader flipbook_6way.gdshader in the project.",
      "inputSchema": {
        "type": "object",
        "description": "Wire arguments.",
        "properties": {
          "bake_dir": {
            "type": "string",
            "description": "Bake folder inside the Godot project."
          },
          "scene": {
            "type": "string",
            "description": "Path of the .tscn scene to write."
          },
          "set": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Overrides as section.key=value, one per item."
          }
        },
        "required": [
          "bake_dir",
          "scene"
        ]
      }
    }
  ]
}
