Skip to content

Add an MCP server exposing calendar and saint-search tools - #158

Merged
brianglass merged 2 commits into
mainfrom
add-mcp-server
Aug 3, 2026
Merged

Add an MCP server exposing calendar and saint-search tools#158
brianglass merged 2 commits into
mainfrom
add-mcp-server

Conversation

@brianglass

Copy link
Copy Markdown
Owner

Summary

  • 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. Reuses calendarium.api's DaySchema directly rather than re-deriving the response shape.
    • search_saints — find a saint's fixed commemoration date(s) by name.
  • Adds an "AI Assistant" page (/ai-assistant/) documenting how to connect an MCP client, linked in the nav.
  • Adds .well-known/mcp/server-cards.json and llms.txt discovery 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-server was evaluated and rejected: it's incompatible with the mcp SDK's 2.0 rewrite (FastMCP renamed/relocated to MCPServer), 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 passing
  • Manually verified the full MCP wire protocol (initialize/tools/list/tools/call) against the running dev server for both tools, including the translation parameter actually changing passage content
  • Manually verified /.well-known/mcp/server-cards.json and /llms.txt render correctly
  • Confirmed existing Django routes are unaffected by the ASGI composition

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3

brianglass and others added 2 commits August 3, 2026 16:09
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass
brianglass merged commit f71f091 into main Aug 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant