EOX

Elements MCP Server

Model Context Protocol for Web Components

Active

About this Server

This server implements the Model Context Protocol (MCP), providing a bridge between LLMs (like Claude, GPT, etc.) and the EOxElements component library.

Through rich metadata, descriptions, real-world stories, and usage code snippets, coding agents can effortlessly explore, instantiate, configure, and troubleshoot EOxElements custom elements in any web environment.

Registry Overview

16
Custom Elements
165
Story Snippets
Manifest mode: Local File/Loaded

Connect EOxElements to your Coding Agent

To use these tools with Claude Desktop, add the following configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "eox-elements": {
      "command": "node",
      "args": [
        "/absolute/path/to/EOxElements/mcp-server/index.js",
        "--manifest",
        "/absolute/path/to/EOxElements/custom-elements.json",
        "--snippets",
        "/absolute/path/to/EOxElements/story-snippets.json"
      ]
    }
  }
}

Supported MCP Tools

list_elements

List all available EOxElements custom elements.

get_element_details

Get the full custom-elements-manifest details for a specific tag name.

get_element_stories

Get stories/snippets (descriptions and functional code) for an element.

get_element_attributes

Get the HTML attributes supported by a specific element.

get_element_properties

Get reactive JS properties (and their type JSDocs) for an element.

get_element_events

Get all custom events dispatched by a specific element.

Available Components (16)

<eox-chart>

EOxChart

