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@latestYou can also start it from the ViewLint CLI:
viewlint --mcpInstall ViewLint in Your MCP Client
All of these use the same local stdio server command:
npx -y @viewlint/mcp@latestPick where you are installing it for detailed instructions:
Tools
lint
Lints one or more URLs with ViewLint.
Required input:
urls:string[]
Optional input:
configFile:stringpath to aviewlint.config.*fileview: named view from configoptions: named option layers from configscopes: named scopes from configselectors: ad-hoc CSS selectors used as scope rootsquiet: 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):stringpath if you want to explicitly specify one
Use this tool first when you are unsure which config will be used for linting.