Skip to main content
Glama

Low-Code UI MCP Server

This project provides a Python MCP server that inspects runtime data and returns UI instructions compatible with the low-code renderer in C:\Users\gregg\development\low-code\low-code\packages\ui.

The server is designed around the instruction types documented in C:\Users\gregg\development\low-code\low-code\README.md:

  • label

  • list

  • table

  • card

  • accordion

  • carousel

What It Does

The exposed MCP tool, suggest_ui_instructions, accepts a data object and returns:

  • instruction: a renderer-ready UIInstruction or UIInstruction[]

  • analysis: the component decisions made for each field

  • notes: a short explanation of the heuristics used

Example selection behavior:

  • arrays of primitive values become list

  • small arrays of objects become carousel

  • medium arrays of objects become accordion

  • large, flat arrays of objects become table

  • nested objects become card

Related MCP server: MCP UI Glue Code Generator

Install

cd C:\Users\gregg\development\mcp
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -e .

Run

cd C:\Users\gregg\development\mcp
.venv\Scripts\Activate.ps1
low-code-ui-mcp

You can also run it directly:

python -m low_code_ui_mcp

Run with HTTP REST transport instead of stdio:

python -m low_code_ui_mcp --transport http --host 127.0.0.1 --port 8000

When running in HTTP mode:

  • health check: GET /health

  • non-blocking suggestion endpoint: POST /api/v1/suggest-ui-instructions

Example request:

Invoke-RestMethod -Method Post -Uri "http://127.0.0.1:8000/api/v1/suggest-ui-instructions" -ContentType "application/json" -Body (@{
  data = @{
    title = "Quarterly Summary"
    highlights = @("Revenue up 12%", "Churn down 3%")
    products = @(
      @{ name = "Alpha"; owner = "Team A"; score = 92 },
      @{ name = "Beta"; owner = "Team B"; score = 88 }
    )
  }
} | ConvertTo-Json -Depth 20)

MCP Tool

suggest_ui_instructions

Parameters:

  • data: the object to analyze

  • carousel_max_items: maximum object-array size that still prefers carousel

  • table_min_items: minimum object-array size that starts preferring table

  • table_max_columns: maximum distinct object keys that still counts as a flat table

  • max_depth: recursion limit for nested instruction generation

Example request payload:

{
  "data": {
    "title": "Quarterly Summary",
    "highlights": ["Revenue up 12%", "Churn down 3%"],
    "products": [
      { "name": "Alpha", "owner": "Team A", "score": 92 },
      { "name": "Beta", "owner": "Team B", "score": 88 }
    ],
    "accounts": [
      { "name": "Acme", "region": "NA", "status": "Active" },
      { "name": "Globex", "region": "EU", "status": "Active" },
      { "name": "Initech", "region": "APAC", "status": "Paused" },
      { "name": "Umbrella", "region": "NA", "status": "Active" },
      { "name": "Soylent", "region": "EU", "status": "Pilot" },
      { "name": "Wonka", "region": "NA", "status": "Active" },
      { "name": "Hooli", "region": "APAC", "status": "Active" },
      { "name": "Stark", "region": "NA", "status": "Active" }
    ]
  }
}

Example response shape:

{
  "instruction": [
    { "type": "label", "field": "title", "label": "Title" },
    { "type": "list", "field": "highlights", "label": "Highlights" },
    {
      "type": "carousel",
      "field": "products",
      "label": "Products",
      "contents": [
        { "type": "label", "field": "name", "label": "Name" },
        { "type": "label", "field": "owner", "label": "Owner" },
        { "type": "label", "field": "score", "label": "Score" }
      ]
    },
    { "type": "table", "field": "accounts", "label": "Accounts" }
  ]
}

Heuristics

  • Primitive fields render as label

  • Arrays of primitives render as list

  • Empty arrays default to list

  • Arrays of objects render as:

    • carousel when item count is small

    • accordion when item count is medium or the objects are more nested

    • table when the array is large and the objects are flat enough for columns

  • Nested objects render as card with child instructions inferred from the nested fields

Available Tools

1 tool
suggest_ui_instructionsC

Suggest @workspace/ui renderer instructions for a JSON-like object.

Inputs: data (required), carousel_max_items, table_min_items, table_max_columns, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to compare it to. The tool's purpose is clearly defined and stands alone without any confusion.

    Naming Consistency5/5

    Since there is only a single tool, it inherently maintains consistency with itself. The naming follows a clear verb_noun pattern (suggest_ui_instructions), which is straightforward and predictable.

    Tool Count2/5

    A single tool is too few for a server named 'Low-Code UI MCP Server', which implies a broader domain of UI-related operations. This minimal set feels thin and inadequate for covering potential needs like creating, updating, or rendering UI components.

    Completeness2/5

    The tool surface is severely incomplete for a UI-focused server, as it only offers suggestion capabilities without any tools for actual creation, modification, or execution of UI elements. This leaves significant gaps that will likely cause agent failures in handling full UI workflows.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI agent to generate and reconfigure real-time banking interfaces by exposing MCP tools that return UI schemas and personalized financial components based on customer context and situation. It supports dynamic situation detection, security rules, and demo profiles for adaptive dashboards.
      95 npm
      -