---
title: UDS MCP Server
---

# UDS MCP Server

## Overview

The UDS MCP Server provides access to the TELUS Universal Design System component documentation through a pre-packaged data archive. This enables AI assistants to access UDS component information, including props, tokens, usage examples, and implementation guidelines without requiring Git repository access.

## Features

- **Packaged Documentation**: Includes pre-processed UDS component documentation in a compact archive
- **Component Documentation Access**: Provides access to 700+ UDS component documentation files
- **Props and Tokens Processing**: Includes converted React PropTypes and design tokens in readable Markdown tables
- **Simplified Deployment**: No Git repository access required, works offline
- **Optimized Performance**: Fast startup with minimal dependencies
- **MDX Processing**: Pre-processed MDX files with custom components converted to standard Markdown

## Architecture

### Core Components

- **Server (src/index.ts)**: Main MCP server implementation using the MCP SDK
- **Setup (src/setup.ts)**: Data extraction and initialization logic
- **Resources (src/resources.ts)**: Resource generation and caching system
- **Data Archive (src/data.zip)**: Compressed archive containing pre-processed UDS documentation

### Resource Management

The server provides resources through the MCP protocol:

#### Component Documentation

- **URI Format**: `file://[path-to-component].mdx`
- **Resource Name**: UDS [ComponentName] component
- **MIME Type**: text/markdown
- **Content**: Pre-processed MDX documentation with converted tables

#### General Documentation

- **URI Format**: `file://[path-to-doc].md`
- **Resource Name**: UDS [DocName] documentation
- **MIME Type**: text/markdown
- **Content**: Markdown documentation files

#### Palette Files

- **URI Format**: `file://[path-to-palette].js`
- **Resource Name**: UDS [PaletteName] palette
- **MIME Type**: text/markdown
- **Content**: JavaScript files containing token values and icon lists

#### Theme Files

- **URI Format**: `file://[path-to-theme].json`
- **Resource Name**: UDS [ThemeName] theme
- **MIME Type**: text/markdown
- **Content**: JSON files containing tokens and rules for components

## Installation

### Prerequisites

- Node.js 22+

### For Cline / Claude Desktop Users

1. Install and run globally via npx:

```bash
npx -y @telus/mcp-uds
```

2. Add to your MCP settings:

#### For Cline

Located at `/Users/[username]/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "uds": {
      "command": "npx",
      "args": ["-y", "@telus/mcp-uds"],
      "disabled": false
    }
  }
}
```

#### For Claude Desktop

Located at `/Users/[username]/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "uds": {
      "command": "npx",
      "args": ["-y", "@telus/mcp-uds"]
    }
  }
}
```

### For Development

1. Clone the repository:

```bash
git clone https://github.com/telus/mcp.git
cd mcp/packages/mcp-uds
```

2. Install dependencies:

```bash
pnpm install
```

3. Build the project:

```bash
pnpm build
```

4. Run locally:

```bash
pnpm start
```

## Usage

### Basic Usage

Once configured, the MCP server provides access to UDS component documentation through your AI assistant. You can:

- Ask questions about specific UDS components
- Get implementation examples and best practices
- Access component props and available tokens
- Understand component variants and usage patterns

### Example Queries

- "Show me the props for the UDS Button component"
- "How do I implement a UDS Card component with UDS?"
- "What tokens are available for the UDS TextInput component?"
- "Give me an example of using the UDS Modal component"

### Demo

#### Prerequisites

Before you can use the UDS MCP Server on a project with UDS installed, you'll need to complete several setup steps. In this tutorial, we'll use the Web App Starter Kit to generate a project with UDS pre-installed.

**Important:** Ensure your system's host entries are configured correctly before proceeding. You can find a comprehensive guide [here](https://github.com/telus/platform-web/blob/main/docs/HOSTS.md).

##### Node Version Management

