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.
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 callsget_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 checktypechecks only (tsc --noEmit).PORT=4000 npm run servechanges 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
- MCP Apps overview — https://modelcontextprotocol.io/extensions/apps/overview
- Build guide — https://modelcontextprotocol.io/extensions/apps/build
- Spec (2026-01-26) — https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx
- Examples — https://github.com/modelcontextprotocol/ext-apps/tree/main/examples
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。