Kremis
MCP server exposing a deterministic, local knowledge graph over stdio. Zero LLM calls in the bridge; answers are classified as Fact, Inference, or Unknown and persisted in redb (ACID, BLAKE3-hashed).
README
<p align="center"> <img src="docs/logo/icon.svg" alt="Kremis" width="120" height="120"> </p>
<h1 align="center">Kremis</h1>
<p align="center"> <strong>A deterministic knowledge graph MCP server. Local, single binary, no LLM in the loop.</strong> </p>
<p align="center"> A minimal, graph-based cognitive substrate in Rust.<br> Records, associates, retrieves — but never invents. </p>
<p align="center"> <a href="https://github.com/TyKolt/kremis/actions/workflows/ci.yml"><img src="https://github.com/TyKolt/kremis/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://crates.io/crates/kremis-core"><img src="https://img.shields.io/crates/v/kremis-core.svg" alt="crates.io"></a> <a href="https://kremis.mintlify.app"><img src="https://img.shields.io/badge/docs-mintlify-0D9373.svg" alt="Docs"></a> <a href="https://dev.to/tykolt/i-spent-months-trying-to-stop-llm-hallucinations-prompt-engineering-wasnt-enough-so-i-wrote-a-4872"><img src="https://img.shields.io/badge/story-dev.to-0A0A0A.svg" alt="Background & Story"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License"></a> <a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/rust-1.89%2B-orange.svg" alt="Rust"></a> <img src="https://img.shields.io/badge/status-alpha-orange" alt="Status"> </p>
Alpha — Functional and tested. Breaking changes may still occur before v1.0.
<p align="center"> <img src="assets/demo.svg" alt="Kremis Honesty Demo" width="800"> </p>
Why Kremis
| Problem | How Kremis addresses it |
|---|---|
| Hallucination | Every result traces back to a real ingested signal. Missing data returns explicit "not found" — never fabricated |
| Opacity | Fully inspectable graph state. No hidden layers, no black box |
| Lack of grounding | Zero pre-loaded knowledge. All structure emerges from real signals, not assumptions |
| Non-determinism | Same input, same output. No randomness, no floating-point arithmetic in core |
| Data loss | ACID transactions via redb embedded database. Crash-safe by design |
Design Philosophy — why these constraints exist.
Features
- Deterministic graph engine — Pure Rust, no async in core, no floating-point. Same input always produces the same output
- CLI + HTTP API + MCP bridge — Three interfaces to the same engine: terminal, REST, and AI assistants
- BLAKE3 hashing — Cryptographic hash of the full graph state for integrity verification at any point
- Canonical export (KREX) — Deterministic binary snapshot for provenance, audit trails, and reproducibility
- Zero baked-in knowledge — Kremis starts empty. Every node comes from a real signal
- ACID persistence — Default
redbbackend with crash-safe transactions
Use Cases
AI agent memory via MCP
Give Claude, Cursor, or any MCP-compatible assistant a verifiable memory layer. Kremis stores facts as graph nodes — the agent queries them, and every answer traces back to a real data point. No embeddings, no probabilistic retrieval.
LLM fact-checking
Ingest your data, let an LLM generate claims, then validate each claim against the graph. Kremis labels every statement as [FACT] or [NOT IN GRAPH] — no confidence scores, no ambiguity.
Provenance and audit trail
Export the full graph as a deterministic binary snapshot, compute its BLAKE3 hash, and verify integrity at any point. Every node links to the signal that created it. Useful for compliance workflows where you need to prove what data was present and when.
Honesty Demo
Ingest a few facts, let an LLM generate claims, and Kremis validates each one:
[FACT] Alice is an engineer. ← Kremis: "engineer"
[FACT] Alice works on the Kremis project. ← Kremis: "Kremis"
[FACT] Alice knows Bob. ← Kremis: "Bob"
[NOT IN GRAPH] Alice holds a PhD from MIT. ← Kremis: None
[NOT IN GRAPH] Alice previously worked at DeepMind. ← Kremis: None
[NOT IN GRAPH] Alice manages a team of 8. ← Kremis: None
Confirmed by graph: 3/6
Not in graph: 3/6
Three facts grounded. Three fabricated. No ambiguity.
python examples/demo_honesty.py # mock LLM (no external deps)
python examples/demo_honesty.py --ollama # real LLM via Ollama
Quick Start
Requires Rust 1.89+ and Cargo.
git clone https://github.com/TyKolt/kremis.git
cd kremis
cargo build --release
cargo test --workspace
cargo run -p kremis -- init # initialize database
cargo run -p kremis -- ingest -f examples/sample_signals.json -t json # ingest sample data
cargo run -p kremis -- server # start HTTP server
In a second terminal:
curl http://localhost:8080/health
curl -X POST http://localhost:8080/query \
-H "Content-Type: application/json" \
-d '{"type":"lookup","entity_id":1}'
Note: CLI commands and the HTTP server cannot run simultaneously (
redbholds an exclusive lock). Stop the server before using CLI commands.
Docker
docker build -t kremis .
# MCP server (default) — pipe MCP stdio JSON-RPC; suitable for any MCP client
docker run -i --rm kremis
# HTTP API only — override the entrypoint
docker run -d -p 8080:8080 -v kremis-data:/data \
--entrypoint kremis kremis server -H 0.0.0.0 -D /data/kremis.db
Architecture
| Component | Description |
|---|---|
| kremis-core | Deterministic graph engine (pure Rust, no async) |
| apps/kremis | HTTP server + CLI (tokio, axum, clap) |
| apps/kremis-mcp | MCP server bridge for AI assistants (rmcp, stdio) |
See the architecture docs for internals: data flow, storage backends, algorithms, export formats.
Documentation
Full reference at kremis.mintlify.app:
| Topic | Link |
|---|---|
| Introduction | kremis.mintlify.app/introduction |
| Installation | kremis.mintlify.app/installation |
| Quick Start | kremis.mintlify.app/quickstart |
| Configuration | kremis.mintlify.app/configuration |
| CLI Reference | kremis.mintlify.app/cli/overview |
| API Reference | kremis.mintlify.app/api/overview |
| MCP Server | kremis.mintlify.app/mcp/overview |
| Philosophy | kremis.mintlify.app/philosophy |
Testing
cargo test --workspace
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
<!-- BENCHMARK-START -->
Benchmarks
Auto-generated on CI runners — 2026-05-10.
| Operation | Linux | Windows | macOS |
|---|---|---|---|
| Node insertion (100K) | 20.97 ms | 18.89 ms | 17.31 ms |
| Signal ingestion (10K batch) | 7.23 ms | 8.42 ms | 9.54 ms |
| Graph traversal (depth 50, 1K nodes) | 2.6 µs | 3.3 µs | 2.0 µs |
| Strongest path (1K nodes) | 7.5 µs | 8.9 µs | 5.8 µs |
| Canonical export (1K nodes) | 68.2 µs | 76.4 µs | 52.0 µs |
| Canonical import (10K nodes) | 3.09 ms | 3.59 ms | 3.17 ms |
| Redb node insertion (1K) | 367.17 ms | 9.5 s | 345.79 ms |
| <!-- BENCHMARK-END --> |
License
The brand assets in docs/logo/ (logo, icon, favicon) are proprietary and not covered by the Apache 2.0 license. See docs/logo/LICENSE.
Contributing
See CONTRIBUTING.md for guidelines. The architecture is still evolving — open an issue before submitting a PR.
Acknowledgments
This project was developed with AI assistance.
<p align="center"> <strong>Keep it minimal. Keep it deterministic. Keep it grounded. Keep it honest.</strong> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。