Skip to content

Commit e09f271

Browse files
committed
Fix Windows bulk test + dual MCP config location + CONTRIBUTING.md
- Bulk test: use cbm_tmpdir() instead of hardcoded /tmp/ (fixes Windows/MSYS2 where /tmp/ doesn't resolve for SQLite) - Install: write MCP config to both ~/.claude/.mcp.json (Claude Code <=2.1.x) and ~/.claude.json (Claude Code >=2.1.80). Fixes #69. - Uninstall: remove from both locations - CONTRIBUTING.md: rewrite for pure C project (was still describing Go, causing contributors to submit Go PRs) - Fix clang-format in mcp.c protocol version negotiation (PR #79 merge)
1 parent de42777 commit e09f271

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

src/cli/cli.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2188,14 +2188,23 @@ int cbm_cmd_install(int argc, char **argv) {
21882188
printf(" removed old monolithic skill\n");
21892189
}
21902190

2191-
/* MCP config (.mcp.json) */
2191+
/* MCP config — write to both locations for compatibility.
2192+
* Claude Code <=2.1.x reads ~/.claude/.mcp.json
2193+
* Claude Code >=2.1.80 reads ~/.claude.json */
21922194
char mcp_path[1024];
21932195
snprintf(mcp_path, sizeof(mcp_path), "%s/.claude/.mcp.json", home);
21942196
if (!dry_run) {
21952197
cbm_install_editor_mcp(self_path, mcp_path);
21962198
}
21972199
printf(" mcp: %s\n", mcp_path);
21982200

2201+
char mcp_path2[1024];
2202+
snprintf(mcp_path2, sizeof(mcp_path2), "%s/.claude.json", home);
2203+
if (!dry_run) {
2204+
cbm_install_editor_mcp(self_path, mcp_path2);
2205+
}
2206+
printf(" mcp: %s\n", mcp_path2);
2207+
21992208
/* PreToolUse hook */
22002209
char settings_path[1024];
22012210
snprintf(settings_path, sizeof(settings_path), "%s/.claude/settings.json", home);
@@ -2403,6 +2412,13 @@ int cbm_cmd_uninstall(int argc, char **argv) {
24032412
}
24042413
printf(" removed MCP config entry\n");
24052414

2415+
/* Also remove from new location (Claude Code >=2.1.80) */
2416+
char mcp_path2[1024];
2417+
snprintf(mcp_path2, sizeof(mcp_path2), "%s/.claude.json", home);
2418+
if (!dry_run) {
2419+
cbm_remove_editor_mcp(mcp_path2);
2420+
}
2421+
24062422
char settings_path[1024];
24072423
snprintf(settings_path, sizeof(settings_path), "%s/.claude/settings.json", home);
24082424
if (!dry_run) {

tests/test_store_bulk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
#include "test_framework.h"
1616
#include <store/store.h>
17+
#include <foundation/compat.h>
1718
#include <sqlite3.h>
1819
#include <stdio.h>
1920
#include <stdlib.h>
@@ -43,7 +44,7 @@ static char *get_journal_mode(const char *db_path) {
4344
}
4445

4546
static void make_temp_path(char *buf, size_t n) {
46-
snprintf(buf, n, "/tmp/cmm_bulk_test_%d.db", (int)getpid());
47+
snprintf(buf, n, "%s/cmm_bulk_test_%d.db", cbm_tmpdir(), (int)getpid());
4748
}
4849

4950
static void cleanup_db(const char *path) {

0 commit comments

Comments
 (0)