Add an MCP server exposing calendar and saint-search tools - #158
Merged
Conversation
Adds mcp_svc, a new Django app hosting an MCP (Model Context Protocol) server via the official mcp SDK, mounted alongside Django's own ASGI app in orthocal/asgi.py. Exposes two tools over Streamable HTTP at /mcp: get_day (feasts, fasting, readings, and saints for a date, with tradition/calendar/translation selection, reusing calendarium.api's DaySchema) and search_saints (find a saint's fixed commemoration date(s) by name). Also adds: - An "AI Assistant" page documenting how to connect an MCP client. - .well-known/mcp/server-cards.json and llms.txt discovery metadata for AI agents/crawlers (the former follows a still-draft MCP spec proposal, SEP-2127, as of 2026-08). django-mcp-server was evaluated and rejected: it's incompatible with the mcp SDK's 2.0 rewrite (FastMCP renamed/relocated), with no fix in progress. Hand-rolled against the current SDK instead -- the actual composition needed turned out to be a small ASGI dispatcher, not the large lift originally assumed. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
Changes the MCP server's get_day tool default translation from kjv to lxx2012-web (kjv remains available on request). Also expands the AI Assistant page's connection instructions to cover Claude Desktop and ChatGPT (both support custom remote MCP connectors for regular consumer accounts) alongside the existing Claude Code example. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcp_svc, a new Django app hosting an MCP (Model Context Protocol) server via the officialmcpSDK, mounted alongside Django's own ASGI app inorthocal/asgi.py./mcp:get_day— feasts, fasting, readings, and saints for a date, with tradition/calendar/translation selection. Reusescalendarium.api'sDaySchemadirectly rather than re-deriving the response shape.search_saints— find a saint's fixed commemoration date(s) by name./ai-assistant/) documenting how to connect an MCP client, linked in the nav..well-known/mcp/server-cards.jsonandllms.txtdiscovery metadata for AI agents/crawlers. The server-card follows a still-draft MCP spec proposal (SEP-2127) as of 2026-08 — field names/path may shift before it's finalized, but it's a cheap, low-risk static endpoint to have in place early.Notable decision
django-mcp-serverwas evaluated and rejected: it's incompatible with themcpSDK's 2.0 rewrite (FastMCPrenamed/relocated toMCPServer), with no fix in progress upstream (confirmed by checking its GitHub activity). Hand-rolled against the current SDK instead — the actual ASGI composition needed turned out to be a small dispatcher (~10 lines), not the large lift originally assumed when scoping this.Test plan
docker compose run --rm tests— 134/134 passinginitialize/tools/list/tools/call) against the running dev server for both tools, including thetranslationparameter actually changing passage content/.well-known/mcp/server-cards.jsonand/llms.txtrender correctly🤖 Generated with Claude Code
https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3