Chart component based on [Vega-Lite](https://vega.github.io/vega-lite/)/[Vega-Embed](https://github.com/vega/vega-embed). Pass a valid Vega spec as `spec` property or attribute in order to render a chart. Optionally for transfer of chart definitions with both single and double quote as attribute, use the `spec` as base64 encoded string. The `eox-chart` provides some default `spec` settings (merged with the provided `spec` property/attribute) and helper functionalities on top of Vega-Lite. Default `spec` settings (see the file `src/enums/default-spec.js`): - `width`: "container" (make the chart width responsive to the parent) - `height`: "container" (make the chart height responsive to the parent) - `autosize`: "fit" (automatically adjust the layout in an attempt to force the total visualization size to fit within the given width, height and padding values) - `resize`: true (autosize layout is re-calculated on every view update) - `padding`: 16 (the padding in pixels to add around the visualization) These default `spec` settings can be overwritten by setting them to a differnt value in the `spec` property/attribute passed to `eox-chart`. Also, there are default Vega-Embed options (see the file `src/enums/default-opt.js`), which can also be overwritten in the passed `opt` property/attribute. Helper functionalities: The `eox-chart` automatically emits mouse/pointer events from the Vega-Lite chart. See below for the emitted events. For working with base64 encoded `spec` or `dataValues` attributes, `eox-chart` exports two helper methods: `base64EncodeSpec` (encoding), `parseSpec` (decoding).

5 attributes 2 events
<eox-drawtools>

EOxDrawTools

The `eox-drawtools` element provides a comprehensive set of drawing, editing, selection, and import tools for vector features on an `eox-map`. It supports drawing multiple feature types (Polygon, Box, Point, Circle, LineString), continuous drawing, feature modification, selection from existing layers, and import/export in various formats (GeoJSON, WKT, native OL feature). Key features: - Draw polygons, boxes, points, circles, and lines on the map - Draw multiple features at once (set `multiple-features`) - Continuous drawing mode (set `continuous`) - Modify drawn features (set `allow-modify`) - Select features from a specified layer (`layer-id`) - Display a list of drawn/selected features (`show-list`) - Edit features as GeoJSON in a text editor (`show-editor`) - Import features via drag-and-drop or file upload (`import-features`) - Emit drawn features in different formats (`format`: `feature`, `geojson`, `wkt`) - Emit features in a specified projection (`projection`) - Customizable feature styles (`featureStyles`) - Unstyled and no-shadow variants for easy integration Usage examples and visual demos are available in Storybook stories, including scenarios for multi-feature drawing, feature modification, selection, import/export, continuous drawing, format and projection control, and style customization. ## Methods - `startDrawing`: Triggers starting the drawing interaction on the map. - `stopDrawing`: Triggers stopping the drawing interaction on the map (same as pressing the Escape key). - `discardDrawing`: Triggers discarding/stopping the drawing interaction and deleting the drawn shapes. - `removeFeature`: Removes a feature from the drawn features. - `removeFeatureByIndex`: Removes a feature from the drawn features by its index. Usage: `document.querySelector("eox-drawtools").startDrawing();`

17 attributes 1 events
<eox-feedback>

EOxFeedback

The `eox-feedback` element provides a modal dialog for collecting user feedback. It supports screenshot capture, customizable endpoint, and flexible styling. The feedback modal (``) can be included in the DOM directly or via a floating button (``), which can be positioned in any corner of the viewport. On submit, the element sends a `POST` request with `FormData` to the configured `endpoint`. The payload includes the feedback message (or custom form fields when using a `schema`), the current page URL, the browser's user agent, screen resolution and optionally a screenshot file. This makes it straightforward to connect to any backend — for example a service that creates issues in a Git platform (GitLab, GitHub, …), sends notifications, or stores feedback in a database. The backend only needs to accept a `multipart/form-data` POST request, extract the fields and the optional file attachment, and then forward them to whatever system you use for tracking or processing feedback. Because all authentication and API tokens live on the server side, the browser never sees sensitive credentials. Typical backend responsibilities include input sanitization, CORS configuration to restrict which origins may submit feedback, and mapping the received fields into the format expected by the target system (e.g. composing an issue title and body, or building an email).

2 attributes 2 events
<eox-geosearch>

EOxGeoSearch

`eox-geosearch` provides a flexible geocoding and location search interface using the OpenCage API. It can be used standalone or integrated with `eox-map` for interactive map zooming and result visualization. Main features: - Search for locations using OpenCage API - Integrate with `eox-map` for zooming to results - Customizable loader SVG - Geographic extent limiting - Tooltip support - Additional OpenCage API parameters via args - Button mode for compact UI - Flexible alignment and direction options

15 attributes 1 events
<eox-itemfilter>

EOxItemFilter

The `eox-itemfilter` element provides a comprehensive item filtering system for lists of items with flexible filter types, result aggregation, and customizable display modes. Features: - Supports `text`, `select`, `multiselect`, `range` (including date), and `spatial` filters - Aggregates results by a property key (e.g. themes) - Inline mode for compact UI - Pre-set filter state via `state` in `filterProperties` property/attribute - Nested property filtering using dot notation - External search API endpoint support via `externalFilter` property - Auto-spreading of single-item aggregations to root level - Card display mode for results (`result-type="cards"`) - Secondary result action button with custom icon and event handler (`click:result-action`) - Custom result sorting via `resultSorting` property/attribute - Customizable layout and styling via CSS variables Usage examples and visual demos are available in Storybook stories, including scenarios for inline mode, external filtering, nested properties, card display, CSS variable customization, and result actions.

23 attributes 5 events
<eox-jsonform>

EOxJSONForm

`eox-jsonform` is a flexible and extensible web component for rendering dynamic forms based on JSON schema definitions. It is based on [JSON Editor](https://github.com/json-editor/json-editor) and extends its functionality to support various advanced features. Also check out the [JSON Editor documentation](https://github.com/json-editor/json-editor?tab=readme-ov-file#options) for more details on the available options and configurations. Features: - Renders forms from JSON schema, supporting complex nested structures and custom validation. - All properties and event handlers are passed via args, enabling dynamic configuration and integration. Properties can also be passed as stringified JSON attributes (e.g. `schema`, `value`, `options`). - Supports custom editor interfaces for advanced input types and external editor integration (e.g., Ace, Markdown, spatial drawtools). - Handles spatial inputs (bounding box, polygons, points, lines) and outputs in various formats (GeoJSON, WKT). - Allows toggling and opt-in/optional properties, with dynamic visibility and value updates. - Can load schema and values from external URLs, supporting async loading and ready events. - Integrates with `eox-map` for spatial feature selection when required. - Supports unstyled rendering for custom design integration. See the stories for usage examples covering validation, custom editors, spatial inputs, opt-in/optional properties, external loading, and more.

8 attributes 3 events
<eox-layercontrol>

EOxLayerControl

The `eox-layercontrol` element provides a user interface for managing and configuring layers of an `eox-map`. It connects to the underlying OpenLayers map instance and displays a list of layers, supporting advanced features such as optional layers, exclusive layers, layer tools, dynamic legends, time controls, and external layer addition. ## Usage Place `` next to an `` element. If there is only one `eox-map` present, `eox-layercontrol` will automatically connect to it. This can be configured via the `for` attribute/property in order to support connecting to a specific map. ## Layer Properties To be displayed and managed correctly, the map layers should have custom properties set (e.g. using `properties.` inside the `eox-map` layer json, or by doing `layer.set(property, value)` on the native OpenLayers layers). - `id?: string` — Unique identifier for the layer. Recommended for referencing and managing layers; also used for `eox-map` smart layer updating. - `title?: string` — Human-readable title for the layer, displayed in the control. Recommended for usability. - `layerControlHide?: boolean` — If true, hides the layer from the control UI. - `layerControlOptional?: boolean` — If true, the layer is initially hidden and can be added from the optional list. - `layerControlExclusive?: boolean` — If true, only one exclusive layer can be visualized at a time (taking into account all other layers on the same level with this property). - `layerControlExpand?: boolean` — If true, the layer is "expanded" by default, showing description, tools etc. (if available). - `layerControlToolsExpand?: boolean` — If true, the layer tools section is expanded by default. - `layerConfig?: object` — Configuration for the "config" tool, consisting of a JSON schema (rendered by `eox-jsonform`) for editable settings. - `layerDatetime?: object` — Configuration for the "datetime" tool, supporting time-based controls and playback. - `layerLegend?: object` — Configuration for the "legend" tool, supporting dynamic color legends. For `eox-map` attributes/properties and emitted events, see below. ## Additional Helper Methods - `updateVectorLayerStyle`: Resolves a vector layer flat style object by substituting any `["var", ""]` placeholders with values from its `variables` property; imitating OL WebGL flat style variable substitution `webglLayer.updateStyleVariables`. Usage: `import { updateVectorLayerStyle } from "@eox/layercontrol";`

12 attributes 2 events
<eox-layout>

EOxLayout

The `eox-layout` element provides a flexible grid-based layout system for web applications, based on a 12x12 grid. It consists of two elements: - `eox-layout`: the container holding all layout items - `eox-layout-item`: the individual items placed on the grid, with defined x/y coordinates and w(idth)/h(eight) dimensions ## Usage Place `` in your application and add `` children to define grid items. - `x`, `y`: zero-indexed coordinates for grid placement - `w`, `h`: width and height (can be single value or three values for small/medium/large screens, separated by `/`) - `gap`: spacing between items - `row-height`, `column-width`: control grid slot size - `fill-grid`: automatically fills available space ## Responsive Layout By providing three values for `x`, `y`, `w`, or `h`, items can be rendered differently on small, medium, and large screens. ## Story Examples - Basic grid usage with positioned items - Full 12x12 grid visualization - Gap and padding demonstration - Overflow and scroll behavior - Fill-grid for auto layout - Responsive layouts for different screen sizes

4 attributes 0 events
<eox-layout-item>

EOxLayoutItem

No description available.

4 attributes 0 events
<eox-map>

EOxMap

The `eox-map` element is a powerful wrapper around [OpenLayers](https://openlayers.org/) that provides a declarative, highly configurable map element for web applications. It supports a wide range of layer types, sources, controls, and advanced features, making it suitable for interactive mapping, data visualization, and geospatial analysis. ## Basic usage: ``` import "@eox/map" ``` Some basic layers, sources and formats are included in the default bundle, for advanced usage it is required to import the `advancedLayersAndSources` plugin. Included in the base bundle: - Formats: `GeoJSON`, `MVT` - Layers: `Group`, `Image`, `Tile`, `Vector`, `VectorTile` - Sources: `ImageWMS`, `OSM`, `Tile`, `TileWMS`, `Vector`, `VectorTile`, `WMTS`, `XYZ` In order to use the rest of the layers and sources provided by OpenLayers, import the plugin as well: ``` import "@eox/map/src/plugins/advancedLayersAndSources" import "@eox/map" ``` Included in the advanced plugin bundle: - Layers: - All OpenLayers layer types - [`STAC`](https://github.com/m-mohr/ol-stac) - Sources: - All OpenLayers source types - [`WMTSCapabilities`](https://github.com/EOX-A/EOxElements/tree/main/elements/map/src/custom/sources/WMTSCapabilities.ts) - Reprojection through [proj4](https://github.com/proj4js/proj4js) For usage and story examples, see the Storybook stories in `/elements/map/stories`. ## Features - **Layer Support:** Easily add and configure layers such as Tile, Vector, VectorTile, Image, Group, and advanced types like STAC, GeoTIFF, MapboxStyle, and FlatGeoBuf. Layers are passed via the `layers` property as an array of configuration objects. - **Source Formats:** Supports GeoJSON, MVT, OSM, TileWMS, WMTS, XYZ, ImageWMS, and more. Advanced sources (e.g., WMTSCapabilities) are available via plugin import. - **Controls:** Add built-in or custom controls (Zoom, Geolocation, LoadingIndicator, etc.) using the `controls` property. Controls can be configured with `position`, `target`, and `orientation` for flexible UI layouts. Developers can also inject custom HTML tools via Shadow DOM ``s mapped to specific regions. - **Responsive Design:** The map emits a `resize` event providing current dimensions and a mobile breakpoint flag (`isSmall`), allowing dynamic adjustment of control layouts and map properties. - **Interactions:** Enable feature selection, hover, click, cluster-explode, and highlight interactions. Interactions are configured per layer and can trigger custom events. - **Tooltips:** Built-in tooltip support via ``, with options for property transformation, custom tooltips, and pixel/band value display for raster layers. - **Layer Groups:** Organize layers into groups for complex compositions and hierarchical management. - **Animations:** Animate view changes (zoom, center, extent) using the `animationOptions` property. - **Projection & Transformation:** Change map projection, register custom projections, and transform coordinates/extents using helper methods. - **Sync & Compare:** Synchronize multiple maps using the `sync` property, and compare maps side-by-side with ``. - **Config Object:** Pass a configuration object for advanced map setup and dynamic updates. - **Scroll Prevention:** Prevent scroll/drag interactions for embedded maps using the `preventScroll` property. - **Globe View:** Interactive 3D globe by using "globe" projection property. Configure via the `globeConfig` object. ## Events - `clusterSelect`: Fired when a cluster is selected. - `loadend`: Fired when the map has finished loading. - `mapmounted`: Fired when the map is successfully mounted. - `select`: Fired when a feature is selected. - `layerschanged`: Fired when the layers have been changed. ## Methods - `registerProjection`, `registerProjectionFromCode`: Register custom or EPSG projections. - `getLayerById`, `getFlatLayersArray`: Retrieve layers by ID or as a flat array. - `addOrUpdateLayer`, `removeInteraction`, `removeSelect`, `removeControl`: Manage layers and interactions programmatically. - `parseFeature`: Parses a feature from the input data. - `parseTextToFeature`: Parses text into a feature. Usage: `document.querySelector("eox-map").registerProjection([...]);` ## Additional Helper Methods - `buffer`: Applies a buffer around an extent - `transform`, `transformExtent`: Transform coordinates and extents between projections. Usage: `import { buffer, transform, transformExtent } from "@eox/map";`

14 attributes 6 events
<eox-stacinfo>

EOxStacInfo

### Introduction Working with STAC catalogs, collections and items often times requires to fetch a JSON file, parse its contents and display some of its fields in some formatted way. To make these steps reusable, the `eox-stacinfo` element offers a set of functionalities: - **automatically fetch a STAC file** as soon as the element loads - offer a **property whitelist** functionality to choose which properties to display - display the properties in **configurable sections** (header, body, featured, footer) - allow to **override** any property display for application-specific custom needs The use case for this element is alongside a map which displays STAC files or in a catalog browsing scenario where a quick look at the most important properties is needed. #### Technology Under the hood, this element uses [stac-fields](https://github.com/stac-utils/stac-fields) for parsing and pre-formatting properties. #### Usage Place `` in your application and set the `for` property to a valid STAC resource URL. The element will fetch the file and display its properties in configurable sections. Each section (`header`, `tags`, `body`, `featured`, `footer`) accepts an array of strings (property keys) or `Filter` objects. These can be passed as properties or stringified JSON attributes. A `Filter` object has the following structure: ```javascript { key: "links", filter: (link) => { // Return true/false to include/exclude items from a list (e.g. assets, links) return link.rel === "example"; } } ``` Sections: - `header`: Array of property keys or Filters to display at the top - `tags`: Array of property keys or Filters to display as tags - `body`: Array of property keys or Filters for the main content - `featured`: Array of property keys or Filters for prominent display - `footer`: Array of property keys or Filters for the bottom section #### Customization - **Slots**: You can override the default rendering of any property by providing a slot with the property name. This enables advanced customization and integration with application-specific UI. - **Unstyled mode**: By setting the `unstyled` property, only minimal styles are applied, allowing for full custom styling and integration into different design systems.

8 attributes 0 events
<eox-storytelling>

EOxStoryTelling

The `eox-storytelling` element enables the creation of interactive, multimedia-rich stories using Markdown and custom sections. It supports advanced features such as slot-based content, remote Markdown loading, and custom initialization logic via events. ## Usage Place `` in your application and pass Markdown content via the `markdown` property, slot, or a remote URL using the `markdown-url` property. The component automatically renders the story, including custom sections such as maps, images, and videos, using extended Markdown syntax and HTML comments for configuration. ## Features - **Markdown Rendering:** Supports standard and extended Markdown syntax for rich story content. - **Slot Content:** Accepts Markdown via slot for flexible content injection. - **Remote Markdown:** Loads Markdown from external URLs for dynamic stories. - **Custom Sections:** Add maps, images, videos, and more using HTML comment configuration. - **Events:** Emits events such as `init` for custom initialization logic (e.g., map projection setup). ## Custom Markdown Extensions In order to add custom functionality to the Markdown rendering, include HTML comments with a specific syntax: ``. Here are some of the supported extensions: - **Section Configuration:** Define sections with attributes like `as`, `id`, `class`, `style`, and more. - **Hero Section:** Create a full-screen hero section using `#` (Header 1) with additional attributes for images or videos. - **Navigation Control:** Use the `nav` attribute to control the visibility of the navigation menu. - **Custom Attributes:** Use HTML comments to define attributes for sections, such as `as`, `class`, `style`, and more. Read the [Markdown with Tour story](./?path=/story/elements-eox-storytelling--markdown-tour) for a comprehensive guide on using Markdown extensions.

11 attributes 3 events
<eox-timecontrol>

EOxTimeControl

The `eox-timecontrol` element provides interactive time navigation for map layers, supporting animation, a simple time slider, timeline visualization, date picker, and custom date formatting. ## Basic usage: ``` import "@eox/timecontrol" ``` ## Features - **Time-based Layer Control:** Link to an `` instance for time-based WMS layer control. Automatically detects layers with `timeControlValues` and `timeControlProperty` properties. - **Multiple UI Components:** Supports date display, date picker (popup or inline), timeline visualization, slider, and timelapse export. - **Navigation Controls:** Previous/next buttons for stepping through time periods. - **Date Formatting:** Customizable display format using dayjs tokens (default: "YYYY-MM-DD"). - **Filtering:** Integration with `` for filtering timeline items by metadata properties. - **Timelapse Export:** Export animated GIFs or MP4s from time series data. - **Standalone Mode:** Can be used without a map for time selection purposes. ## Component Structure The timecontrol element acts as a container for child components: - ``: Displays the current selected date(s) with optional navigation buttons. - ``: Calendar-based date picker (popup or inline, single or range selection). - ``: Range slider for selecting date ranges. - ``: Timeline visualization using vis-timeline. - ``: Timelapse export functionality. ## Layer Configuration Layers must have the following properties to work with timecontrol: - `properties.timeControlValues`: Array of objects with `date` and optional metadata. - `properties.timeControlProperty`: Property name used in WMS requests (e.g., "TIME"). - `properties.id`: Layer identifier (used for grouping in timeline). - `properties.name`: Display name (used in timeline groups). ## Events - `stepchange`: Fired when the current time step changes (not currently implemented).

9 attributes 0 events
<eox-tour>

EOxTour

The `eox-tour` element uses [driver.js](https://driverjs.com/) to create interactive product tours. It supports cross-iframe handoffs (start a tour in a "parent" and continue inside an iframe), persistent "seen" state via `localStorage`, and styling based on EOxUI. Features: - Define a series of steps to guide users through an application. - Highlight target elements and display customizable popovers. - Cross-iframe handoff logic seamlessly transitioning between parent window and iframe (supports both a "simple mode" defined entirely in the parent config, and an "advanced mode" with individual configs in both frames). - Persistent state tracking using `localStorage` to avoid repeatedly showing completed tours. - Prevent automatic start on mount for manual control over when the tour begins. The `eox-tour` element does not render any visible content itself; it operates entirely through the driver.js popovers and highlights. Therefore it doesn't matter where in the DOM you place the `` element, but it must be present in the document for the tour to function. **Note on the `id` attribute:** An `id` attribute is required for identifying instances for `localStorage` persistence, and it is strictly mandated for iframe handoff scenarios to correctly route `postMessage` synchronization.

4 attributes 4 events
<eox-a2ui-element>

EOxA2uiElement

No description available.

0 attributes 1 events
<eox-a2ui-wrapper>

EOxA2uiWrapper

A wrapper custom element that accepts a2ui stream/messages data and renders the elements inside.

3 attributes 1 events