天主教礼拜日历服务

一个基于TypeScript的Model Context Protocol (MCP)服务器,提供罗马天主教礼拜日历API的访问,支持通用、国家和教区日历查询。

  • by rudolphh
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 rudolphh/liturgical-calendar-mcp-ts

使用说明

礼仪日历MCP服务器(TypeScript)

A. 模型上下文协议(MCP) 用TypeScript编写的服务器,提供对 罗马天主教宗教日历API.

注: 您在寻找Python版本吗?看 礼仪日历mcp(Python)

为什么选择TypeScript?

这是对TypeScript的重写 Python版本 具有以下优点:

  • 原生MCP SDK:来自官方MCP SDK的一流TypeScript支持
  • 小容器:Node.js Alpine镜像约50MB,而Python约100MB+
  • 本机异步/等待:基于promise的干净HTTP请求
  • 类型安全性:完整的TypeScript类型,以获得更好的IDE支持和错误捕获
  • 简单依赖关系:只需要 @modelcontextprotocol/sdk (内置 fetch)

特性

  • get_general_calendar -任何年份的通用罗马历(1970-1999)
  • get_national_calendar -国家日历(IT、美国、NL、VA、CA等)
  • get_diocesan_calendar -教区日历与当地庆祝活动
  • list_available_calendars -发现所有可用日历
  • get_liturgical_events -所有可能的礼仪活动

建筑

此服务器遵循一个干净的模块化架构,关注点分离:

有关详细的体系结构文档,请参阅 建筑.md.

先决条件

  • Node.js 18+ (20+推荐)
  • Docker 桌面版 使用MCP工具包(用于Docker部署)
  • 无需认证

安装

方案1:地方发展

# Clone the repository
git clone https://github.com/CatholicOS/liturgical-calendar-mcp.git
cd liturgical-calendar-mcp

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run the server
npm start

选项2:Docker

# Build the Docker image
docker build -f Dockerfile.ts -t liturgical-calendar-mcp-ts:latest .

# Run with Docker
docker run -i liturgical-calendar-mcp-ts:latest

MCP客户端的配置

Claude桌面配置

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "liturgical-calendar": {
      "command": "node",
      "args": ["/absolute/path/to/liturgical-calendar-mcp/build/index.js"]
    }
  }
}

Docker MCP工具包

编辑 ~/.docker/mcp/catalogs/docker-mcp.yaml:

  litcal-ts:
    description: "Access Roman Catholic Liturgical Calendar data (TypeScript)"
    title: "Liturgical Calendar (TS)"
    type: server
    dateAdded: "2025-10-22T00:00:00Z"
    image: liturgical-calendar-mcp-ts:latest
    tools:
      - name: get_general_calendar
      - name: get_national_calendar
      - name: get_diocesan_calendar
      - name: list_available_calendars
      - name: get_liturgical_events
    metadata:
      category: integration
      tags:
        - catholic
        - liturgy
        - calendar
      license: MIT

发展

# Watch mode for development
npm run watch

# Build for production
npm run build

# Run tests (if added)
npm test

项目结构

.
├── src/
│   └── index.ts          # Main MCP server implementation
├── build/                # Compiled JavaScript (generated)
├── package.json          # Dependencies and scripts
├── tsconfig.json         # TypeScript configuration
├── Dockerfile.ts         # Docker build file
└── README-typescript.md  # This file

与Python版本的比较

特性 Python TypeScript
运行时大小 ~100MB ~50MB
依赖关系 2(mcp,httpx) 1(@modelcontextprotocol/sdk)
HTTP客户端 httpx(外部) fetch(内置)
类型安全 可选(mypy) 内置
异步模型 异步 承诺/异步等待
MCP SDK FastMCP包装器 官方SDK

API 参考

get_general_calendar

{
  year?: string,    // 1970-9999 (default: current year)
  locale?: string   // en, es, it, fr, etc. (default: en)
}

get_national_calendar

{
  nation: string,   // IT, US, NL, VA, CA (required)
  year?: string,    // 1970-9999 (default: current year)
  locale?: string   // en, es, it, fr, etc. (default: en)
}

get_diocesan_calendar

{
  diocese: string,  // ROME-IT, BOSTON-US (required)
  year?: string,    // 1970-9999 (default: current year)
  locale?: string   // en, es, it, fr, etc. (default: en)
}

list_available_calendars

{
  // No parameters required
}

返回所有可用的国家和教区日历及其所在地区。

get_liturgical_events

{
  calendarType?: string,  // "general", "national", or "diocesan" (default: general)
  nation?: string,        // Required if calendarType is "national"
  diocese?: string        // Required if calendarType is "diocesan"
}

检索日历类型的所有可能的礼仪事件。

许可证

麻省理工学院

鸣谢

  • John R.D‘Orazio牧师的API手术日历
  • Anthropic的MCP协议