Sports WebMCP Template
A complete AI-agent-ready sports complex platform with 15 WebMCP tools for facility booking, league management, memberships, and coaching programs. Supports both imperative JavaScript and declarative HTML integration.
Load live preview on demand to keep template pages fast.
// Register get_facilities tool
navigator.modelContext.registerTool({
name: "get_facilities",
description: "List available sports facilities including courts, fields, pools, and gyms.",
inputSchema: {
"type": "object",
"properties": {
"sport": {
"type": "string",
"description": "Sport type (e.g. \"tennis\", \"basketball\", \"swimming\")"
},
"facility_type": {
"type": "string",
"enum": [
"court",
"field",
"pool",
"gym",
"track",
"studio"
],
"description": "Facility type"
}
},
"required": []
},
annotations: {"readOnlyHint":true},
execute: async (params) => {
const response = await fetch("/api/get_facilities", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(params),
});
return response.json();
}
});What's Included
Search, browse, and book courts, fields, and training spaces with real-time availability.
Full league pipeline with standings, upcoming games, team info, and registration.
Browse coaching programs, book training sessions, and explore nutrition plans.
Membership tiers, pricing comparisons, and class schedules at the agent's fingertips.
Court booking and league registration forms that agents can submit without JavaScript.
Court bookings and league registrations require explicit user confirmation.
Why This Template Works
Designed for AI agent interoperability with structured tool definitions.
Complete Sports Journey
Covers every step from facility discovery to court booking and league registration, so agents guide members without dead ends.
Structured Sports Data
Tools return typed JSON with schedules, standings, availability, and pricing — no scraping needed.
Safe Booking Pattern
The book_court tool uses requestUserInteraction to ensure members confirm before committing to a reservation.
Dual API Surface
Imperative JS for rich agents and declarative HTML forms for simpler crawlers — both work out of the box.
Implementation Guide
Follow these steps to deploy the template on your website.
Drop in the HTML
Copy the template HTML into your site. All tools and styles are self-contained — no external dependencies.
Wire up your sports API
Replace the mock execute() functions with real fetch() calls to your facility, league, and membership APIs.
Customize facility data
Update the mock data with your actual courts, schedules, and membership tiers to match your complex.
Test with an AI agent
Open the page in an MCP-capable browser or test harness and verify the full search, booking, and registration flow.
Go live
Deploy to production and let AI agents help your members book facilities and join leagues seamlessly.
Download Options
Other Industry Templates
Ready to Make Your Site Agent-Ready?
Deploy this template and start receiving structured traffic from AI agents.