@teambit/cli-mcp-server 0.0.37 → 0.0.39
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.
- package/README.docs.mdx +72 -2
- package/dist/README.docs.mdx +72 -2
- package/dist/cli-mcp-server.main.runtime.js +8 -2
- package/dist/cli-mcp-server.main.runtime.js.map +1 -1
- package/dist/{preview-1751991212508.js → preview-1752165050741.js} +1 -1
- package/dist/rules-cmd.js +10 -3
- package/dist/rules-cmd.js.map +1 -1
- package/dist/setup-cmd.js +8 -3
- package/dist/setup-cmd.js.map +1 -1
- package/dist/setup-utils.d.ts +16 -0
- package/dist/setup-utils.js +109 -0
- package/dist/setup-utils.js.map +1 -1
- package/package.json +4 -4
package/README.docs.mdx
CHANGED
|
@@ -50,7 +50,7 @@ This will automatically configure your VS Code settings to use the Bit MCP serve
|
|
|
50
50
|
The **recommended way** to integrate the MCP server with your IDE is using the `setup` command:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
bit mcp-server setup [vscode|cursor|windsurf] [options]
|
|
53
|
+
bit mcp-server setup [vscode|cursor|windsurf|roo|cline|claude-code] [options]
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
This command automatically configures the MCP server settings in your chosen editor. If no editor is specified, it defaults to VS Code.
|
|
@@ -60,6 +60,9 @@ This command automatically configures the MCP server settings in your chosen edi
|
|
|
60
60
|
- **VS Code**: `bit mcp-server setup vscode` (or just `bit mcp-server setup`)
|
|
61
61
|
- **Cursor**: `bit mcp-server setup cursor`
|
|
62
62
|
- **Windsurf**: `bit mcp-server setup windsurf`
|
|
63
|
+
- **Roo Code**: `bit mcp-server setup roo`
|
|
64
|
+
- **Cline**: `bit mcp-server setup cline`
|
|
65
|
+
- **Claude Code**: `bit mcp-server setup claude-code`
|
|
63
66
|
|
|
64
67
|
#### Configuration Options
|
|
65
68
|
|
|
@@ -78,6 +81,12 @@ bit mcp-server setup cursor --global
|
|
|
78
81
|
|
|
79
82
|
# Setup with consumer project mode
|
|
80
83
|
bit mcp-server setup --consumer-project
|
|
84
|
+
|
|
85
|
+
# Setup for Claude Code (creates .mcp.json file)
|
|
86
|
+
bit mcp-server setup claude-code
|
|
87
|
+
|
|
88
|
+
# Global setup for Claude Code
|
|
89
|
+
bit mcp-server setup claude-code --global
|
|
81
90
|
```
|
|
82
91
|
|
|
83
92
|
#### Manual Configuration
|
|
@@ -120,6 +129,59 @@ If you need to manually configure the settings, here's how to set up VS Code MCP
|
|
|
120
129
|
}
|
|
121
130
|
```
|
|
122
131
|
|
|
132
|
+
#### Claude Code Setup
|
|
133
|
+
|
|
134
|
+
Claude Code uses `.mcp.json` files for MCP server configuration. The setup command creates these files automatically:
|
|
135
|
+
|
|
136
|
+
**Workspace Configuration:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
bit mcp-server setup claude-code
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This creates a `.mcp.json` file in your project root:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"bit": {
|
|
148
|
+
"command": "bit",
|
|
149
|
+
"args": ["mcp-server", "start"]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Global Configuration:**
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
bit mcp-server setup claude-code --global
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
This creates/updates the global configuration file:
|
|
162
|
+
|
|
163
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
164
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
165
|
+
- **Linux**: `~/.config/claude/claude_desktop_config.json`
|
|
166
|
+
|
|
167
|
+
**Important**: After setup, restart Claude Code for the MCP server to be available.
|
|
168
|
+
|
|
169
|
+
**Claude Code Rules:**
|
|
170
|
+
|
|
171
|
+
To provide Bit-specific guidance to Claude Code, use the rules command:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
bit mcp-server rules claude-code
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
This creates `.claude/bit.md` with Bit instructions. To integrate with your existing `CLAUDE.md`, add:
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
@.claude/bit.md
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This approach ensures your existing `CLAUDE.md` file is never overwritten.
|
|
184
|
+
|
|
123
185
|
### Programmatic Usage
|
|
124
186
|
|
|
125
187
|
```javascript
|
|
@@ -206,7 +268,7 @@ bit mcp-server start --consumer-project --include-additional "deps,get,preview"
|
|
|
206
268
|
The MCP server provides a `rules` command to create instruction files for AI assistants:
|
|
207
269
|
|
|
208
270
|
```bash
|
|
209
|
-
bit mcp-server rules [vscode|cursor|windsurf|cline] [options]
|
|
271
|
+
bit mcp-server rules [vscode|cursor|windsurf|roo|cline|claude-code] [options]
|
|
210
272
|
```
|
|
211
273
|
|
|
212
274
|
This command creates rules/instructions markdown files that provide guidance to AI assistants on how to effectively use the Bit MCP server and follow best practices when working with Bit components.
|
|
@@ -216,7 +278,9 @@ This command creates rules/instructions markdown files that provide guidance to
|
|
|
216
278
|
- **VS Code**: `bit mcp-server rules vscode` (or just `bit mcp-server rules`)
|
|
217
279
|
- **Cursor**: `bit mcp-server rules cursor`
|
|
218
280
|
- **Windsurf**: `bit mcp-server rules windsurf`
|
|
281
|
+
- **Roo Code**: `bit mcp-server rules roo`
|
|
219
282
|
- **Cline**: `bit mcp-server rules cline`
|
|
283
|
+
- **Claude Code**: `bit mcp-server rules claude-code`
|
|
220
284
|
|
|
221
285
|
#### Configuration Options
|
|
222
286
|
|
|
@@ -236,6 +300,12 @@ bit mcp-server rules cursor --global
|
|
|
236
300
|
# Consumer project rules for VS Code
|
|
237
301
|
bit mcp-server rules --consumer-project
|
|
238
302
|
|
|
303
|
+
# Claude Code rules (creates .claude/bit.md)
|
|
304
|
+
bit mcp-server rules claude-code
|
|
305
|
+
|
|
306
|
+
# Global Claude Code rules
|
|
307
|
+
bit mcp-server rules claude-code --global
|
|
308
|
+
|
|
239
309
|
# Global rules for Cline (macOS only)
|
|
240
310
|
bit mcp-server rules cline --global
|
|
241
311
|
|
package/dist/README.docs.mdx
CHANGED
|
@@ -50,7 +50,7 @@ This will automatically configure your VS Code settings to use the Bit MCP serve
|
|
|
50
50
|
The **recommended way** to integrate the MCP server with your IDE is using the `setup` command:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
bit mcp-server setup [vscode|cursor|windsurf] [options]
|
|
53
|
+
bit mcp-server setup [vscode|cursor|windsurf|roo|cline|claude-code] [options]
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
This command automatically configures the MCP server settings in your chosen editor. If no editor is specified, it defaults to VS Code.
|
|
@@ -60,6 +60,9 @@ This command automatically configures the MCP server settings in your chosen edi
|
|
|
60
60
|
- **VS Code**: `bit mcp-server setup vscode` (or just `bit mcp-server setup`)
|
|
61
61
|
- **Cursor**: `bit mcp-server setup cursor`
|
|
62
62
|
- **Windsurf**: `bit mcp-server setup windsurf`
|
|
63
|
+
- **Roo Code**: `bit mcp-server setup roo`
|
|
64
|
+
- **Cline**: `bit mcp-server setup cline`
|
|
65
|
+
- **Claude Code**: `bit mcp-server setup claude-code`
|
|
63
66
|
|
|
64
67
|
#### Configuration Options
|
|
65
68
|
|
|
@@ -78,6 +81,12 @@ bit mcp-server setup cursor --global
|
|
|
78
81
|
|
|
79
82
|
# Setup with consumer project mode
|
|
80
83
|
bit mcp-server setup --consumer-project
|
|
84
|
+
|
|
85
|
+
# Setup for Claude Code (creates .mcp.json file)
|
|
86
|
+
bit mcp-server setup claude-code
|
|
87
|
+
|
|
88
|
+
# Global setup for Claude Code
|
|
89
|
+
bit mcp-server setup claude-code --global
|
|
81
90
|
```
|
|
82
91
|
|
|
83
92
|
#### Manual Configuration
|
|
@@ -120,6 +129,59 @@ If you need to manually configure the settings, here's how to set up VS Code MCP
|
|
|
120
129
|
}
|
|
121
130
|
```
|
|
122
131
|
|
|
132
|
+
#### Claude Code Setup
|
|
133
|
+
|
|
134
|
+
Claude Code uses `.mcp.json` files for MCP server configuration. The setup command creates these files automatically:
|
|
135
|
+
|
|
136
|
+
**Workspace Configuration:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
bit mcp-server setup claude-code
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This creates a `.mcp.json` file in your project root:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"bit": {
|
|
148
|
+
"command": "bit",
|
|
149
|
+
"args": ["mcp-server", "start"]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Global Configuration:**
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
bit mcp-server setup claude-code --global
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
This creates/updates the global configuration file:
|
|
162
|
+
|
|
163
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
164
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
165
|
+
- **Linux**: `~/.config/claude/claude_desktop_config.json`
|
|
166
|
+
|
|
167
|
+
**Important**: After setup, restart Claude Code for the MCP server to be available.
|
|
168
|
+
|
|
169
|
+
**Claude Code Rules:**
|
|
170
|
+
|
|
171
|
+
To provide Bit-specific guidance to Claude Code, use the rules command:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
bit mcp-server rules claude-code
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
This creates `.claude/bit.md` with Bit instructions. To integrate with your existing `CLAUDE.md`, add:
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
@.claude/bit.md
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This approach ensures your existing `CLAUDE.md` file is never overwritten.
|
|
184
|
+
|
|
123
185
|
### Programmatic Usage
|
|
124
186
|
|
|
125
187
|
```javascript
|
|
@@ -206,7 +268,7 @@ bit mcp-server start --consumer-project --include-additional "deps,get,preview"
|
|
|
206
268
|
The MCP server provides a `rules` command to create instruction files for AI assistants:
|
|
207
269
|
|
|
208
270
|
```bash
|
|
209
|
-
bit mcp-server rules [vscode|cursor|windsurf|cline] [options]
|
|
271
|
+
bit mcp-server rules [vscode|cursor|windsurf|roo|cline|claude-code] [options]
|
|
210
272
|
```
|
|
211
273
|
|
|
212
274
|
This command creates rules/instructions markdown files that provide guidance to AI assistants on how to effectively use the Bit MCP server and follow best practices when working with Bit components.
|
|
@@ -216,7 +278,9 @@ This command creates rules/instructions markdown files that provide guidance to
|
|
|
216
278
|
- **VS Code**: `bit mcp-server rules vscode` (or just `bit mcp-server rules`)
|
|
217
279
|
- **Cursor**: `bit mcp-server rules cursor`
|
|
218
280
|
- **Windsurf**: `bit mcp-server rules windsurf`
|
|
281
|
+
- **Roo Code**: `bit mcp-server rules roo`
|
|
219
282
|
- **Cline**: `bit mcp-server rules cline`
|
|
283
|
+
- **Claude Code**: `bit mcp-server rules claude-code`
|
|
220
284
|
|
|
221
285
|
#### Configuration Options
|
|
222
286
|
|
|
@@ -236,6 +300,12 @@ bit mcp-server rules cursor --global
|
|
|
236
300
|
# Consumer project rules for VS Code
|
|
237
301
|
bit mcp-server rules --consumer-project
|
|
238
302
|
|
|
303
|
+
# Claude Code rules (creates .claude/bit.md)
|
|
304
|
+
bit mcp-server rules claude-code
|
|
305
|
+
|
|
306
|
+
# Global Claude Code rules
|
|
307
|
+
bit mcp-server rules claude-code --global
|
|
308
|
+
|
|
239
309
|
# Global rules for Cline (macOS only)
|
|
240
310
|
bit mcp-server rules cline --global
|
|
241
311
|
|
|
@@ -1171,11 +1171,13 @@ class CliMcpServerMain {
|
|
|
1171
1171
|
return _setupUtils().McpSetupUtils.getRooCodeSettingsPath(isGlobal, workspaceDir);
|
|
1172
1172
|
} else if (editorLower === 'cline') {
|
|
1173
1173
|
return _setupUtils().McpSetupUtils.getClinePromptsPath(isGlobal, workspaceDir);
|
|
1174
|
+
} else if (editorLower === 'claude-code') {
|
|
1175
|
+
return _setupUtils().McpSetupUtils.getClaudeCodeSettingsPath(isGlobal, workspaceDir);
|
|
1174
1176
|
}
|
|
1175
1177
|
throw new Error(`Editor "${editor}" is not supported yet.`);
|
|
1176
1178
|
}
|
|
1177
1179
|
async setupEditor(editor, options, workspaceDir) {
|
|
1178
|
-
const supportedEditors = ['vscode', 'cursor', 'windsurf', 'roo', 'cline'];
|
|
1180
|
+
const supportedEditors = ['vscode', 'cursor', 'windsurf', 'roo', 'cline', 'claude-code'];
|
|
1179
1181
|
const editorLower = editor.toLowerCase();
|
|
1180
1182
|
if (!supportedEditors.includes(editorLower)) {
|
|
1181
1183
|
throw new Error(`Editor "${editor}" is not supported yet. Currently supported: ${supportedEditors.join(', ')}`);
|
|
@@ -1198,10 +1200,12 @@ class CliMcpServerMain {
|
|
|
1198
1200
|
// Cline doesn't need MCP server setup, only rules files
|
|
1199
1201
|
// This is a no-op but we include it for consistency
|
|
1200
1202
|
// Users should use the 'rules' command to set up Cline instructions
|
|
1203
|
+
} else if (editorLower === 'claude-code') {
|
|
1204
|
+
await _setupUtils().McpSetupUtils.setupClaudeCode(setupOptions);
|
|
1201
1205
|
}
|
|
1202
1206
|
}
|
|
1203
1207
|
async writeRulesFile(editor, options, workspaceDir) {
|
|
1204
|
-
const supportedEditors = ['vscode', 'cursor', 'roo', 'cline'];
|
|
1208
|
+
const supportedEditors = ['vscode', 'cursor', 'roo', 'cline', 'claude-code'];
|
|
1205
1209
|
const editorLower = editor.toLowerCase();
|
|
1206
1210
|
if (!supportedEditors.includes(editorLower)) {
|
|
1207
1211
|
throw new Error(`Editor "${editor}" is not supported yet. Currently supported: ${supportedEditors.join(', ')}`);
|
|
@@ -1220,6 +1224,8 @@ class CliMcpServerMain {
|
|
|
1220
1224
|
await _setupUtils().McpSetupUtils.writeRooCodeRules(rulesOptions);
|
|
1221
1225
|
} else if (editorLower === 'cline') {
|
|
1222
1226
|
await _setupUtils().McpSetupUtils.writeClineRules(rulesOptions);
|
|
1227
|
+
} else if (editorLower === 'claude-code') {
|
|
1228
|
+
await _setupUtils().McpSetupUtils.writeClaudeCodeRules(rulesOptions);
|
|
1223
1229
|
}
|
|
1224
1230
|
}
|
|
1225
1231
|
async getRulesContent(consumerProject = false) {
|