KeiSeiKit-1.0/_primitives/_rust/kei-mcp
Parfii-bot fc03c98408 chore: author email + Cargo metadata SSoT (parfionovich@keilab.io)
Two related changes:

1. Author email update across the kit
   - All `info@greendragon.info` references replaced with `parfionovich@keilab.io`
   - Touched: NOTICE, README.md, _ts_packages/package.json (and 5 adapter packages),
     plus 90+ Cargo.toml files
   - Apache-2.0 attribution unchanged (Denis Parfionovich, 2026)

2. Cargo workspace.package SSoT for author/license/repository/homepage
   - Added to [workspace.package]:
     authors    = ["Denis Parfionovich <parfionovich@keilab.io>"]
     license    = "Apache-2.0"
     repository = "https://github.com/KeiSei84/KeiSeiKit-1.0"
     homepage   = "https://github.com/KeiSei84/KeiSeiKit-1.0"
   - All ~89 member crates migrated from inline declarations to:
     authors.workspace    = true
     license.workspace    = true
     (repository/homepage where applicable)
   - Closes audit gap: kei-graph-stream, kei-cortex, kei-shared previously had no
     license field at the crate level, blocking `cargo publish` on those.
     Now they inherit Apache-2.0 from workspace.
   - kei-scheduler/Cargo.toml: removed stray duplicate `authors` line introduced
     by an earlier migration sweep.

cargo check --workspace: clean. No code changes; metadata-only migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 13:55:28 +08:00
..
src KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
tests KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
Cargo.toml chore: author email + Cargo metadata SSoT (parfionovich@keilab.io) 2026-05-03 13:55:28 +08:00
README.md KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00

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/*.md becomes 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.md becomes one MCP resource at skill://<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".