session-collab-mcp 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.ts +35 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "session-collab-mcp",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "MCP server for Claude Code session collaboration - prevents conflicts between parallel sessions",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.ts CHANGED
@@ -40,6 +40,39 @@ function jsonRpcResponse(id: number | string | null, result: unknown): string {
40
40
  return JSON.stringify({ jsonrpc: '2.0', id, result });
41
41
  }
42
42
 
43
+ // Server instructions for Claude
44
+ const SERVER_INSTRUCTIONS = `
45
+ # Session Collaboration
46
+
47
+ This MCP server coordinates multiple Claude Code sessions working on the same codebase.
48
+
49
+ ## Required Behaviors
50
+
51
+ 1. **On conversation start**: Immediately call \`collab_session_start\` with:
52
+ - project_root: Current working directory
53
+ - name: Descriptive session name (e.g., "feature-auth", "bugfix-api")
54
+
55
+ 2. **Before editing any file**: Call \`collab_check\` with the file path to verify no conflicts
56
+
57
+ 3. **If conflicts detected**:
58
+ - Show warning to user
59
+ - Ask if they want to proceed or coordinate
60
+ - Consider using \`collab_message_send\` to notify other session
61
+
62
+ 4. **For significant changes**: Call \`collab_claim\` before starting work on files
63
+
64
+ 5. **When done with files**: Call \`collab_release\` to free them for others
65
+
66
+ 6. **On conversation end**: Call \`collab_session_end\` to clean up
67
+
68
+ ## Best Practices
69
+
70
+ - Claim files early, release when done
71
+ - Use descriptive intents when claiming (e.g., "Refactoring auth module")
72
+ - Check for messages periodically with \`collab_message_list\`
73
+ - Record architectural decisions with \`collab_decision_add\`
74
+ `.trim();
75
+
43
76
  function jsonRpcError(id: number | string | null, code: number, message: string): string {
44
77
  return JSON.stringify({ jsonrpc: '2.0', id, error: { code, message } });
45
78
  }
@@ -86,8 +119,9 @@ async function main(): Promise<void> {
86
119
  },
87
120
  serverInfo: {
88
121
  name: 'session-collab-mcp',
89
- version: '0.3.0',
122
+ version: '0.4.4',
90
123
  },
124
+ instructions: SERVER_INSTRUCTIONS,
91
125
  });
92
126
  console.log(response);
93
127
  break;