
Cratis Chronicle
io.github.Cratis由 GitHub 帳號 Cratis 發布v2.1.0更新於 Nov 4, 2026
Inspect Cratis Chronicle event stores read-only by default; opt-in, authorized job control.
概覽
將 AI 助理連線到執行中的 Cratis Chronicle 事件溯源資料庫,用來檢視事件存放區、事件、觀察器與作業,並起草 Chronicle 構件。
- 可以做什麼
- 列出並檢視事件存放區、命名空間、事件類型、觀察器、投影、讀取模型及讀取模型執行個體
- 讀取事件序列中的事件,取得尾端序號、學習到的模式、維護建議與伺服器版本
- 列出作業與作業步驟,並在授權的 Mutation 設定下停止、恢復或刪除作業
- 描述系統與事件類型結構,依需求執行臨時投影,解釋因果鏈路
- 建議後續事件類型、產生讀取模型與投影、稽核未被消費的事件類型、產生事件目錄
- 提供描述系統、建議事件類型與查詢系統的內建提示詞
- 適用情境
- 適用於使用 Cratis Chronicle 事件存放區的情境:希望助理探索領域模型、回答事件與觀察器相關問題、排查失敗分割區或作業,或依據真實結構起草讀取模型與事件類型。
- 執行需求
- 需要一個可從容器連線的執行中 Chronicle 伺服器;此伺服器以 Docker 映像形式透過 stdio 在本機執行。設定為選用,未設定時採用開發預設值。設定項以 CratisChronicleMcp__ 為前綴:ConnectionString、EventStore、Namespace、Profile、ClientId 與 ClientSecret,或改用 ApiKey。在 macOS 與 Windows 上透過 host.docker.internal 連線到主機。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Cratis Chronicle,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Chronicle.MCP
[Discord] [Docker] [Build] [Publish] [License: MIT]
The Chronicle MCP server connects an AI agent to a running Cratis Chronicle event-sourcing database over the Model Context Protocol. Point your agent at a Chronicle server and it can explore the domain, operate observers and jobs, and turn plain-language requests into Chronicle artifacts — always grounded in the store's real schema.
Because the server talks to Chronicle directly, it works no matter which Chronicle client language your application uses — .NET, TypeScript, Kotlin/Java, or Elixir. Any MCP-capable tool can use it. See the Documentation for the full guide.
Using
The Chronicle MCP server leverages Stdio and is packaged as a container. In your tool, configure it using that.
Releases are also listed in the official MCP Registry
as io.github.Cratis/chronicle-mcp, using the same versioned Docker Hub image.
The listing starts the server in the read-only profile; job control needs the
Mutation profile and an authorization policy.
Note: You must have a Chronicle server running.
Example: VSCode
In VSCode you would do this by adding a tool to your agent.
This can done either by adding it to the global user settings or through an mcp.json file in
the .vscode folder of your project.
For the global user settings, you simply do the following:
Note: To configure the connection string for Chronicle you pass it an environment variable;
Cratis__Chronicle__Mcp__ConnectionStringrunning locally - on MacOS and Windows the host machine is found athost.docker.internal.
For a local mcp.json file, its almost the same:
You can see this in action in the mcp.json in this repository.
Note: The
cratis/chronicle-mcpis a multi CPU architecture image supporting both x64 and arm64 automatically.
Configuration
Configuration is optional. The MCP server works out of the box with sensible defaults suitable for local development:
- Connection String:
chronicle://host.docker.internal:35000 - Credentials: Development client ID (
chronicle-dev-client) and secret (chronicle-dev-secret) - Profile:
ReadOnly— mutating tools are not listed or callable.
If you need to customize any settings, the MCP server can be configured entirely on its own and is also compatible with the Cratis CLI. For any value you do not set explicitly, the server resolves it in this order:
- Explicit MCP options (environment variables /
appsettings.json). - The
CHRONICLE_CONNECTION_STRINGenvironment variable. - The active context in the CLI configuration at
~/.cratis/config.json. - Built-in development defaults.
When client credentials are used, the server obtains and caches OAuth tokens in ~/.cratis/tokens,
the same location used by the CLI, so tokens are shared between the two.
All options live under the Cratis:Chronicle:Mcp configuration section. As environment variables
they use the Cratis__Chronicle__Mcp__ prefix:
Job control requires the Mutation profile and a matching grant for the deployment principal, store, namespace, operation, and job ID. A connection string or Chronicle credentials alone never enable mutations. Keep credentials in environment variables or a secret store, never in server.json or a committed appsettings.json. See Deployment profiles for policy examples and denial codes.
Prompts / Tools
The server exposes the following tools. Every tool defaults the event store and namespace to the configured defaults when you do not specify them, so you can ask high-level questions and only mention a store or namespace when you need a specific one.
The tools come in two complementary sets: operate-side tools for inspecting and operating a live store, and design-time tools that turn natural language into Chronicle artifacts grounded in the store's real schema. See the Documentation folder for a full guide, and How it works for the split.
Operate-side
Design-time
The server also exposes MCP prompts — describe_system, suggest_next_event_types, and query_system — that package these workflows for clients that surface prompts (for example as slash commands).
You can ask it things like:
- List all event stores
- List all event types in the [put name here] event store
- List all observers in the [put name here] event store and namespace [put namespace here]
- Show me the events in the [put name here] event store
- Are there any failed partitions?
- What observers in the [put event store name here] use event type [put event type name]
- List all jobs in the [put event store name here] event store
- Show me job [put job id here] in the [put namespace name here] namespace
- What steps does job [put job id here] have?
- Stop / Resume / Delete job [put job id here] (requires an authorized Mutation deployment)
And design-time questions like:
- Describe the system in [put event store here] — and tell me its story
- What event types should I introduce next for the system in [put event store here]?
- Show all [put concept here] with all details (runs an ad-hoc projection)
- Show me all the [put concept here] registered (scaffolds a read model + projection)
- What fields does the [put event type here] event have?
- What events are we writing that nothing reads?
- Give me a catalog of our [put area here] events and who reads them
- Why does [put entity here] show as [put state here]?
Local development
Using VSCode, the mcp.json in the .vscode folder of this repository is automatically supported.
Local development defaults to ReadOnly. Open it and click the Start button:
During development, compile and click the Restart button when having the mcp.json open:
Chronicle
To get Chronicle running, there is a docker-compose.yml file in the Source folder.
Simply do docker compose up -d and you'll have a Chronicle instance running.
If you want some data, we recommend using our samples and specifically the console to initialize it with some data.
The Cratis ecosystem
This project is part of Cratis — free, MIT-licensed tools for building event-sourced and CQRS applications.
- Chronicle — event-sourcing database and runtime. Orleans-based kernel, pluggable storage (MongoDB default; PostgreSQL, SQL Server, SQLite, in-memory), language-agnostic gRPC contracts. Docs
- Chronicle clients — first-class .NET SDK, plus TypeScript, Kotlin/Java, and Elixir; Python coming soon (pre-alpha). AI agents connect through the Chronicle MCP server (this repository).
- Arc — opinionated CQRS framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Works without event sourcing. Docs
- Components — React components aligned with Arc patterns. Docs
- CLI + Workbench — inspect and diagnose Chronicle from the terminal or the browser. Docs
- Model-first layer (experimental) — Studio, Screenplay, Stage, Scene, Prologue
- Supporting — Fundamentals, Specifications, Synopsis, Lens, Narrator, and free AI tooling (preview); Ensemble coming soon (pre-release)
- Samples — runnable event sourcing and CQRS samples for the whole stack
Everything Cratis publishes today is MIT licensed and free to use.
來源:README.md,提交 c3aead3
工具
0版本歷史
2- v2.1.0最新Nov 4, 2026
- v2.0.0Oct 9, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分