ECL MCP Server
A Model Context Protocol (MCP) server that provides comprehensive knowledge about the Europa Component Library (ECL) - the design system for the European Commission and websites managed by the Commission.
Overview
This MCP server gives you instant access to:
169 crawled ECL pages with full documentation
50+ ECL components with semantic search and metadata
520+ usage guidance items (do's, don'ts, best practices)
756 code examples with complexity ratings and language filtering
783 accessibility requirements (WCAG, ARIA, keyboard support)
30+ API documentation entries (attributes, props, methods, events)
1,366 component tags for advanced filtering
Complete setup guides for NPM and CDN installation
Design guidelines (typography, colors, spacing, iconography)
JavaScript initialization patterns with auto-init support
What Makes This Server Special
Unlike basic documentation servers, this MCP server provides:
Semantic Search - Multi-filter search across components, API, examples, and guidance
Structured Data - Rich metadata including complexity, JavaScript requirements, variants
Cross-References - Discover component relationships and dependencies
Usage Guidance - Know when to use (and when NOT to use) each component
Code Examples - Filter by language, complexity, completeness
Accessibility First - WCAG compliance data and implementation notes
Design Tokens - Access to design system tokens (colors, spacing, typography)
Code Generation - Generate customized components and interactive playgrounds
Validation Tools - Check WCAG compliance, code quality, and component conflicts
Intelligent Responses - Helpful suggestions when results are empty
Component Validation - Validate HTML/JS against ECL requirements with quality scoring
Accessibility Checking - Verify WCAG 2.1 compliance (Level A, AA, AAA)
Code Analysis - Detect components, find anti-patterns, check design token usage
Conflict Detection - Identify incompatible component combinations
Installation
Usage
Running the Server
For development with auto-restart:
Adding to MCP Client Configuration
Add this server to your MCP client configuration (e.g., Claude Desktop, Cline):
Available Tools
This server provides 28 tools organized in multiple categories:
3 Code Generation Tools (Phase 5) - Generate customized components and interactive playgrounds
4 Validation Tools (Phase 4) - Validate components, check accessibility, analyze code quality
14 Enhanced Search Tools (Phase 3) - Semantic search with rich metadata (prefix:
ecl_*)7 Legacy Tools (Phase 1) - Basic functionality for backward compatibility
For complete tool reference, see TOOLS.md
Quick Reference
Code Generation:
ecl_get_complete_example- Get runnable examples with all dependencies includedecl_generate_component- Generate customized components with variants, sizes, contentecl_create_playground- Create interactive multi-component testing environments
Validation & Diagnostics:
ecl_validate_component_usage- Validate HTML/JS against ECL requirements with quality scoringecl_check_accessibility- Verify WCAG 2.1 compliance (Level A, AA, AAA)ecl_analyze_ecl_code- Detect components, find anti-patterns, check design token usageecl_check_conflicts- Identify incompatible component combinations
Component Discovery:
ecl_search_components- Advanced multi-filter component searchecl_get_component_details- Complete component information
API Documentation:
ecl_search_api- Search attributes, props, methods, eventsecl_get_component_api- Get all API for a component
Code Examples:
ecl_search_code_examples- Search by language, complexity, completenessecl_get_example- Get complete code by IDecl_get_component_examples- Get all examples for a component
Usage Guidance:
ecl_get_component_guidance- Get do's, don'ts, best practicesecl_search_guidance- Search guidance across all components
Component Relationships:
ecl_find_related_components- Find dependencies and conflictsecl_get_dependency_graph- Build recursive dependency graph
Design Tokens:
ecl_search_design_tokens- Search by name or categoryecl_get_tokens_by_category- Get all tokens for categoryecl_get_token- Get specific token details
Legacy Tools (Phase 1)
1. get_component
Get detailed information about a specific ECL component.
Parameters:
component_name(string): Name of the component (e.g., "button", "card", "accordion")
Example:
2. search_components
Search for components by category, name, or keyword.
Parameters:
query(string): Search query (category, keyword, or name)
Example:
3. generate_component_code
Generate ready-to-use HTML code for a component.
Parameters:
component_name(string): Name of the componentvariant(string, optional): Component variant (e.g., "primary", "secondary")
Example:
4. get_setup_guide
Get complete setup guide for integrating ECL.
Parameters:
method(string): "npm", "cdn", or "complete"
Example:
5. list_components_by_category
List all components in a specific category.
Parameters:
category(string): One of: "forms", "navigation", "content", "media", "banners", "site-wide"
Example:
6. get_guidelines
Get ECL design guidelines.
Parameters:
guideline_type(string): One of: "typography", "colours", "colors", "images", "iconography", "spacing", "all"
Example:
7. get_javascript_init
Get JavaScript initialization code for components.
Parameters:
component_name(string, optional): Specific component name
Example:
Available Resources
The server provides several resources that can be accessed directly:
ecl://overview- Complete overview of ECLecl://installation- Installation and setup guideecl://components- List of all componentsecl://guidelines- Design guidelinesecl://setup-template- Ready-to-use HTML template
ECL Components Included
Forms
Checkbox, Datepicker, File Upload, Radio, Range, Rating Field, Search Form, Select, Text Area, Text Field
Navigation
Breadcrumb, Inpage Navigation, Links, Mega Menu, Menu, Navigation List, Pagination, Tabs
Content
Accordion, Blockquote, Button, Card, Category Filter, Content Item, Date Block, Expandable, Fact & Figures, File, Icon, Label, List, List with Illustration, Loading Indicator, Message, Modal, News Ticker, Notification, Popover, Separator, Social Media Follow, Social Media Share, Splash Page, Table, Tag, Timeline
Media
Featured Item, Gallery, Media Container
Banners
Banner, Carousel
Site-wide
Site Header, Page Header, Site Footer
Features
Core Capabilities
✅ Comprehensive Database: 169 crawled pages, 50+ components, 3,495 structured records
✅ Semantic Search: Multi-filter search across components, API, examples, and guidance
✅ Rich Metadata: Component complexity, JavaScript requirements, variants, status
✅ Code Examples: 756 examples with language, complexity, and completeness filtering
✅ Usage Guidance: 520+ do's, don'ts, best practices, and caveats
✅ Accessibility Data: 783 requirements with WCAG criteria and implementation notes
✅ API Documentation: 30+ entries covering attributes, props, methods, events
✅ Component Tags: 1,366 tags for advanced categorization
✅ Design Tokens: Token search by category (colors, spacing, typography)
✅ Relationships: Discover component dependencies and conflicts
✅ Performance: Query execution 0-50ms typical
✅ Standardized Responses: Consistent JSON format with metadata and suggestions
Database Schema
Example Use Cases
Finding and Understanding Components
Building with Components
Exploring Design Tokens
Accessibility Compliance
ECL Version
This server is based on ECL v4.11.1 (EU variant)
Resources
Official ECL Site: https://ec.europa.eu/component-library/
GitHub: https://github.com/ec-europa/europa-component-library
Playground: https://ec.europa.eu/component-library/playground/eu/
License
MIT
Important Notes
Always host SVG sprites on the same domain to avoid CORS issues
ECL uses Pikaday for datepicker - must be loaded separately
Include Cookie Consent Kit before going live
Recommended to host ECL resources locally rather than using CDN
Use
data-ecl-auto-initattribute for automatic component initializationCall
ECL.autoInit()after page load for auto-initialization
Support
For ECL-specific questions, refer to the official documentation at https://ec.europa.eu/component-library/
For issues with this MCP server, please check the code or create an issue in your repository.
This server cannot be installed