booking-mcp-app

booking-mcp-app

Exposes court-availability data as a read-only panel rendered in MCP hosts (Claude Desktop, VS Code, test host) via a UI resource.

Category
Visit Server

README

booking-mcp-app

A view-only MCP App: an MCP server that exposes court-availability data and renders it as a read-only panel inside an MCP host (Claude Desktop, VS Code, or the free local test host), using the MCP Apps protocol (spec 2026-01-26).

This is the first phase of porting the generative-ui POC to MCP Apps. Read-only, no booking yet: the important shift from generative-ui is that the data lives on the server (the tool), not in the conversation. The UI only displays what the server returns.

What it does

The server registers one tool, get_court_availability, that returns which courts and time slots are free for a given date + sport from in-memory mock data. The tool is linked to a UI resource (ui://court-availability/panel.html) that the host renders in a sandboxed iframe as a read-only grid of courts x time slots (free vs taken).

Two data paths, both handled the same way in the UI:

  • The host pushes a tool result to the app (app.ontoolresult) whenever the agent calls get_court_availability, e.g. with a different date or sport. The panel updates.
  • The app pulls its own initial data on load (app.callServerTool). This is the app -> server -> app round trip, and it also populates the panel when it is opened directly.

There are no inputs, no submit, no booking. Changing the date or sport happens by calling the tool with different arguments (from the agent or the test host), not from a form.

Layout

booking-mcp-app/
  server.ts         MCP server: registers the tool + the ui:// resource, served over HTTP
  availability.ts   the booking domain (sports, courts, slots) + deterministic mock data
  mcp-app.html      UI entry point
  src/
    mcp-app.ts      the view: App client, ontoolresult + callServerTool, renders the grid
    mcp-app.css     panel styling (single light theme)
  vite.config.ts    bundles the UI into one self-contained HTML (vite-plugin-singlefile)
  dist/mcp-app.html the built UI, read by the server and served as the resource

Reuses the booking domain from generative-ui (Tennis / Football / Basketball / Padel, courts and time slots). Availability is deterministic per query, so the same date + sport always renders the same grid.

Run

Requires Node 18+ (developed on Node 24).

npm install
npm run build      # typecheck + bundle the UI to dist/mcp-app.html
npm run serve      # start the MCP server on http://localhost:3001/mcp

npm start does the build and serve in one step. Rerun npm run build after any UI change; the server reads dist/mcp-app.html fresh on each resource request.

  • npm run check typechecks only (tsc --noEmit).
  • PORT=4000 npm run serve changes the port.

See the panel in a host

Free: the local test host

The ext-apps repo ships a local host that renders MCP Apps with no account needed.

# 1) in this project, with the server already running (npm run serve)
# 2) in a separate clone of the ext-apps repo:
git clone https://github.com/modelcontextprotocol/ext-apps.git
cd ext-apps/examples/basic-host
npm install
SERVERS='["http://localhost:3001/mcp"]' npm start

Open http://localhost:8080, call get_court_availability (try { "sport": "Padel", "date": "2026-08-21" }), and the availability grid renders in the iframe. Call it again with a different sport to see the panel update.

Claude Desktop (paid plan)

Expose the local server with a tunnel and add it as a custom connector:

npx cloudflared tunnel --url http://localhost:3001

In Claude, go to Settings -> Connectors -> Add custom connector, paste the https://<something>.trycloudflare.com/mcp URL, then ask Claude to show court availability.

References

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured