Shared memory and context tools for agentic work.
Code Rooms
[package]
name = "m1nd-mcp"
version = "1.6.3"
edition = "2021"
description = "Local MCP runtime for coding agents: structural retrieval, change reasoning, document grounding, and continuity."
license = "MIT"
keywords = ["mcp", "mcp-server", "code-graph", "agent", "ai"]
categories = ["development-tools", "command-line-utilities"]
repository = "https://github.com/maxkle1nz/m1nd"
include = [
"src/**",
"build.rs",
"ui_bundle_support.rs",
"ui-dist/**",
"ui-package.json",
]
[features]
# `embed` is ON by default so the shipped server has semantic recall out of the
# box. Build a lean, embeddings-free binary with `--no-default-features --features serve`.
default = ["serve", "embed"]
serve = ["dep:axum", "dep:tower-http", "dep:rust-embed", "dep:mime_guess", "dep:tokio-stream", "dep:futures", "dep:reqwest"]
# Real local static embeddings in `seek` (semantic recall by meaning), forwarded
# to m1nd-core. The model (~29 MB, model2vec/potion-base-8M) is fetched on first
# use and cached; if it cannot load, `seek` falls back to trigram matching
# (graceful — no hard failure).
embed = ["m1nd-core/embed"]
[dependencies]
m1nd-control = { path = "../m1nd-control", version = "0.2.1" }
m1nd-core = { path = "../m1nd-core", version = "1.6.3" }
m1nd-ingest = { path = "../m1nd-ingest", version = "1.6.3" }
serde = { workspace = true }
serde_json = { workspace = true }
parking_lot = { workspace = true }
tokio = { version = "1", features = ["io-std", "rt-multi-thread", "macros", "signal", "sync", "time"] }
clap = { version = "4", features = ["derive"] }
regex = "1"
glob = "0.3"
notify = "8.2"
sysinfo = { version = "0.39", default-features = false, features = ["system"] }
# Letter ids are `sha256(raw line bytes)[0..12]` (MEDULLA-PRD §9.2): stable and
# machine-independent by construction, so git-traveled boxes dedup across
# machines. DefaultHasher (SipHash) is NOT cross-version/platform stable, which
# would break that contract. sha2 is already in Cargo.lock transitively —
# declaring it direct adds NO new crate to the build graph.
sha2 = "0.11"
# Tree-sitter, declared direct ONLY so the `transplant` verb can recover an item's
# TRUE extent (closing-brace line) by PARSING instead of counting braces (which a
# `}` inside a string/char literal or macro body corrupts). These exact versions are
# already in the build graph via m1nd-ingest's default (tier2) features, so declaring
# them here adds NO new crate to Cargo.lock — the same reuse pattern as sha2/libc.
tree-sitter = "0.26"
tree-sitter-rust = "0.24"
# HTTP server (behind "serve" feature)
axum = { version = "0.8", optional = true }
tower-http = { version = "0.6", features = ["cors", "fs", "compression-gzip"], optional = true }
rust-embed = { version = "8", optional = true }
mime_guess = { version = "2", optional = true }
tokio-stream = { version = "0.1", features = ["sync"], optional = true }
futures = { version = "0.3", optional = true }
reqwest = { version = "0.13", features = ["json", "stream"], optional = true }
# NOT optional: `external_mutation_service` is compiled unconditionally (`lib.rs`,
# ungated) and mints its scan-job ids with `getrandom::fill`. The other three
# callers — http_security, http_server, mcp_http — ARE behind `serve`, which is
# why this read as a serve-only dep for so long. `--workspace` unifies features,
# so CI never built m1nd-mcp without `serve` and never saw the break.
getrandom = { version = "0.4" }
# Already present transitively (via sysinfo/tokio); declared directly ONLY to call
# `libc::flock` for the per-slug supersession lock (see light_author_handlers.rs).
# Reuses the exact already-locked version — no new crate enters the build graph or
# Cargo.lock. Unix-only; Windows uses the reviewed native primitive below.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61.2", features = [
"Wdk_Foundation",
"Wdk_Storage_FileSystem",
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_IO",
] }
# macOS Secure Enclave custody floor (amendment G9-A1). The production
# SecureEnclaveKeyStore adapter (enclave_authority.rs) provisions and signs P-256
# keys through Security.framework. Declared here as the custody supply-chain
# surface; both crates are already in Cargo.lock transitively (via reqwest/rustls
# platform verification), so this adds no new crate to the build graph. Pinned to
# an exact version because this is a security-custody surface.
# NOTE: the kSecAccessControl flag values are hand-rolled (1<<30 private-key-usage,
# 1<<0 user-presence) because the high-level crate does not export them; the
# owner's live ceremony must run the documented conformance check that a
# provisioned key actually carries those access-control semantics.
# security-framework-sys is pulled in for the exact Keychain attribute constants
# (kSecAttrTokenID/kSecAttrKeyType/kSecAttrKeySizeInBits) the enclave `open`/
# provision read back via SecKeyCopyAttributes; the high-level crate does not
# re-export them. It is the same version security-framework already depends on and
# is already in Cargo.lock, so this adds no crate and does not move the lockfile.
# The OSX_10_15 feature is REQUIRED, not cosmetic: Secure Enclave keys can only be
# made permanent in the data-protection keychain, and both `Location::Data-
# ProtectionKeychain` (provision) and `kSecUseDataProtectionKeychain` (the
# `ignore_legacy_keychains` query scope) are gated behind it. It enables only
# security-framework-sys/OSX_10_15, itself an empty cfg-only feature — no new crate,
# no lockfile move. Persisting into that keychain also requires the calling binary
# to be codesigned with a KeychainAccessGroups entitlement (owner ceremony).
[target.'cfg(target_os = "macos")'.dependencies]
security-framework = { version = "=3.7.0", features = ["OSX_10_15"] }
security-framework-sys = "=2.17.0"
core-foundation = "=0.10.1"
[build-dependencies]
[[bin]]
path = "src/main.rs"
[dev-dependencies]
ed25519-dalek = { version = "3", default-features = false, features = ["alloc"] }
# TEST-ONLY P-256 signing for custody-floor fixtures (offline receipt verifier,
# enclave-crypto mock). Production m1nd-mcp gains NO p256 dependency: every P-256
# signature is verified through m1nd-control's verifier. Already in Cargo.lock via
# m1nd-control, so this adds NO new crate to the build graph.
p256 = { version = "0.14", default-features = false, features = ["ecdsa", "std"] }
# `socket2` lets tests bind an ephemeral loopback port WITHOUT listening on it, so
# the owner-alive guard's port can be reserved-closed without a live listener that a
# parallel test could collide with (see the `closed_port` helpers).
socket2 = "0.6"
tempfile = "3.27.0"
tokio-test = "0.4"
tower = { version = "0.5", features = ["util"] }
# Property-based testing for the transplant harness (dev only). Generates small
# random crates and asserts the verb either moves cleanly or refuses honestly —
# never corrupts. Bounded case counts keep it fast.
proptest = "1"