# Quick Start Guide

Get the EUI Compodoc MCP Server running in 5 minutes.

## Prerequisites

- Node.js 18 or higher
- An MCP client (Kiro CLI, Claude Desktop, etc.)

## Step 1: Get EUI Documentation URL

The EUI library documentation is available at:

```
https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json
```

You can use this URL directly (recommended) or download it locally:

```bash
# Optional: Download locally
curl -o documentation.json https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json
```

## Step 2: Configure Your MCP Client

### For Kiro CLI

Add to `.kiro/settings/mcp.json`:

```json
{
  "mcpServers": {
    "eui-compodoc": {
      "command": "npx",
      "args": [
        "-y",
        "@eui/mcp",
        "--doc-path",
        "https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json"
      ]
    }
  }
}
```

### For Claude Desktop

Add to Claude Desktop configuration:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "eui-compodoc": {
      "command": "npx",
      "args": [
        "-y",
        "@eui/mcp",
        "--doc-path",
        "https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json"
      ]
    }
  }
}
```

## Step 3: Restart Your MCP Client

- **Kiro CLI**: Restart your terminal session
- **Claude Desktop**: Quit and reopen the application

## Step 4: Test the Integration

Ask your AI assistant:

> "List 5 components from the EUI library"

You should see component names and descriptions.

## Alternative: Local Setup

If you prefer to run from source or use a local documentation file:

### 1. Clone and Build

```bash
git clone <repository-url>
cd eui-compodoc-mcp
npm install
npm run build
```

### 2. Create config.json

```json
{
  "documentation": {
    "path": "https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json"
  }
}
```

Or for local file:

```json
{
  "documentation": {
    "path": "/absolute/path/to/documentation.json"
  }
}
```

### 3. Update MCP Configuration

```json
{
  "mcpServers": {
    "eui-compodoc": {
      "command": "node",
      "args": [
        "/absolute/path/to/eui-compodoc-mcp/dist/main.js",
        "--config",
        "/absolute/path/to/config.json"
      ]
    }
  }
}
```

## Available Tools

Once configured, you can:

- **list-components** - List all components, directives, pipes, services
- **get-component-docs** - Get detailed documentation for a component
- **search-components** - Search components by keyword
- **get-component-inputs** - Get input properties
- **get-component-outputs** - Get output events
- **get-component-examples** - Get usage examples
- **get-library-version** - Get current library version
- **list-deprecated** - List deprecated items
- **get-deprecation-info** - Get deprecation details
- **get-eui-cli-guide** - Get getting started guide for EUI CLI
- **get-eui-cli-instructions** - Get complete EUI CLI instructions and options

## Example Questions

Try asking:

- "What components are available for forms?"
- "Show me the ButtonComponent documentation"
- "What inputs does ModalComponent accept?"
- "List all deprecated components"
- "Search for table components"
- "How do I create a new EUI application?"
- "Show me all EUI CLI commands and options"

## Troubleshooting

### Server won't start

```bash
# Test manually
npx -y @eui/mcp --doc-path https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json
```

### Can't reach documentation URL

Check your network connection and firewall settings. If the URL is blocked, download the file locally and use a file path instead.

### MCP client doesn't see the tools

1. Verify the configuration file syntax is valid JSON
2. Restart your MCP client completely
3. Check client logs for connection errors

## Advanced Configuration

### Enable File Watching (Local Files Only)

```json
{
  "documentation": {
    "path": "/path/to/documentation.json",
    "watchForChanges": true,
    "reloadDebounce": 1000
  }
}
```

### Enable Debug Logging

```json
{
  "documentation": {
    "path": "https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json"
  },
  "logging": {
    "level": "debug"
  }
}
```

### HTTP Polling for Remote URLs

```json
{
  "documentation": {
    "path": "https://euidev.ecdevops.eu/eui-docs-eui-21.x/json/documentation.json",
    "pollInterval": 300000
  }
}
```

## Next Steps

- Read the [full documentation](./README.md) for all features
- Explore all available tools
- Customize configuration for your workflow

Happy coding! 🚀
