MCP server

Slant / Start

Give a coding agent Slant: a stdio MCP server that answers with components, props, usage, conventions, tokens, themes and recipes.

Usage

Terminal
claude mcp add slant -- node /path/to/tuttn-portfolio/slant/mcp/bin/slant-mcp.mjs

The command above adds the server to Claude Code from a checkout of the repository. @tuttn/slant-mcp is not on npm yet, so a checkout comes first: clone the repository, run npm install at its root, and put the checkout's path in place of /path/to. The server needs Node 22 or later. The repository is private, so until @tuttn/slant-mcp is published this install needs access to it; the registry files this site serves, listed below, are public.

git clone https://github.com/nirtuttnauer/tuttn-portfolio.git
cd tuttn-portfolio
npm install

Once the package is published, the checkout is no longer needed:

claude mcp add slant -- npx -y @tuttn/slant-mcp

Cursor and VS Code

Both read the server from a JSON file in the project. Cursor's is .cursor/mcp.json:

{
  "mcpServers": {
    "slant": {
      "command": "node",
      "args": ["/path/to/tuttn-portfolio/slant/mcp/bin/slant-mcp.mjs"]
    }
  }
}

VS Code's is .vscode/mcp.json, with servers in place of mcpServers and the transport named:

{
  "servers": {
    "slant": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/tuttn-portfolio/slant/mcp/bin/slant-mcp.mjs"]
    }
  }
}

What it gives an agent

A stdio server named slant, with one tool per kind of question. Each answers with readable Markdown for the agent, and the same answer as structured JSON for anything that parses it. An unknown name is an error that suggests the closest matches.

ToolTitleWhat it answers
list_componentsList componentsEvery Slant component with its group, exports, one-line description and docs page. Pass group to narrow the list.
get_componentGet a componentOne Slant component in full: the import, description, docs notes, props tables, usage example, keyboard and accessibility notes, related components, CSS classes and tokens, and its source code. name takes any export in any case (useToast finds Toast); include limits the sections.
searchSearch SlantSearch Slant's components, props, docs pages, Lab recipes and tokens by keyword. Returns the best matches, each with the tool call that reads it in full.
get_conventionsGet the conventionsThe rules every Slant component follows: refs and attributes, the value/onValueChange state pairs, tone, variant and size, data arrays and compound parts, asChild, forms, and styles in @layer slant. Read it before writing Slant code.
get_tokensGet the tokensSlant's --sl-* CSS variables: colours and radii per theme, shadows, spacing, type sizes, control heights per density, motion, layers and the focus ring. Pass theme or category to narrow them.
get_themesGet the themesThe built-in themes with every colour, radius and shadow, how to add your own as a .slant[data-theme="<id>"] CSS block, and a link to the theme builder.
get_recipeGet a recipeA Lab recipe: a working composition of Slant components with its SwiftUI twin, usage, keyboard and accessibility notes, and source. name matches the slug, id, title or Swift name; leave it out to list every recipe.

The table is read from the server card, /.well-known/mcp/server.json, which also carries the install commands and the server's arguments.

Where the data comes from

The server reads one file, registry.json, and finds everything else relative to it. By default that is the copy bundled with the server, in slant/mcp/data/, so it works offline and answers for the version you have checked out. To read the hosted copy instead, which follows this site, pass --registry:

claude mcp add slant -- node /path/to/tuttn-portfolio/slant/mcp/bin/slant-mcp.mjs --registry https://tuttn.io/kit/registry.json

--registry takes a URL or a path. Without it, the server reads the SLANT_REGISTRY environment variable, and without that, the bundled copy. If a remote registry fails to load, the server says so on stderr and falls back to the bundle.

The registry files

The same files are served from this site, for agents and tools that read JSON directly. They are generated by npm run build:registry from the component list, the docs pages, the generated props and the tokens, and npm run check fails when they drift.

  • /kit/registry.json: the index. Every component with its group, exports and docs page; the docs pages; the Lab recipes; the conventions; the themes; and every --sl-* token.
  • /kit/r/<Name>.json: one component in full, such as /kit/r/Button.json.
  • /kit/r/recipes/<slug>.json: one Lab recipe, with its React and SwiftUI source.
  • /.well-known/mcp/server.json: the server card.

A component file, shortened:

{
  "name": "Button",
  "group": "primitives",
  "exports": ["Button"],
  "import": "import { Button } from '@tuttn/slant'",
  "docs": { "slug": "button", "url": "https://tuttn.io/lab/slant/docs/button", "markdown": "…" },
  "props": {
    "Button": [
      { "name": "variant", "type": "'primary' | 'secondary' | 'ghost'", "default": "'secondary'", "description": "…" }
    ]
  },
  "usage": "import { Button } from '@tuttn/slant'\n\n<Button variant=\"primary\">…",
  "keyboard": [{ "keys": "Enter / Space", "does": "presses the focused button" }],
  "accessibility": ["…"],
  "recipes": ["buttons-and-badges", "dialog"],
  "classes": ["sl-btn"],
  "tokens": ["--sl-accent", "--sl-accent-text", "--sl-control-md", "…"],
  "source": { "path": "slant/react/src/primitives/Button.tsx", "url": "…", "code": "…" }
}

What to ask

Name Slant in the request, so the agent knows to use the tools rather than guess:

  • "Build a settings panel with Slant: a theme switch, a density control and a save button."
  • "Which Slant component shows upload progress, and what props does it take?"
  • "Make this form follow Slant's conventions: controlled values, tones and accessible labels."
  • "Add a dashboard in the Moon theme with three stat cards and a bar chart."
  • "Find the Lab recipe for the command bar, and its SwiftUI twin."

The server answers questions; it doesn't teach an agent how to write Slant before it starts. That is the Agent skills page. Most projects want both.