yandex-calendar-mcp

yandex-calendar-mcp

An MCP server that enables AI assistants to access Yandex Calendar over CalDAV, with the ability to read, create, move, update, and delete events, including recurring events and attendee invitations.

Category
访问服务器

README

yandex-calendar-mcp

An MCP server that gives an AI assistant access to Yandex Calendar over CalDAV. Read the schedule, create, move and delete events.

Русская версия

Note on language: tool descriptions and responses are in Russian, because the server was written for a Russian-speaking assistant. The code, configuration and this document are in English. Everything else works regardless of language.

What it does

Reading

  • Events for any period: today by default, or an explicit range up to 92 days.
  • All calendars at once, with every event labelled by the calendar it came from — or a single calendar selected by name.
  • Recurring events expanded into concrete dates. If expansion fails, the event is returned with a warning rather than presented as accurate.
  • Attendees listed with how each of them replied — accepted, declined, tentative or no answer yet.
  • All-day events recognised as such, not shown as midnight appointments.
  • Every answer states the time zone and UTC offset it used.

Writing

  • Create an event: title, start, end or duration, location, description; timed or all-day spanning several days.
  • Create a recurring event — daily, weekly, monthly or yearly — bounded by a number of occurrences or by an end date.
  • Update an event: move it, rename it, change location or description. Only the fields you pass are touched; a moved event keeps its original duration unless you say otherwise.
  • Edit or delete a single occurrence of a recurring series, or the whole series. A changed day becomes a RECURRENCE-ID override, a removed day an EXDATE — the standard mechanisms, so the result looks right in the Yandex app and in any other client.
  • Invite people: attendees can be added when creating an event, and added or removed later. Yandex mails the invitations and cancellations itself.
  • Delete an event, with the safeguards described below.

Time zones, handled deliberately

  • Every timestamp is converted to the configured zone with zoneinfo. Time strings are never sliced by character position.
  • Written events carry an explicit DTSTART;TZID=… plus a full VTIMEZONE block, so any calendar client reads them the same way.
  • The machine running the server is usually on UTC; that never leaks into the answers, and the zone actually used is named in every response, so a mistake is visible instead of silent.

Built for an assistant to drive

  • Responses are plain readable text with the event uid included, so an edit or delete can follow a listing directly.
  • create_event requires an explicit calendar: people keep several calendars for different purposes, and an event silently filed into the wrong one is an event that is lost. The assistant is expected to ask rather than guess.
  • Errors come back as sentences explaining what to do next, not stack traces.

Requirements

  • Python 3.10 or newer (3.13 tested)
  • A Yandex app password, not the account password: https://id.yandex.ru/security/app-passwords → application type "Календарь (CalDAV)"
pip install -r requirements.txt

tzdata is in the requirements on purpose: slim Linux images often ship without a time zone database, and ZoneInfo("Europe/Moscow") then fails.

Configuration

All settings come from environment variables.

Variable Required Default Meaning
YANDEX_USERNAME yes name@yandex.ru
YANDEX_PASSWORD yes app password
YANDEX_CALDAV_URL no https://caldav.yandex.ru CalDAV endpoint
YANDEX_TIMEZONE no Europe/Moscow IANA zone for all input and output
YANDEX_TRASH_DIR no <project>/trash where copies of changed and deleted events are kept
YANDEX_ORGANIZER no value of YANDEX_USERNAME address that appears as the meeting organizer in invitations

The server speaks MCP over stdio. Example client configuration is in examples/.

Tools

Tool What it does
list_events events for a period; defaults to today; expands recurrences
list_calendars calendar names and URLs
create_event create an event, one-off or recurring, with attendees; calendar is required
update_event move, rename, change location or description, add or remove attendees; one day of a series or the whole series
delete_event delete an event; one day of a series or the whole series

Deleting is irreversible — what protects you

  1. Title check. delete_event takes both the uid and the event title. They are compared; on mismatch nothing is deleted and the response names both titles and the calendar. A stale or confused uid is the realistic way to destroy the wrong event, and this is what catches it.
  2. Trash. Before every delete and every update, the full original event is written to YANDEX_TRASH_DIR as a timestamped .ics file. If the copy cannot be written, the operation does not run at all. Recovery is importing that file back.
  3. Recurring series. Any edit or delete on a series has to say what it applies to: occurrence for one day, apply_to_series for the whole series. With neither, the tool refuses and explains the choice. This is what keeps "cancel Tuesday" from erasing a year of meetings.

Inviting people sends real email

Yandex advertises calendar-auto-schedule, so adding an attendee makes the server send an invitation, and removing one sends a cancellation. Neither can be recalled. This was verified end to end, not merely from the server's advertised capabilities: an invitation added through create_event arrived in the recipient's mailbox.

What follows from that:

  • Addresses are taken literally and validated. The server never derives an address from a name — an assistant that half-remembers a contact would otherwise email a stranger.
  • update_event adds and removes attendees instead of replacing the list, so answers already given by the others are preserved.
  • Every response lists exactly who is on the event and how they replied, so a wrong address is visible immediately.

An assistant driving this server should confirm the address list with its user before calling. Sending an invitation is not an undoable action.

Testing

python tests/write_cycle.py "Calendar name"

Self-cleaning rounds against a real calendar through the actual protocol. A one-off event: create → attempt to delete with a wrong title (must be refused) → move and rename → confirm it appears in the listing → delete → confirm it is gone. A three-occurrence series: edit one day, delete one day, delete the whole series, checking each time that exactly one day changed. If a delete fails, the leftover event's uid is printed instead of being silently left behind.

The attendee round only runs when an address is passed explicitly, because it sends real email:

python tests/write_cycle.py "Calendar name" someone@example.com

tests/probe.jsonl is a set of raw protocol messages for checking the handshake and read path:

python src/server.py < tests/probe.jsonl

Known limitations

  • All-day events can be created, but their time cannot be moved.
  • Recurrence rules are created in their common forms (every day / week / month / year, with a count or an end date). More elaborate rules — "every second Tuesday", weekday sets — are read and expanded correctly but cannot be created through the tool.
  • Reminders and alarms are not handled.
  • Attendees are always invited as required participants; optional attendees and per-attendee roles are not exposed.
  • Verified against Yandex Calendar only. Other CalDAV servers are likely to work but are untested.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选