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

Chromecast Casting

uijit includes a pre-registered Google Cast receiver (App ID: BE2EA00B) that points to https://uijit.com/canvas-receiver/. No registration is needed — casting works out of the box when paired with androidtvmcp.

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.1.tar.gz (22.4 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.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uijit-0.1.1.tar.gz
  • Upload date:
  • Size: 22.4 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.1.tar.gz
Algorithm Hash digest
SHA256 d336f3e0743111ee9c0a16d0a393934f73f917b5c35a12260d24fa94347d3451
MD5 907609f6a388497270cda3c731ebfe34
BLAKE2b-256 06a857f05a83b53cd47e27f247fa6c05061c5d0fdc9f4e935d1d19f8476f2ea9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uijit-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fabba58073aa71dfdf3f61a9ceba79bd3654a691df670825b13616eb13c4f24a
MD5 9fa686b2839164f77daf8c10bcd0584e
BLAKE2b-256 20ddd7e6edb79a3bd15b8f40602571d5d00dc259def16eadaca1166a9c01c481

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