ViewLint Logo

ViewLint

MCP Server Setup

Help Agents write UI with ViewLint

The ViewLint MCP server lets an AI agent run ViewLint as a tool.

It's useful when you want the agent to get fast feedback from the rendered page while it's building UI. Instead of guessing, the agent can lint a URL and use the results to guide its next change.

If you are new to MCP, see their website for more information.

Run the server

The stdio MCP server is published as @viewlint/mcp.

npx -y @viewlint/mcp@latest

You can also start it from the ViewLint CLI:

viewlint --mcp

Install ViewLint in Your MCP Client

All of these use the same local stdio server command:

npx -y @viewlint/mcp@latest

Pick where you are installing it for detailed instructions:

Tools

lint

Lints one or more URLs with ViewLint.

Required input:

  • urls: string[]

Optional input:

  • configFile: string path to a viewlint.config.* file
  • view: named view from config
  • options: named option layers from config
  • scopes: named scopes from config
  • selectors: ad-hoc CSS selectors used as scope roots
  • quiet: if true, return only error-level messages

When configFile is omitted, ViewLint uses config discovery starting from the server’s working directory.

get-config

Discovers and returns the ViewLint config path from the server’s working directory upward.

Input:

  • configFile (Optional): string path if you want to explicitly specify one

Use this tool first when you are unsure which config will be used for linting.

On this page