Once Sport MCP
Allows ingesting permitted YouTube videos as source footage for local football video analysis, using yt-dlp.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Once Sport MCP analyze match.mp4 and propose timed attacking events for review"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
About
Turns a host agent's analysis of a football video into reviewed, reproducible output. The agent proposes timed events and drawings, an operator approves the exact digest, and a worker renders it. Everything runs locally over MCP stdio or a CLI, with no editor or desktop automation.
Tag events (defending, transitions, attacking, set pieces, goals) and export a Once-compatible CSV.
Ingest local or permitted YouTube video, with persistent jobs, cancel/retry and hash-verified artifacts.
Render reels with drawings, tracking, formations, time stop and slow motion; export statistics.
Optionally export through a locally installed Once Sport executable.
Related MCP server: mcp-video-studio
Status
Pre-release (0.1.0a1). Interfaces may change. Tested on Linux with Python 3.13 and FFmpeg only.
Native Once export rejects holds, speed segments, text, flags and the newer drawing kinds; use the custom renderer for them.
Tracking is seeded by the host, one target per job. There is no re-identification, occlusion recovery or automatic player detection.
Not implemented: magnifier, player vision, chroma key, image import, field mapping.
Untested: opening native output in the Once GUI, Windows and macOS.
Rendering 1080p costs roughly 0.1-0.25 s per output frame; keep clips short.
The reviewer name is an operator assertion, not authentication.
Install
Requires Python 3.11+, uv, and ffmpeg/ffprobe on PATH (plus yt-dlp for YouTube sources).
From the repository root:
uv sync # core
uv sync --extra tracking # adds OpenCV for tracking
uv run once-sport-mcp # starts the MCP stdio serverConfiguration
Read at server start. With none set, only four timeline tools are registered.
Variable | Meaning |
| Where CSV files are written (default |
| Absolute dedicated directory. Setting it enables the workflow tools. |
| JSON array of permitted source directories (default |
|
|
| Absolute path to the Once executable; enables native export. |
MCP client entry (replace the placeholders):
{
"mcpServers": {
"once-sport": {
"command": "/absolute/path/to/once-sport-mcp/.venv/bin/once-sport-mcp",
"env": {
"ONCE_SPORT_WORKSPACE": "/absolute/path/to/workspace",
"ONCE_SPORT_ALLOWED_SOURCE_DIRS": "[\"/absolute/path/to/videos\"]",
"ONCE_SPORT_TRACKING_ENABLED": "1"
}
}
}
}Usage
Timeline tools (always available): validate_timeline, generate_once_import_csv, search_events, summarize_phases. An event has event_id, period (1-4), start_seconds, end_seconds, team, phase, action, and optional players, notes, flag (good/bad/favourite) and playlists. Phases: defending, transition_to_attack, attacking, transition_to_defend, set_piece_attack, set_piece_defend, goal, goal_conceded. See examples/timeline.synthetic.json.
Workflow (needs a workspace). Jobs run in a separate worker process:
uv run python -m once_sport_mcp.worker --root /absolute/path/to/workspace \
--allow-source-dir /absolute/path/to/videos --enable-trackingFlow: create_analysis_project → request_analysis_evidence (frames) → submit_analysis_proposal → operator review_analysis_proposal with the exact digest → request_analysis_export (reel) or request_analysis_statistics, then list_analysis_artifacts / get_analysis_artifact. Exports before approval, or with a stale digest, are refused.
The same flow is available from the CLI: uv run once-sport-workflow --help.
Features
Drawing kinds (custom renderer): ellipse, arrow, line, polygon, label, polyline, curve, area, spotlight, stopwatch, and speed (slow motion 0.25/0.5x or fast forward 2/4x, audio silent inside). Drawings accept keyframes for movement, and hold_seconds pauses the clip on a drawing (time stop).
Tracking:
request_analysis_trackingfollows one seeded target with OpenCV CSRT and flags loss for review.Formations:
build_formation_drawingscomposes 2-11 tracked targets into lines, rings or spotlights, and an area. It stops before targets might overlap and never submits anything itself.Statistics: XLSX, HTML and JSON counts by phase, team, action, period, goals, players, flags and playlists. No video needed.
Playlists:
request_analysis_export(playlist="NAME")renders only the events in that playlist.Native export:
request_native_analysis_exportuses the installed Once executable for the supported subset and fails closed otherwise.
Development
uv run --frozen --extra tracking pytest -q
uv run --frozen --extra tracking ruff check .
uv run --frozen --extra tracking ruff format --check .The workflow state lives only in your workspace directory; Once Sport's own project database is never read or modified. Timeline inputs are not deliberately logged, but your MCP client may retain them. Avoid sensitive data.
Released under the MIT License.
Available Tools
4 toolsgenerate_once_import_csvB
Create a new CSV in the configured output directory; app import is unverified.
Inputs: events (required), filename (required). Returns: object
search_eventsCRead-onlyIdempotent
Filter validated source events; team/player match exactly, action is a substring.
Inputs: events (required), team, phase, action, +2 more. Returns: object
summarize_phasesBRead-onlyIdempotent
Count source events by phase, returning the underlying timestamped evidence.
Inputs: events (required). Returns: object
validate_timelineBRead-onlyIdempotent
Validate a human-reviewed timeline. Times are video offsets in seconds.
Inputs: events (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool occupies a distinct stage of the workflow: CSV generation, timeline validation, event search, and phase summarization. search_events and summarize_phases both operate over source events and could be momentarily confused, but the descriptions (filter vs. count-by-phase) make the boundary clear.
All four tools follow a verb_noun snake_case pattern (validate_timeline, search_events, summarize_phases). The one deviation is generate_once_import_csv, where the product name is embedded in the middle, making it slightly awkward but still readable and predictable.
Four tools is on the lean side but maps cleanly to the import/validate/search/summarize pipeline, with each tool earning its place. It is close to feeling thin since there is no tool for reading or editing the timeline itself.
The surface covers generation, validation, search, and aggregation, but validate_timeline presumes a human-reviewed timeline that no tool can fetch or inspect, and there is no way to list unfiltered events or retrieve a single event. These are workable but notable gaps for an agent-driven workflow.
Maintenance
Related MCP Connectors
Video review and collaboration for teams and agents: a full review interface for agentic video and motion graphics, feedback by voice, screen and drawing on the frame, agents that iterate version by version, and every version's notes and source files saved for the team.
Video pipeline for AI agents: analyze with AI, transcode to MP4/HLS/DASH, edit, protect and deliver.
FFmpeg as a service for AI agents: typed video editing tools, async jobs, downloadable outputs.
Video review and approval for agents: upload renders, read frame-accurate feedback, ship versions.
Related MCP Servers
AlicenseBqualityBmaintenanceGives AI agents video perception by turning screen recordings, films and URLs into timestamped structured evidence: ordered UI states and transitions, per-screen OCR, shots, camera motion, palettes, on-screen text and speech, all cached locally with no API keys. Includes drill-down tools to zoom into intervals, crop full-resolution frames, diff two moments, and search on-screen text and speech across everything watched.153MIT- AlicenseAqualityBmaintenanceEnables AI agents to perform deterministic FFmpeg video edits—silence removal, vertical reframing, 3D LUT grading, and metadata/audio extraction—and generate native CapCut Desktop drafts, with a local web studio for previewing and batch processing.51MIT
- AlicenseBqualityCmaintenanceEnables AI agents to edit video through a structured timeline with scene detection, word-timestamped transcripts, captions, overlays, music, and preview renders for self-checking, rendered locally with ffmpeg.37Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to inspect footage through contact sheets and facts, render edit files or numbered frames to MP4 using local ffmpeg, and save, list, restore, or diff video versions.312 npmMIT