mcpField
K
kairos-lang-mcp

kairos-lang-mcp

Local
kairos-lang.orgDeveloper Tools0Updated 5d ago

About kairos-lang-mcp

kairos-lang-mcp is an MCP server for users and AI clients working with Kairos schedule definitions. It deterministically lists schedule occurrences, finds upcoming dates, validates definitions, and provides descriptor reference material.

Key features

  1. 01List occurrences in a date range
  2. 02Find the next schedule occurrences
  3. 03Validate schedule definitions
  4. 04Look up descriptor references
  5. 05Expose language reference resources

Use cases

  1. 01Check schedule dates across a specified interval
  2. 02Get the next dates for a schedule
  3. 03Diagnose invalid schedule definitions

MCP support

The server communicates with MCP clients over stdio and exposes four tools for listing, next occurrences, validation, and reference lookup. It also provides language overview and descriptor reference resources.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"azathothx-kairos-lang": {
"command": "npx",
"args": [
"-y",
"kairos-lang-mcp"
]
}
}
}
Run commandnpx -y kairos-lang-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmkairos-lang-mcp1.0.12

Tools

4

Saved tool list · updated 5d ago

ParameterTypeRequiredDescription
tostringYesEnd of the range, YYYY-MM-DD (exclusive).
tzstringYesIANA time zone for labels and the [from, to) endpoints, e.g. "Asia/Tokyo". Required.
fromstringYesStart of the range, YYYY-MM-DD (inclusive).
sourcestringYesThe Kairos definition text (premise + body expressions). Up to 64 KB.
supplyobjectNoStatic bundle resolving external() bindings: {binding | "premise.binding": {dates: ["YYYY-MM-DD", …] | instants: [epoch ms, …], covering, asof [, labels]}} — see https://kairos-lang.org/schema/supply.schema.json
explainbooleanNoAlso return results[].stages: per-stage point counts and intermediate values (the counterpart of a SQL execution plan).

Details

From the project README

kairos-lang-mcp

決めたら、いつでも。
Write the rule once; list the dates.

An MCP server for Kairos, the schedule definition language (https://kairos-lang.org). It lets an AI client evaluate a schedule definition deterministically — every firing in a range, or the next N — validate a definition, and read the descriptor reference.

The server is a thin wrapper over the reference implementation's CLI: the tools return exactly what kairos list --json / kairos next --json print (the CliReport, schema at https://kairos-lang.org/schema/cli-report.schema.json). Points are epoch milliseconds and are the identity; dates are one-to-one civil labels. Out-of-coverage intervals come back as annotations, never as silently dropped points.

日本語: README.ja.md

Install

Listed in the official MCP Registry as io.github.azathothx/kairos-lang-mcp (https://registry.modelcontextprotocol.io — clients that read the registry can install it by that name).

Node.js 20 or later. The server speaks MCP over stdio.

npx -y kairos-lang-mcp          # start on stdio (what an MCP client runs for you)
npx -y kairos-lang-mcp --version

Claude Code

claude mcp add kairos-lang -- npx -y kairos-lang-mcp

Claude Desktop (claude_desktop_config.json) and other stdio clients:

{
  "mcpServers": {
    "kairos-lang": { "command": "npx", "args": ["-y", "kairos-lang-mcp"] }
  }
}

Tools

toolinputoutput
kairos_listsource, from, to, tz, supply?, explain?CliReport for [from, to) — all firings, interval annotations, coverage summary
kairos_nextsource, tz, from? (default: today in tz), n? (default 1), horizonYears? (default 10), supply?, explain?CliReport for the next n firings; found < requested means fewer than n exist within the horizon (the CLI's exit code 2)
kairos_validatesource, tz, supply?{ok, version, diagnostics: [{kind, message}], expressions} — lexing, syntax, static rules and premise resolution, without evaluating a range
kairos_referenceword, lang?the reference page for one descriptor (roll, within, nth, segmentBy, …; README lists them)

Resources: kairos://llms.txt (the language overview for AI readers) and kairos://reference/{ja|en}/{word} (the same pages as kairos_reference).

tz is required

The CLI defaults to the machine's time zone; an AI caller has no machine, so every evaluating tool takes tz (an IANA name such as Asia/Tokyo). It decides how labels and the [from, to) endpoints are read. If the definition's premise declares tz:, evaluation uses that zone — tz still labels the output.

Recommended practice: define your premise once and keep it. A premise names the calendar system, the zone, the week start and the holiday tables:

premise JP {
  calendar-system: Gregorian; tz: "Asia/Tokyo"; wkst: Mon
  national = [2026-01-01, 2026-01-12, 2026-02-11, 2026-02-23, 2026-03-20, 2026-04-29, 2026-05-03..2026-05-06,
              2026-07-20, 2026-08-11, 2026-09-21..2026-09-23, 2026-10-12, 2026-11-03, 2026-11-23] covering: 2026..2026
  satSun = everyDay |> filter(d => weekday(d) == Sat or weekday(d) == Sun)
  bizDay = everyDay \ (satSun | national)
}

@JP
everyDay |> within(month) |> last |> roll(Preceding, on: bizDay)

Keeping that text next to your schedules turns tacit knowledge ("our business days") into explicit knowledge that every call reuses — and the covering: clause makes the table's expiry visible in the output (runwayDays) instead of letting it rot silently.

Supply

supply resolves external(kind: dates | instants) bindings with a static bundle, exactly like the CLI's --supply: { "binding" | "Premise.binding": { "dates": ["YYYY-MM-DD", …] | "instants": [ms, …], "covering": "2026-01-01..2026-12-31", "asof": "2026-10-01" } } — schema at https://kairos-lang.org/schema/supply.schema.json.

Errors

Errors are returned as data, not as protocol errors, so the model can read and fix them. kairos_list / kairos_next: {command, version, error: {kind: "usage" | "supply" | "static", message}} with isError: true. kairos_validate: {ok: false, version, diagnostics: [{kind, message}]} (a finding, not an error — no isError). kairos_reference: {error: {kind: "usage", message}, words} with isError: true for an unknown descriptor. usage is the shape of the call (bad zone, window over 10 years, source over 64 KB), supply a violation of the supply contract, static anything the language reports about the definition (lexing, syntax, static rules, evaluation). Diagnostics are in Japanese — the reference implementation's canonical output language; the report itself is language-neutral JSON (the same as the CLI's --json). The spec in English (https://kairos-lang.org/en/spec/) defines what each diagnostic means.

Limits

Evaluation window at most 10 years; n at most 1000; horizonYears at most 10; source at most 64 KB. These guard against accidents, not against adversaries.

Name

This package is kairos-lang-mcp — the MCP server for the schedule definition language at https://kairos-lang.org. It is unrelated to other npm packages that carry the name Kairos (such as kairos-mcp or kairos-mcp-server), which serve other projects that happen to share the word.

Versioning

The server's version tracks kairos-lang (same number, same contract); it depends on kairos-lang for evaluation and on @modelcontextprotocol/sdk for the protocol.

License

Apache-2.0. The bundled reference pages and llms.txt are copies from the same repository as of this package's release; the latest are at https://kairos-lang.org/llms.txt and https://kairos-lang.org/en/reference/ .

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.