Group E — Cargo workspace hygiene (post-audit 2026-05-02).
Workspace dependency inheritance:
- 40+ member crates migrated from inline dep pinning to { workspace = true }.
Was: every crate redeclared clap/serde/rusqlite/tokio/etc inline, defeating
the [workspace.dependencies] SSoT and forcing N edits per upgrade.
Authoritative pins now live solely in _primitives/_rust/Cargo.toml.
Major version splits resolved:
- dashmap: 5 vs 6 (kei-cortex/kei-gateway) -> 6 in workspace
- tower: 0.4 vs 0.5 (kei-cortex/kei-forge) -> 0.5 in workspace
- notify: 6 vs 8 (kei-projects-watcher/kei-watch+kei-skills) -> 8 in workspace
- thiserror: 1 vs 2 (workspace/keisei) -> kept 1; keisei downgraded
Closed: dual-major compilation = wasted build time + ABI mismatch risk
at trait boundaries.
Profile / orphan cleanup:
- kei-changelog/Cargo.toml: deleted [profile.release] block (workspace member
profiles are silently ignored by Cargo since 1.0).
- kei-brain-view/Cargo.toml: removed dangling "[workspace] table stripped on
merge" comment (orphan from prior decomposition).
rust-version SSoT:
- 27+ member crates migrated from inline rust-version = "1.75" to
rust-version.workspace = true. Workspace declares 1.77; the inline 1.75 pins
were stale and misleading (with resolver 2 the workspace MSRV won anyway).
cargo check --workspace: clean (only pre-existing sqlx-postgres future-incompat
warning + frustration-matrix dead-code warning, neither introduced by this change).
Note: _assembler/ lives outside _primitives/_rust workspace, so its Cargo.toml
was not touched here. Remaining edition-2024 question for _assembler is a
separate decision.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| README.md | ||
kei-mcp — Model Context Protocol server
kei-mcp exposes the KeiSeiKit atom registry over the Model Context
Protocol so MCP-aware clients (Claude
Code, Cline, OpenClaw, etc.) can discover and call our 13 atoms + N
primitives as MCP tools, and read our skills as MCP resources.
What you get
- Tools — every atom in
_primitives/_rust/*/atoms/*.mdbecomes one MCP tool. Tool name is the atom's full id (<crate>::<verb>), the description is the first paragraph of the atom's body, and the input schema is the JSON-Schema referenced by the atom's frontmatter. - Resources — every
skills/<name>/SKILL.mdbecomes one MCP resource atskill://<name>returning the SKILL.md text on read. - Prompts — placeholder list (empty) for now.
Wire format
JSON-RPC 2.0 over stdio, line-delimited (one request per line, one response per line). stdout carries protocol frames ONLY; everything else (diagnostics, warnings) goes to stderr.
Supported methods: initialize, tools/list, tools/call,
resources/list, resources/read, prompts/list, prompts/get.
Build
cargo build -p kei-mcp --release
# binary: target/release/kei-mcp
Configuration (env)
| Variable | Default | What it does |
|---|---|---|
KEI_MCP_ATOMS_ROOT |
_primitives/_rust |
Where to walk for <crate>/atoms/*.md |
KEI_MCP_SKILLS_ROOT |
skills |
Where to walk for <name>/SKILL.md |
KEI_RUNTIME_BIN_DIR |
(unset) | Resolve <crate> binaries here before falling back to $PATH |
Register with Claude Code
Add to ~/.claude/mcp_servers.json:
{
"kei": {
"command": "/absolute/path/to/kei-mcp",
"args": [],
"env": {
"KEI_MCP_ATOMS_ROOT": "/absolute/path/to/KeiSeiKit/_primitives/_rust",
"KEI_MCP_SKILLS_ROOT": "/absolute/path/to/KeiSeiKit/skills",
"KEI_RUNTIME_BIN_DIR": "/absolute/path/to/KeiSeiKit/_primitives/_rust/target/release"
}
}
}
Register with Cline
Edit Cline's cline_mcp_settings.json (open via Cline: Edit MCP Settings from the command palette):
{
"mcpServers": {
"kei": {
"command": "/absolute/path/to/kei-mcp",
"args": [],
"env": {
"KEI_MCP_ATOMS_ROOT": "/absolute/path/to/KeiSeiKit/_primitives/_rust",
"KEI_MCP_SKILLS_ROOT": "/absolute/path/to/KeiSeiKit/skills"
}
}
}
}
Register with OpenClaw
Add to ~/.openclaw/mcp.json:
{
"servers": {
"kei": {
"command": "/absolute/path/to/kei-mcp",
"args": [],
"env": {
"KEI_MCP_ATOMS_ROOT": "/absolute/path/to/KeiSeiKit/_primitives/_rust",
"KEI_MCP_SKILLS_ROOT": "/absolute/path/to/KeiSeiKit/skills"
}
}
}
}
Manual smoke test
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05"}}' \
| ./kei-mcp
You should see one line of JSON on stdout containing serverInfo.name: "kei-mcp".