
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 分