Skip to main content

MCP Server for A2UI Canvas rendering and Chromecast casting

Project description

uijit

UI Just-In-Time - MCP server for A2UI canvas rendering and Chromecast casting.

What is uijit?

uijit is an MCP (Model Context Protocol) server that enables AI agents to create rich visualizations using the A2UI component format and cast them to Chromecast/Google TV devices in real-time.

This repository also hosts the Canvas Receiver - a Google Cast receiver application served via GitHub Pages at uijit.com.

Installation

pip install uijit

Usage

As an MCP server (stdio transport)

uijit --host 0.0.0.0 --port 8090

With nanobot

Add to your nanobot config:

{
  "tools": {
    "mcpServers": {
      "uijit": {
        "command": "uijit",
        "args": ["--host", "0.0.0.0", "--port", "8090"]
      }
    }
  }
}

MCP Tools

Tool Description
canvas_create Create a new canvas surface
canvas_update Update components using A2UI format
canvas_data Update data model without re-rendering
canvas_close Close and delete a surface
canvas_list List all surfaces
canvas_show Show/navigate existing surfaces
canvas_get Get full state of a canvas

How It Works

┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│  AI Agent   │────▶│   uijit     │────▶│   uijit     │────▶│ Chromecast  │
│  (nanobot)  │     │  MCP Server │     │  Receiver   │     │    TV       │
└─────────────┘     └─────────────┘     └─────────────┘     └─────────────┘
      │                   │                   │                   │
      │  A2UI JSON        │  WebSocket        │  Cast SDK         │
      │  (components)     │  (real-time)      │  (custom msg)     │
  1. AI Agent generates A2UI visualization components via MCP tools
  2. uijit MCP Server manages surfaces, renders HTML, serves via WebSocket
  3. uijit Receiver (GitHub Pages) is loaded by Chromecast and connects to the server
  4. Chromecast displays the live-updating visualization

URLs

Path Description
uijit.com Landing page
uijit.com/canvas-receiver/ Google Cast receiver application

Google Cast App Registration

To use the receiver with Chromecast:

  1. Go to Google Cast SDK Developer Console
  2. Register the receiver URL: https://uijit.com/canvas-receiver/
  3. Use the App ID in your sender application

Repository Structure

uijit/
├── index.html                 # Landing page (GitHub Pages)
├── canvas-receiver/
│   └── index.html             # Cast receiver application
├── pyproject.toml             # Python package metadata
├── src/uijit/                 # MCP server source
│   ├── cli.py                 # CLI entry point
│   ├── server.py              # MCP protocol handler
│   ├── canvas_manager.py      # Surface lifecycle management
│   ├── renderer.py            # A2UI → HTML renderer
│   ├── web_server.py          # HTTP/WebSocket server
│   └── models.py              # Data models
└── tests/
    └── test_canvas_manager.py # Tests

Related Projects

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uijit-0.1.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uijit-0.1.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file uijit-0.1.0.tar.gz.

File metadata

  • Download URL: uijit-0.1.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for uijit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 03548be84b3671da0c520d1d9f69efc272886a749470b14e000da4fcdd98262b
MD5 3d383c5fc16a979bc22d4d66ef7ac170
BLAKE2b-256 9673b2f141cdf7a5ecf21c4502c61be7175b429d31c5a003471e15d97ad0d7d1

See more details on using hashes here.

File details

Details for the file uijit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: uijit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for uijit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2be96e3b89c2a95936cd2305fcf86b8cfb42686126847335a4cf7e13d36ac30f
MD5 325c6ae9a8ac66521993ef83bd4de7b9
BLAKE2b-256 963a53e6068b4e37aaf773ce487d5d0aaeb77f0bc42a1866b1d6c4ed59bc3511

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page