[build-system] requires = ["setuptools>=68.0"] build-backend = "setuptools.build_meta" [project] name = "yantrikdb-mcp" version = "0.24.0" description = "YantrikDB — Cognitive memory for AI agents. Persistent semantic recall, knowledge graph, contradiction detection, and procedural learning. Ships as embeddable engine, network database, or MCP server." readme = "README.md" license = "MIT" requires-python = ">=3.10" authors = [ { name = "Pranab Sarkar", email = "developer@pranab.co.in" }, ] keywords = [ "mcp", "mcp-server", "model-context-protocol", "agent-memory", "ai-memory", "llm-memory", "cognitive-memory", "persistent-memory", "ai-agents", "agent-skills", "skill-substrate", "knowledge-graph", "vector-database", "embeddings", "semantic-search", "claude", "claude-code", "cursor", "windsurf", "anthropic", "sqlite", "rust", "python", ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dependencies = [ # Engine v0.7.17+ pins the cumulative-fix set the MCP server is tested # against. Prior pins held loose at v0.7.15+; v0.8.2 tightens to # v0.7.17 to align the release train with yantrikdb-server v0.8.17 # (shipped 2026-05-18, which carries engine v0.7.17). Required fixes # since v0.7.8: # - v0.7.8: idempotent migration runner (yantrikdb#10) — fixes the # v14→v15 "Cannot add a column to a view" failure that bricked # first-restart for every pre-v0.7 database. # - v0.7.9: potion-multilingual-128M added to the embedder registry. # - v0.7.13 + v0.7.15: multilingual extractor + the restored # extract call site (yantrikdb#15, #26). Pre-0.7.15 the multilingual # download silently produced an empty cache dir. # - v0.7.16: v26 schema migration foundation (additive, replay-safe). # - v0.7.17: db.reembed() — atomic engine-side embedder migration. # Not exposed as an MCP tool in v0.8.x; surfaces in a later version. # D3 compatibility firewall: bound to the tested minor line. # `>=0.9.0` alone admitted any future breaking release (which is exactly # how v0.9.0/v0.9.1 shipped broken against engine signature drift — see # the correct()/set_embedder_named regressions). The range widens only # after a new engine minor is added to CI and contract-tested. # v0.10.0 (engine tag 9bbcd8e, cross-validated on the release train): # typed exceptions, record(idempotency_key=), recall excludes superseded # by default, correct(new_text) re-embeds in place (was refused), # record_text/record_batch ns-normalization. # v0.11.x (PyPI 0.11.3, cross-validated): the PACK substrate — signed, # portable memory bundles. Adds install/mount/uninstall_pack, seal/ # sign_pack, read_pack_manifest, trust_publisher family, embedder_identity/ # adopt_embedder_identity, and three typed errors (PackAlreadyMounted, # PackEmbedderMismatch, PackSignatureInvalid). Purely ADDITIVE over 0.10 — # the full v0.10 gate stays green on 0.11.3 (verified before widening). # The range widens to <0.12.0 ONLY because 0.11 is now feature-probed by # tests/test_v011_engine_contract_cases.py. # The PIN IS A BACKSTOP — the behavioral gates are the feature-probed # contract suites (test_v010_/test_v011_engine_contract_cases.py) + # tests/test_mcp_semantic_contract.py. # v0.12.0 (cross-validated): time-travel recall — recall_as_of(as_of, ...) # returns the substrate as it was known at a past instant, and seal_pack # gains recommended_top_k / recommended_min_similarity so a publisher can # sign retrieval settings into a pack manifest. Purely ADDITIVE over 0.11: # the full v0.10 + v0.11 gates stay green on 0.12.0 (verified BEFORE # widening). Range widens to <0.13.0 only because 0.12 is now feature-probed # by tests/test_v012_engine_contract_cases.py. # v0.13.x (PyPI 0.13.4, cross-validated): NO methods removed, but it # carries the most dangerous kind of change this train has seen — a # DEFAULT THAT FLIPPED. recall(expand_entities=) went True -> False. # Nothing raises, signatures still accept the same args, and every test # stays green; recall just quietly returns different results for anyone # relying on the default. This package is insulated because tools.recall() # declares its own default and passes it explicitly — now PINNED by # tests/test_v013_engine_contract_cases.py so a refactor can't drop it. # Additive: recall(snippets=, min_score_ratio=), recall_text(explain=), # detect_embedder_window(), oplog_plaintext_rows(), rechunk_long_records(). # Range widens to <0.14.0 only because 0.13 is now feature-probed. # v0.14.0 (cross-validated): core's ledger flags a COMPILE BREAK on # RecordInput (Rust). That break does NOT reach this package: adding a # field to a Rust struct breaks exhaustive struct-literal construction in # RUST callers (yantrikdb-server), while Python crosses the pyo3 boundary # with dicts and simply doesn't set the new key. Verified, not assumed — # tests/test_v014_engine_contract_cases.py round-trips the exact dict # shape tools.remember() builds. "Compile break" in a ledger is a # per-LANGUAGE claim, not a per-consumer one. # Python-side delta is additive: record/record_text gain created_at= # (backdating, now surfaced as remember(created_at=)) and get_memory() # arrives as an alias of get(). Range widens to <0.15.0 only because 0.14 # is now feature-probed. # v0.14.1 is the FLOOR, not merely allowed — the first time this package # has raised a lower bound for a CORRECTNESS reason rather than to reach a # feature. 0.14.0 and earlier return wrong results specifically through # THIS server, and only through it: # - The entity stoplist compared case-SENSITIVELY against capitalized # forms, so "At" was stripped while "AT" survived and became an entity. # tokenize() lowercases it, so the phantom entity matched EVERY query # containing the word "at". Likewise THE, DID, and June. # - Graph proximity was ADDITIVE (0.30 floor), which no similarity below # 0.86 could overcome. Now scaled to 0.125 — graph may reverse at most # a 12.5% similarity gap, the same ceiling freshness gets. # These were invisible to core's benchmark because expand_entities defaults # to FALSE in the engine and this server turns it ON. Reproduced on a # 5,027-record production store: "encryption at rest and key rotation" # returned a REAL-ESTATE TAX ANALYSIS at cosine 0.0346, joined by # "claims_match: AT -acquired-> 25 (anchor AT)". On 0.14.1 that record is # gone from the top 5 and every phantom anchor with it. # Ranking DOES move — that is the point — so the floor is safe here only # because our cases gate on feature probes, never on golden orderings # (265 passed unchanged against 0.14.1). # v0.18.0 REQUIRES >=0.15.0: think(maintenance_cycle, dry_run) now # forwards dry_run to the binding, and pre-0.15 engines have no such # parameter — the call raises TypeError there BY DESIGN (a "preview" # must never silently run wet; that exact incident tombstoned 13 live # records on the production store). The recall/think field forwarding # in this release likewise lands on an engine that actually reads the # fields. 266 passed against the published 0.15.0 wheel. # v0.19.3 raises the floor to 0.15.4 for a LICENSE reason, the first time # this pin has moved for something other than behavior. Engine 0.15.3 and # earlier are AGPL-3.0-only; 0.15.4 is the first Apache-2.0 release # (2026-08-18, on both crates.io and PyPI). This package is MIT, so a floor # that still admits an AGPL engine makes "permissively licensed end to end" # true only by luck of resolution order. 0.15.4 is behavior-identical to # 0.15.3 — the relicense carried no code change. "yantrikdb>=0.15.4,<0.24.0", # D3 firewall, same rule as the engine pin above — and for the same # reason, learned the same way. `mcp[cli]>=1.2.0` was UNBOUNDED, so the # day the SDK shipped 2.0.0 it removed `mcp.server.fastmcp` and every # fresh `pip install yantrikdb-mcp` produced a server that dies on # import: # ModuleNotFoundError: No module named 'mcp.server.fastmcp' # Caught by CI on the v0.11.0 release PR (#18), but it had ALREADY # broken the published v0.10.0 for new installs — an unbounded pin on a # hard runtime dependency is a release that silently re-ships itself # every time upstream cuts a major. # v0.12.0 WIDENS to <3.0.0: the 2.x import surface is now ported behind # `yantrikdb_mcp._compat`, and BOTH lines are exercised in CI (publish.yml # runs the unit suite against mcp 1.x and mcp 2.x). The ceiling stays — # it moves to the next major only when that major is actually tested, # never speculatively. "mcp[cli]>=1.2.0,<3.0.0", "click>=8.0.0", "requests>=2.28.0", ] [project.optional-dependencies] # Legacy / higher-quality embedder: ONNX MiniLM-L6-v2 at 384 dim. # Required for back-compat with DBs created by yantrikdb-mcp <=0.5.3. # Auto-detected when an existing 384-dim DB is opened. onnx = [ "onnxruntime>=1.17.0", "tokenizers>=0.15.0", "huggingface-hub>=0.20.0", "numpy>=1.24.0", ] dev = [ "pytest>=8.0", ] torch = ["sentence-transformers>=3.0.0"] [project.scripts] yantrikdb-mcp = "yantrikdb_mcp:main" [project.urls] Homepage = "https://yantrikdb.com" Repository = "https://github.com/yantrikos/yantrikdb-mcp" Documentation = "https://yantrikdb.com/guides/mcp/" Issues = "https://github.com/yantrikos/yantrikdb-mcp/issues" [tool.setuptools.packages.find] where = ["src"] [tool.pytest.ini_options] testpaths = ["tests"]