Add hello-world MCP endpoint with get_schedule tool #454
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#454
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Stage 1 of
story-westside-basketball-ai-assistant. Proves the remote MCP transport works so Marcus can connect via claude.ai on iOS.Repo
forgejo_admin/basketball-apiUser Story
As an admin (Marcus)
I want to ask Claude "What's the schedule?" and get live data
So that I can manage my business through conversation instead of dashboards
Context
claude.ai supports remote MCP servers via HTTPS. basketball-api already has a
GET /public/scheduleendpoint returning schedule data. This ticket adds an MCP server endpoint that exposes aget_scheduletool wrapping the existing query. The MCP endpoint speaks the streamable HTTP transport protocol (HTTP+SSE). No auth for hello-world — auth comes in a follow-up ticket.The Python
mcpSDK providesFastApiSseTransport(or equivalent) for mounting on FastAPI. One file, one tool, one endpoint.File Targets
Files the agent should create:
src/basketball_api/mcp_server.py— MCP server definition withget_scheduletoolsrc/basketball_api/routes/mcp.py— FastAPI router mounting the MCP SSE transportFiles the agent should modify:
src/basketball_api/main.py— register the MCP routerpyproject.toml— addmcpdependencyFiles the agent should NOT touch:
src/basketball_api/routes/schedule.py— existing REST endpoint, leave as-is. MCP tool should query the DB directly using the same pattern.Acceptance Criteria
mcppackage added topyproject.tomldependencies/mcpon the FastAPI appget_scheduletool returns upcoming schedule entries from the databaseTest Expectations
/mcpwith MCP protocol returns tool list includingget_schedulepytest tests/ -k test_mcpConstraints
mcpSDK (latest version)src/basketball_api/routes/get_dbdependency)Checklist
tofu plan -lock=falsenot needed (no infra changes)Related
story-westside-basketball-ai-assistant— parent user story (stage 1 of 4)project-westside-basketball— parent projectarch-dataflow-westside-basketball— MCP adds claude.ai as a participantScope Review: NEEDS_REFINEMENT
Review note:
review-992-2026-04-12Template is complete and file targets all verified against the codebase. Issue is well-scoped for a single agent pass (~3 min).
Three traceability gaps block READY status:
WS-S*code for AI assistant exists inproject-westside-basketballuser-stories section.story:ai-assistantlabel has no backing entry.story-westside-basketball-ai-assistantreferenced in Lineage does not exist as a pal-e-docs note.arch:dataflowlabel has no backingarch-dataflowarchitecture note in pal-e-docs.All three are
[SCOPE]items -- create the backing notes/entries, then this ticket is READY.Scope Review: READY
Review note:
review-992-2026-04-12bAll template sections present, traceability triangle complete (story note
story-westside-basketball-ai-assistantand arch notearch-dataflow-westside-basketballboth verified in pal-e-docs), all file targets verified against live repo. 4 file targets in 1 repo, 6 AC — fits in a single agent pass. No blockers, no decomposition needed.Note: No-auth MCP endpoint on Tailscale funnel is intentional for hello-world scope. Auth follow-up is tracked in the staged rollout (Stage 2+).