We highly recommend using a Node version management tool such as [Nodenv](https://github.com/nodenv/nodenv) or [NVM](https://github.com/nvm-sh/nvm) to manage your [Node.js](https://nodejs.org/en/about/releases/) versions effectively.

##### Development Environment Setup

Ensure you have a standard TELUS local development environment configured with:

- [Node.js LTS](https://nodejs.org/en/about/releases/) or higher
- [NPM LTS](https://github.com/npm/cli/releases)
- GitHub access with SSH authentication to the TELUS organization

##### Generate a GitHub Personal Access Token

You'll need to generate a Personal Access Token (PAT) for GitHub authentication to access all resources included in the Web App Starter Kit.

**To generate a GitHub Personal Access Token:**

1. Navigate to the [Personal Access Token page in GitHub](https://github.com/settings/tokens/new?scopes=repo,read:org,read:packages&description=UDS%20MCP%20Server%20Tutorial). Alternatively, click your profile photo → **Settings** → **Developer settings** → **Personal access tokens**. The token requires "repo", "read:packages", and "read:org" scopes.
2. Click **Generate token**.
3. Copy and securely store the token (you won't be able to view it again after this step).
4. Click **Configure SSO** next to the token, then **Authorize** next to the "telus" organization. Without SSO enabled, you'll encounter authentication errors when using the Web App Starter Kit.

#### Configuration Setup

##### Create an `.npmrc` File

###### GitHub Registry Configuration

Configure your project's `.npmrc` file by running the following command with your GitHub PAT:

```bash
npm config set //npm.pkg.github.com/:_authToken=<GITHUB_PAT> @telus:registry=https://npm.pkg.github.com
```

**Additional Resources:**

- [npm-config documentation](https://docs.npmjs.com/cli/v8/commands/npm-config)
- [GitHub packages setup guide](https://github.com/telus/reference-architecture/blob/main/development/github-packages.md)

#### Creating Your Application

##### Using the Web App Starter Kit

The most efficient way to create an application is using the [`create-web-app`](https://github.com/telus/platform-web/tree/main/packages/create-web-app#create-web-app) CLI tool.

This CLI tool allows you to quickly build a new Next.js application with pre-configured settings. The creation wizard combines the [core template](https://github.com/telus/platform-web/tree/main/templates/js/core) with your selected [extensions](https://github.com/telus/platform-web/tree/main/extensions/js).

###### Creating a New Web App with NPM

```bash
npx @telus/create-web-app@latest
```

**Recommended Configuration:**

![Configuration Screenshot](/img/mcp/step1.png)

After the package completes building your project:

1. Navigate to the project folder
2. Open it in your preferred code editor

![Project Setup](/img/mcp/step2.png)

#### Cline Extension Setup

##### Installation and Configuration

1. **Install the Cline Extension**

   Download and install the Cline extension from the [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev).

   ![Cline Installation](/img/mcp/step3.png)

2. **Configure Cline to Use FueliX**

   Open Cline settings and configure it to use FueliX:

   ![FueliX Configuration](/img/mcp/step4.png)

   Generate your API key from the [FueliX Developer Portal](https://dev.fuelix.ai/en).

3. **Install the UDS MCP Server**

   Run the following command in your terminal:

   ```bash
   npx -y @telus/mcp-uds@latest
   ```

   ![UDS MCP Installation](/img/mcp/step5.png)

4. **Configure the Cline Extension for UDS MCP Server**

   a. Open the Cline extension and click the "MCP servers" button:

   ![MCP Servers Button](/img/mcp/step6.png)

   b. Click "Configure MCP Servers":

   ![Configure MCP Servers](/img/mcp/step7.png)

   c. Add the following configuration to the `cline_mcp_settings.json` file:

   ```json
   {
     "mcpServers": {
       "uds": {
         "command": "npx",
         "args": ["-y", "@telus/mcp-uds"],
         "disabled": false
       }
     }
   }
   ```

   ![MCP Configuration](/img/mcp/step8.png)

   **Success Indicator:** A green circle next to the UDS server indicates it's running correctly.

#### Using the UDS MCP Server

##### Starting Your Development Environment

1. **Launch the Development Server**

   ```bash
   npm run dev
   ```

   ![Development Server](/img/mcp/step9.png)

2. **Verify Your Application**

   Open [http://localhost:3000](http://localhost:3000) in your browser to confirm the Next.js app is running properly.

   ![Application Running](/img/mcp/step10.png)

##### Building Components with UDS

1. **Access Your Project Entry Point**

   Open your project's entry point (typically `src/components/Home/index.js`):

   ![Entry Point](/img/mcp/step11.png)

2. **Component Building Objective**

   We'll build components using the MCP server and UDS components based on this design:

   ![Component Design](/img/mcp/step12.png)

##### Component Development Process

###### Building the First Component

1. **Select the First Component**

   ![First Component](/img/mcp/step13.png)

2. **Use This Prompt:**

   ```
   In the index.js file, build a component that resembles the provided screenshot. The main container should be a UDS Box component utilizing the light variant.
   To arrange the inner components, employ the UDS FlexGrid component with horizontal alignment set to center.
   For the title, use the UDS Typography component with the variant size H3. Implement the UDS Link component with the subtle variant for the link. For the button,
   utilize the UDS Button component with the high priority variant. To display the image, use the UDS Image component; the image link is provided here: <image-link>.
   You can use UDS Spacer components to establish appropriate distances between elements. Access the UDS documentation via the UDS MCP server for reference. Refrain from using custom components, tokens, or wrappers.
   ```

   **Expected Result:**

   ![First Component Result](/img/mcp/step14.png)

###### Building the Second Component

1. **Select the Second Component**

   ![Second Component](/img/mcp/step15.png)

2. **Use This Prompt:**

   ```
   In the index.js file, add a new component that resembles the provided screenshot. The main container should be a UDS Box component utilizing the light variant.
   To arrange the inner components, employ the UDS StackView component with direction set to row. For the title, use the UDS Typography component with the variant size H3. Implement the UDS Link component with the subtle variant for the link.
   For the button, utilize the UDS Button component with the high priority variant. To display the image, use the UDS Image component; the image link is provided here: <image-link>.
   You can use UDS Spacer components to establish appropriate distances between elements. Access the UDS documentation via the UDS MCP server for reference. Refrain from using custom components, tokens, or wrappers.
   ```

   **Expected Result:**

   ![Second Component Result](/img/mcp/step16.png)

###### Building the Third Component

1. **Select the Third Component**

   ![Third Component](/img/mcp/step17.png)

2. **Use This Prompt:**

   ```
   In the index.js file, add a new component that resembles the provided screenshot. The main container should be a UDS Box component utilizing the light variant.
   To arrange the inner components, employ the UDS StackView component with direction set to row. For the offer text, you can use the UDS Ribbon with the variant purpose offer.
   For the title, use the UDS Typography component with the variant size H3. Implement the UDS Link component with the subtle variant for the link.
   For the button, utilize the UDS Button component with the high-priority variant. To display the image, use the UDS Image component; the image link is provided here: <image-link>.
   You can use UDS Spacer components to establish appropriate distances between elements. Access the UDS documentation via the UDS MCP server for reference. Refrain from using custom components, tokens, or wrappers.
   ```

   **Expected Result:**

   ![Third Component Result](/img/mcp/step18.png)

##### Final Component Arrangement

**Arrange All Components Using This Prompt:**

```
Using the provided screenshot as a guide, arrange the three UDS Box components using the UDS StackWrap component. Use the direction "row" for the main StackWrap and group the second and third boxes in a second StackWrap.
Access the UDS documentation via the UDS MCP server for reference. Refrain from using custom components, tokens, or wrappers. Do not modify the existing components; only arrange them using the UDS StackWrap component.
```

**Final Result:**

![Final Result](/img/mcp/step19.png)

## Available Resources

The server provides access to a comprehensive set of UDS resources:

### Component Documentation

Documentation for all UDS components, including:

- **Form Components**: Button, TextInput, Select, Checkbox, Radio, etc.
- **Layout Components**: Box, FlexGrid, Card, Modal, etc.
- **Navigation Components**: Breadcrumbs, Tabs, SideNav, etc.
- **Data Display**: Table, DataGrid, Badge, Status, etc.
- **Feedback Components**: Notification, Toast, Callout, etc.

### General Documentation

UDS guidelines, best practices, and reference materials

### Palette Files

Token values and available icons for different brands and platforms:

- Telus (Web and React Native)
- Koodo (Web and React Native)
- Public Mobile (Web and React Native)

### Theme Files

Theme definitions for different brands:

- Telus
- Koodo
- Public Mobile

## Configuration

### Environment Variables

- **NODE_ENV**: Environment mode (affects logging verbosity)
- **GITHUB_TOKEN**: GitHub Personal Access Token (required for GitHub Project tools)
- **GITHUB_ORG**: GitHub organization name (defaults to "telus")
- **GITHUB_PROJECT_ID**: GitHub Project number (defaults to 159)

## Development

### Project Structure

```
src/
├── index.ts           # Main MCP server implementation with resource handlers
├── setup.ts           # Data extraction from data.zip archive
├── resources.ts       # Resource generation from extracted MDX files
├── config.ts          # Path configuration and constants
├── data.zip           # Compressed UDS documentation archive
└── types/            # TypeScript type definitions (directory structure)
```

### Build Process

The build process:

1. Compiles TypeScript to JavaScript
2. Copies the data.zip archive to the dist directory
3. Makes the main script executable
4. Prepares the package for distribution

### Scripts

```bash
# Build the project
pnpm build

# Start the server
pnpm start

# Prepare for publishing
pnpm prepare

# Run in development mode
node dist/index.js
```

### Data Management

The server automatically:

1. Extracts the UDS documentation from data.zip using AdmZip on first run
2. Loads pre-processed MDX files from the extracted data directory
3. Parses MDX content to extract component titles and documentation
4. Loads additional resources including documentation files, palette files, and theme files
5. Caches resources for efficient access and reduced processing overhead

### MDX Processing

The pre-processed MDX files in the data.zip archive:

- Already have `<PropsTable />` components converted to Markdown tables
- Already have `<TokensTable />` components converted to token documentation
- Include extracted React PropTypes in readable formats
- Contain processed design tokens from the UDS token system

This pre-processing eliminates the need for runtime conversion, improving performance and reducing dependencies.

## Troubleshooting

### Common Issues

#### Data Extraction Issues

- Ensure the data.zip file is present in the dist directory
- Check for sufficient disk space
- Verify file permissions

#### Resource Loading Issues

- Check the server logs for detailed error messages
- Verify the data extraction was successful
- Try restarting the MCP server

### Debug Mode

Enable verbose logging by checking the console output when the server starts. The server logs detailed information about:

- Data extraction process
- Resource generation
- Server initialization

### Manual Data Reset

If you encounter persistent issues, you can manually reset the extracted data:

```bash
# Remove the extracted data directory
rm -rf dist/data

# Restart the server to trigger a fresh extraction
pnpm start
```

## API Reference

### Resources

The server exposes resources through the MCP protocol:

#### Resource Structure

```typescript
interface Resource {
  uri: string // file://[path-to-resource]
  name: string // "UDS [ResourceName] component|documentation|palette|theme"
  description: string // Description of the resource
  mimeType: string // "text/markdown"
  text: string // Resource content
}
```

#### Resource Discovery

Resources are automatically discovered by:

1. Scanning the extracted directories:
   - `components/` - For component documentation (.mdx files)
   - `docs/` - For general documentation (.md files)
   - `palettes/` - For palette definitions (.js files)
   - `themes/` - For theme definitions (.json files)
2. Processing all files in these directories
3. Extracting titles from frontmatter or headings (with fallback to filename)
4. Creating resource objects with file URIs and extracted metadata

## Tools

The server provides several tools for interacting with the UDS GitHub Project:

### UDS GitHub Project Tools

These tools allow you to retrieve issues and pull requests from the UDS GitHub Project board:

#### get_uds_project_column_issues

- **Description**: Get all UDS issues and pull requests from a specific column in the UDS GitHub Project v2
- **Required Parameters**: column_name (string)
- **Optional Parameters**: owner (string, defaults to "telus"), project_number (number, defaults to 159)
- **Available Columns**:
  - "🖌️ Ready for design"
  - "🔖 Ready for dev"
  - "🏗 In Progress"
  - "🚫 Blocked"
  - "👀 Review"
  - "🚀 To be Released"
  - "✅ Done"

#### Specific Column Tools

- **get_uds_ready_for_design_issues**: Get issues from '🖌️ Ready for design' column
- **get_uds_ready_for_dev_issues**: Get issues from '🔖 Ready for dev' column
- **get_uds_in_progress_issues**: Get issues from '🏗 In Progress' column
- **get_uds_blocked_issues**: Get issues from '🚫 Blocked' column
- **get_uds_review_issues**: Get issues from '👀 Review' column
- **get_uds_to_be_released_issues**: Get issues from '🚀 To be Released' column
- **get_uds_done_issues**: Get issues from '✅ Done' column
- **get_uds_all_project_issues**: Get all issues from all columns

All specific column tools have optional parameters: owner (defaults to "telus"), project_number (defaults to 159)

### Tool Usage Examples

```javascript
// Get issues from a specific column
await callTool('get_uds_project_column_issues', {
  column_name: '🔖 Ready for dev'
})

// Get all ready for development issues (using defaults)
await callTool('get_uds_ready_for_dev_issues', {})

// Get blocked issues from a different project
await callTool('get_uds_blocked_issues', {
  owner: 'other-org',
  project_number: 123
})

// Get comprehensive view of all issues
await callTool('get_uds_all_project_issues', {})
```

### Tool Requirements

To use the UDS GitHub Project tools, you need:

#### GitHub Personal Access Token

1. Create a GitHub Personal Access Token with the following permissions:
   - **repo** (Full control of private repositories) - if accessing private repositories
   - **public_repo** (Access public repositories) - for public repositories
   - **project** (Full control of projects) - required for GitHub Projects v2 access
2. Set the token as an environment variable: `GITHUB_TOKEN=your_token_here`

#### GitHub Project Access

- The token must have access to the GitHub organization/repository containing the project
- For TELUS UDS project (default), ensure your GitHub account has access to the TELUS organization
- The project must be a GitHub Projects v2 (not the legacy Projects v1)

#### Environment Variables (Optional)

- **GITHUB_ORG**: GitHub organization name (defaults to "telus")
- **GITHUB_PROJECT_ID**: GitHub Project number (defaults to 159)
- **GITHUB_TOKEN**: GitHub Personal Access Token (required)

### Setting Up GitHub Access

#### 1. Create a Personal Access Token

1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
2. Click "Generate new token (classic)"
3. Select the required scopes: repo, project
4. Copy the generated token

#### 2. Configure Environment Variables

```bash
export GITHUB_TOKEN="your_github_token_here"
export GITHUB_ORG="telus"  # Optional, defaults to "telus"
export GITHUB_PROJECT_ID="159"  # Optional, defaults to 159
```

#### 3. Add to MCP Configuration

```json
{
  "mcpServers": {
    "uds": {
      "command": "npx",
      "args": ["-y", "@telus/mcp-uds"],
      "env": {
        "GITHUB_TOKEN": "your_github_token_here",
        "GITHUB_ORG": "telus",
        "GITHUB_PROJECT_ID": "159"
      }
    }
  }
}
```

### Tool Response Format

All GitHub Project tools return structured JSON data:

```typescript
interface ToolResponse {
  column: {
    name: string
    id: string
  }
  issues: Array<{
    id: string
    title: string
    url: string
    number: number
    state: string
    author: {
      login: string
      url: string
    }
    createdAt: string
    updatedAt: string
    labels: Array<{
      name: string
      color: string
    }>
    assignees: Array<{
      login: string
      url: string
    }>
    repository: {
      name: string
      url: string
    }
  }>
  totalCount: number
}
```

### Future Tool Additions

Future tool additions may include:

- Component code generation tools
- Token validation tools
- Design system compliance checkers

## Contributing

### Development Setup

1. Clone the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request

### Code Style

- Use TypeScript for type safety
- Follow the existing code formatting
- Add JSDoc comments for public functions
- Include error handling for all operations

### Testing

Currently, the project uses manual testing. Future improvements may include:

- Unit tests for core functionality
- Integration tests for data extraction
- End-to-end tests for MCP protocol compliance
