Mesh Design System MCP Server

Mesh Design System MCP Server

A Model Context Protocol server that provides AI assistants access to Mesh Design System components and design tokens, enabling AI-powered development tools to natively understand and utilize these UI components.

Category
Visit Server

README

Mesh Design System MCP Server

A Model Context Protocol (MCP) server that provides AI assistants access to the Mesh Design System components and design tokens.

Overview

This MCP server acts as a bridge between AI-powered development tools (like Cursor.ai) and the Mesh Design System, enabling AI assistants to natively understand and utilize Mesh components.

Features

  • Component Discovery: Lists all available UI components in the Mesh Design System
  • Component Details: Provides comprehensive information about specific components including props, usage guidelines, and code examples
  • Design Tokens: Access to core design tokens (colors, typography, spacing)
  • Caching: Intelligent caching system to optimize performance and reduce scraping overhead
  • Docker Support: Containerized deployment for easy scaling

MCP Tools

1. listComponents

Returns a list of all available components in the Mesh Design System.

Input: None Output: JSON array of component names

2. getComponentDetails

Fetches detailed information for a specific component.

Input:

  • componentName (string): Name of the component

Output: JSON object containing:

  • name: Component name
  • description: Component description and usage
  • props: Mapping of prop names to their types, descriptions, and defaults
  • codeExamples: Array of code snippets
  • storybookUrl: Direct link to Storybook page
  • designGuidance: Usage guidelines

3. getDesignTokens

Provides core design tokens.

Input:

  • tokenType (optional string): Type of tokens ("colors", "typography", "spacing", or "all")

Output: JSON object with design tokens

Installation

Local Development

  1. Clone the repository:
git clone <repository-url>
cd MeshMCP
  1. Install dependencies:
pip install -r requirements.txt
  1. Install Playwright browsers:
playwright install chromium
  1. Run the server:
python main.py

The server will be available at http://localhost:8000

Docker Deployment

  1. Build and run with Docker Compose:
docker-compose up --build
  1. Or build and run manually:
docker build -t mesh-mcp-server .
docker run -p 8000:8000 mesh-mcp-server

API Endpoints

  • GET /: Health check endpoint
  • GET /tools: Returns the MCP manifest with available tools
  • POST /tools/{tool_name}/invoke: Execute a specific MCP tool

Usage with AI Assistants

Cursor.ai Integration

  1. Configure Cursor.ai to connect to the MCP server endpoint: http://localhost:8000
  2. The AI assistant can now use the tools to:
    • Discover available Mesh components
    • Get detailed component information
    • Access design tokens for consistent styling

Example Queries

  • "What components are available in the Mesh Design System?"
  • "Show me the props for the Button component"
  • "What are the available color tokens?"
  • "Generate a form using Mesh components"

Configuration

Environment variables:

  • LOG_LEVEL: Logging level (default: INFO)
  • CACHE_TTL: Cache TTL in seconds (default: 3600 for components list, 7200 for details)

Caching

The server implements intelligent caching:

  • Components list: 1 hour TTL
  • Component details: 2 hours TTL
  • Design tokens: 2 hours TTL
  • Cache stored in cache_data/ directory
  • Automatic cleanup of expired entries

Error Handling

The server includes robust error handling for:

  • Component not found scenarios
  • Web scraping failures
  • Invalid input parameters
  • Network timeout issues

Development

Project Structure

MeshMCP/
├── main.py                 # FastAPI application entry point
├── models/
│   ├── __init__.py
│   └── mcp_models.py      # Pydantic models for MCP
├── scrapers/
│   ├── __init__.py
│   └── mesh_scraper.py    # Web scraping logic
├── cache/
│   ├── __init__.py
│   └── cache_manager.py   # Caching system
├── requirements.txt       # Python dependencies
├── Dockerfile            # Container configuration
├── docker-compose.yml    # Docker Compose setup
└── README.md            # This file

Testing

Test the server endpoints:

# Health check
curl http://localhost:8000/

# Get available tools
curl http://localhost:8000/tools

# List components
curl -X POST http://localhost:8000/tools/listComponents/invoke \
  -H "Content-Type: application/json" \
  -d '{"arguments": {}}'

# Get component details
curl -X POST http://localhost:8000/tools/getComponentDetails/invoke \
  -H "Content-Type: application/json" \
  -d '{"arguments": {"componentName": "Button"}}'

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured