cursorrules

A set of Cursor rules for projects using UIForge MCP. It covers environment setup, TypeScript and HTML practices, testing, UI component libraries, Figma integration, code quality, and MCP server development.

In plain words
What is it for?
Use it when developing UIForge-based TypeScript projects, integrating Figma or component libraries, and maintaining or testing MCP servers.
Why use it?
It gives the agent project rules for handling configuration, interfaces, tests, accessibility, design imports, errors, and debugging consistently.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/forge-space/ui-mcp/cursorrules
Clone the repo
git clone --depth 1 https://github.com/Forge-Space/ui-mcp

Made for: Cursor.

Per session 306 This file is loaded in full into every session.
When invoked 306 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00306 $0.00306
Opus 5 $0.00153 $0.00153
Sonnet 5 $0.00061 $0.00061
Haiku 4.5 $0.00031 $0.00031

Measured yesterday against content hash 89ae19d8f31c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursorrules · 50 lines

What it actually says

UIForge MCP Cursor Rules

Environment Setup

  • Always load environment variables from .env file
  • Set FIGMA_ACCESS_TOKEN for Figma integration
  • Use NODE_ENV=development for local development

Development Guidelines

  • Follow TypeScript strict mode
  • Use semantic HTML5 elements
  • Implement proper error handling
  • Write comprehensive tests
  • Follow MCP server patterns

Component Library Integration

  • Test component library integration thoroughly
  • Verify shadcn/ui, Radix UI, Headless UI, Material UI imports
  • Check responsive design on multiple viewports
  • Ensure accessibility compliance (WCAG 2.1)

Figma Integration

  • Always validate FIGMA_ACCESS_TOKEN before use
  • Handle Figma API rate limits gracefully
  • Test bidirectional token flow
  • Verify design token mapping

Code Quality

  • Run ESLint and Prettier before commits
  • Maintain test coverage above 80%
  • Use proper TypeScript types
  • Follow established naming conventions

MCP Server Development

  • Use proper error handling for all tools
  • Implement input validation with Zod schemas
  • Provide helpful error messages
  • Test all tool edge cases

Debugging

  • Use LOG_LEVEL=debug for troubleshooting
  • Check environment variable loading
  • Test with different Node.js versions
  • Verify MCP tool responses

Security

  • Never commit FIGMA_ACCESS_TOKEN to version control
  • Use environment variables for sensitive data
  • Validate all external API calls
  • Implement proper error boundaries
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 50 lines · 306 tokens per session scan A 89ae19d8f31c

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Forge-Space/ui-mcp (2 stars, last pushed 4mo ago), licensed MIT. It adds 306 tokens to every session, about $0.0015 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.