Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
Sync MCP server version with binary version
armand6c56b8fd917b
diff --git a/src/main.c b/src/main.cindex a58acdbbd..100e32da2 100644--- a/src/main.c+++ b/src/main.c@@ -521,6 +521,7 @@ int main(int argc, char **argv) {* below opens sqlite early), else sqlite3_config returns SQLITE_MISUSE and* the bind is silently ignored. No-op in the test build. */cbm_alloc_init();+ cbm_cli_set_version(CBM_VERSION);cbm_profile_init(); /* reads CBM_PROFILE env var, gates all prof macros *//* CBM_LOG_LEVEL support — distilled from #414 (closes #413). Apply before* the first log statement so the configured level governs all output. */diff --git a/src/mcp/mcp.c b/src/mcp/mcp.cindex 034e2e599..b6cd0075f 100644--- a/src/mcp/mcp.c+++ b/src/mcp/mcp.c@@ -657,7 +657,7 @@ char *cbm_mcp_initialize_response(const char *params_json) {yyjson_mut_val *impl = yyjson_mut_obj(doc);yyjson_mut_obj_add_str(doc, impl, "name", "codebase-memory-mcp");- yyjson_mut_obj_add_str(doc, impl, "version", "0.10.0");+ yyjson_mut_obj_add_str(doc, impl, "version", cbm_cli_get_version());yyjson_mut_obj_add_val(doc, root, "serverInfo", impl);yyjson_mut_val *caps = yyjson_mut_obj(doc);diff --git a/tests/test_mcp.c b/tests/test_mcp.cindex d3bfbe65a..056eb44d8 100644--- a/tests/test_mcp.c+++ b/tests/test_mcp.c@@ -7,6 +7,7 @@#include "../src/foundation/compat_fs.h" /* cbm_unlink / cbm_rmdir */#include "../src/foundation/log.h"#include "test_framework.h"+#include <cli/cli.h>#include <mcp/mcp.h>#include <store/store.h>#include <yyjson/yyjson.h>@@ -146,10 +147,13 @@ TEST(jsonrpc_format_error) {* ══════════════════════════════════════════════════════════════════ */TEST(mcp_initialize_response) {+ cbm_cli_set_version("9.8.7-test");+/* Default (no params): returns latest supported version */char *json = cbm_mcp_initialize_response(NULL);ASSERT_NOT_NULL(json);ASSERT_NOT_NULL(strstr(json, "codebase-memory-mcp"));+ ASSERT_NOT_NULL(strstr(json, "\"version\":\"9.8.7-test\""));ASSERT_NOT_NULL(strstr(json, "capabilities"));ASSERT_NOT_NULL(strstr(json, "tools"));ASSERT_NOT_NULL(strstr(json, "\"listChanged\":false"));@@ -172,6 +176,7 @@ TEST(mcp_initialize_response) {ASSERT_NOT_NULL(json);ASSERT_NOT_NULL(strstr(json, "2025-11-25"));free(json);+ cbm_cli_set_version("dev");PASS();}