@teambit/cli-mcp-server 0.0.0-1ed79eba7ca236740e6158efa8a6f27425ecaa11
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 +250 -0
- package/bit-rules-consumer-template.md +11 -0
- package/bit-rules-template.md +115 -0
- package/dist/README.docs.mdx +250 -0
- package/dist/bit-rules-consumer-template.md +11 -0
- package/dist/bit-rules-template.md +115 -0
- package/dist/cli-mcp-server.aspect.d.ts +2 -0
- package/dist/cli-mcp-server.aspect.js +18 -0
- package/dist/cli-mcp-server.aspect.js.map +1 -0
- package/dist/cli-mcp-server.main.runtime.d.ts +93 -0
- package/dist/cli-mcp-server.main.runtime.js +1244 -0
- package/dist/cli-mcp-server.main.runtime.js.map +1 -0
- package/dist/cli-mcp-server.spec.d.ts +1 -0
- package/dist/cli-mcp-server.spec.js +632 -0
- package/dist/cli-mcp-server.spec.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server.cmd.d.ts +31 -0
- package/dist/mcp-server.cmd.js +53 -0
- package/dist/mcp-server.cmd.js.map +1 -0
- package/dist/preview-1752086972595.js +7 -0
- package/dist/rules-cmd.d.ts +20 -0
- package/dist/rules-cmd.js +62 -0
- package/dist/rules-cmd.js.map +1 -0
- package/dist/setup-cmd.d.ts +20 -0
- package/dist/setup-cmd.js +55 -0
- package/dist/setup-cmd.js.map +1 -0
- package/dist/setup-utils.d.ts +106 -0
- package/dist/setup-utils.js +504 -0
- package/dist/setup-utils.js.map +1 -0
- package/package.json +70 -0
- package/types/asset.d.ts +41 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_chai","data","require","_index","_stdio","_workspaceTesting","_componentTesting","_harmonyTesting","_fsExtra","_interopRequireDefault","_path","_cliMcpServer","e","__esModule","default","describe","timeout","workspaceData","mcpClient","workspacePath","before","mockWorkspace","mockComponents","after","destroyWorkspace","beforeEach","transport","StdioClientTransport","command","args","cwd","Client","name","version","capabilities","connect","afterEach","close","it","response","listTools","expect","tools","to","be","an","length","greaterThan","toolNames","map","tool","include","consumerProjectClient","not","have","lengthOf","result","callTool","arguments","queryStr","property","content","includeStatus","includeList","JSON","parse","text","firstComponentId","componentName","includeSchema","a","commands","firstCommand","extendedDescription","internal","subcommand","description","flags","json","fail","error","exist","mcpServer","loadAspect","CliMcpServerAspect","setupWorkspaceData","setupWorkspacePath","setupMcpServer","setupEditor","isGlobal","message","vscodeMcpPath","path","join","mcpExists","fs","pathExists","true","mcpConfig","readJson","servers","deep","equal","type","consumerProject","includeAdditional","cursorConfigPath","configExists","config","mcpServers","bit","windsurfConfigPath","rooConfigPath","ensureDir","dirname","writeJson"],"sources":["cli-mcp-server.spec.ts"],"sourcesContent":["/* eslint-disable import/extensions */\n/* eslint-disable import/no-unresolved */\n\nimport { expect } from 'chai';\nimport { Client } from '@modelcontextprotocol/sdk/client/index.js';\nimport { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';\nimport { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport { mockWorkspace, destroyWorkspace, WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport fs from 'fs-extra';\nimport path from 'path';\n\nimport { CliMcpServerAspect } from './cli-mcp-server.aspect';\nimport { CliMcpServerMain } from './cli-mcp-server.main.runtime';\n\ndescribe('CliMcpServer Integration Tests', function () {\n this.timeout(30000); // Increased timeout for MCP server operations\n\n let workspaceData: WorkspaceData;\n let mcpClient: Client;\n let workspacePath: string;\n\n before(async () => {\n // Set up mock workspace with components\n workspaceData = mockWorkspace();\n workspacePath = workspaceData.workspacePath;\n await mockComponents(workspacePath);\n });\n\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n\n beforeEach(async () => {\n // Create MCP client and connect directly to the MCP server command\n const transport = new StdioClientTransport({\n command: 'bit',\n args: ['mcp-server', 'start'],\n cwd: workspacePath,\n });\n\n mcpClient = new Client(\n {\n name: 'test-client',\n version: '1.0.0',\n },\n {\n capabilities: {},\n }\n );\n\n await mcpClient.connect(transport);\n });\n\n afterEach(async () => {\n // Clean up MCP client\n if (mcpClient) {\n await mcpClient.close();\n }\n });\n\n describe('MCP Server Protocol', () => {\n it('should list available tools', async () => {\n const response = await mcpClient.listTools();\n\n expect(response.tools).to.be.an('array');\n expect(response.tools.length).to.be.greaterThan(0);\n\n // Check for essential MCP tools\n const toolNames = response.tools.map((tool) => tool.name);\n expect(toolNames).to.include('bit_workspace_info');\n expect(toolNames).to.include('bit_component_details');\n expect(toolNames).to.include('bit_commands_list');\n expect(toolNames).to.include('bit_query');\n expect(toolNames).to.include('bit_execute');\n });\n });\n\n describe('Consumer Project Mode', () => {\n let consumerProjectClient: Client;\n\n beforeEach(async () => {\n // Create MCP client for consumer project mode\n const transport = new StdioClientTransport({\n command: 'bit',\n args: ['mcp-server', 'start', '--consumer-project'],\n cwd: workspacePath,\n });\n\n consumerProjectClient = new Client(\n {\n name: 'test-consumer-client',\n version: '1.0.0',\n },\n {\n capabilities: {},\n }\n );\n\n await consumerProjectClient.connect(transport);\n });\n\n afterEach(async () => {\n if (consumerProjectClient) {\n await consumerProjectClient.close();\n }\n });\n\n it('should only enable bit_remote_search and bit_remote_component_details tools', async () => {\n const response = await consumerProjectClient.listTools();\n\n expect(response.tools).to.be.an('array');\n\n const toolNames = response.tools.map((tool) => tool.name);\n\n // Should include only these two tools\n expect(toolNames).to.include('bit_remote_search');\n expect(toolNames).to.include('bit_remote_component_details');\n\n // Should NOT include these tools that are available in regular mode\n expect(toolNames).to.not.include('bit_workspace_info');\n expect(toolNames).to.not.include('bit_component_details');\n expect(toolNames).to.not.include('bit_commands_list');\n expect(toolNames).to.not.include('bit_command_help');\n expect(toolNames).to.not.include('bit_query');\n expect(toolNames).to.not.include('bit_execute');\n\n // Should NOT include the old separate tools\n expect(toolNames).to.not.include('bit_show');\n expect(toolNames).to.not.include('bit_schema');\n\n // Should have exactly 2 tools\n expect(toolNames).to.have.lengthOf(2);\n });\n\n it('should work with bit_remote_search tool', async () => {\n const result = (await consumerProjectClient.callTool({\n name: 'bit_remote_search',\n arguments: {\n queryStr: 'button',\n cwd: workspacePath,\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n });\n });\n\n describe('bit_workspace_info tool', () => {\n it('should get workspace information', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_workspace_info',\n arguments: {\n cwd: workspacePath,\n includeStatus: true,\n includeList: true,\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('status');\n expect(content).to.have.property('list');\n });\n\n it('should handle workspace info without optional parameters', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_workspace_info',\n arguments: {\n cwd: workspacePath,\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('status');\n });\n });\n\n describe('bit_component_details tool', () => {\n it('should get component details for an existing component', async () => {\n const firstComponentId = 'comp1';\n\n const result = (await mcpClient.callTool({\n name: 'bit_component_details',\n arguments: {\n cwd: workspacePath,\n componentName: firstComponentId,\n includeSchema: false,\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('id');\n expect(content).to.have.property('env');\n });\n\n it('should get component details with schema', async () => {\n const firstComponentId = 'comp1';\n\n const result = (await mcpClient.callTool({\n name: 'bit_component_details',\n arguments: {\n cwd: workspacePath,\n componentName: firstComponentId,\n includeSchema: true,\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('id');\n expect(content).to.have.property('publicAPI');\n });\n\n it('should handle non-existent component gracefully', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_component_details',\n arguments: {\n cwd: workspacePath,\n componentName: 'non-existent/component',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n // Should return error information or component details\n const content = (result.content[0] as any).text;\n expect(content).to.be.a('string');\n });\n });\n\n describe('bit_commands_list tool', () => {\n it('should get basic commands list', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_commands_list',\n arguments: {},\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('commands');\n expect(content.commands).to.be.an('array');\n expect(content.commands.length).to.be.greaterThan(0);\n\n // Check command structure\n const firstCommand = content.commands[0];\n expect(firstCommand).to.have.property('name');\n expect(firstCommand).to.have.property('description');\n });\n\n it('should get commands info with extended description', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_commands_list',\n arguments: {\n extendedDescription: true,\n internal: false,\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('commands');\n expect(content.commands).to.be.an('array');\n expect(content.commands.length).to.be.greaterThan(0);\n });\n });\n\n describe('bit_command_help tool', () => {\n it('should get help for a main command', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_command_help',\n arguments: {\n command: 'status',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('name', 'status');\n expect(content).to.have.property('description');\n expect(content).to.have.property('options');\n });\n\n it('should get help for lane switch subcommand (private command)', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_command_help',\n arguments: {\n command: 'lane',\n subcommand: 'switch',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('name', 'lane switch');\n expect(content).to.have.property('description');\n expect(content.description).to.include('switch to the specified lane');\n expect(content).to.have.property('arguments');\n expect(content.arguments).to.be.an('array');\n expect(content.arguments[0]).to.have.property('name', 'lane');\n expect(content.arguments[0]).to.have.property('description');\n });\n\n it('should get help for a subcommand that exists', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_command_help',\n arguments: {\n command: 'lane',\n subcommand: 'show',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = JSON.parse((result.content[0] as any).text);\n expect(content).to.have.property('name', 'lane show');\n expect(content).to.have.property('description');\n });\n\n it('should return error for non-existent command', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_command_help',\n arguments: {\n command: 'nonexistent',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = (result.content[0] as any).text;\n expect(content).to.include('Command not found: nonexistent');\n });\n\n it('should return error for non-existent subcommand', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_command_help',\n arguments: {\n command: 'lane',\n subcommand: 'nonexistent',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = (result.content[0] as any).text;\n expect(content).to.include('Command not found: lane nonexistent');\n });\n });\n\n describe('bit_query tool', () => {\n it('should execute read-only commands', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_query',\n arguments: {\n cwd: workspacePath,\n command: 'status',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n // Should return command output\n const content = (result.content[0] as any).text;\n expect(content).to.be.a('string');\n });\n\n it('should handle commands with arguments and flags', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_query',\n arguments: {\n cwd: workspacePath,\n command: 'list',\n args: [],\n flags: {\n json: true,\n },\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n const content = (result.content[0] as any).text;\n expect(content).to.be.a('string');\n });\n });\n\n describe('Error Handling', () => {\n it('should handle invalid tool calls gracefully', async () => {\n try {\n await mcpClient.callTool({\n name: 'non_existent_tool',\n arguments: {},\n });\n expect.fail('Should have thrown an error for non-existent tool');\n } catch (error) {\n expect(error).to.exist;\n }\n });\n\n it('should handle invalid workspace directory', async () => {\n const result = (await mcpClient.callTool({\n name: 'bit_workspace_info',\n arguments: {\n cwd: '/non/existent/path',\n },\n })) as CallToolResult;\n\n expect(result).to.have.property('content');\n expect(result.content).to.be.an('array');\n expect(result.content[0]).to.have.property('type', 'text');\n\n // Should return error information\n const content = (result.content[0] as any).text;\n expect(content).to.be.a('string');\n });\n });\n});\n\ndescribe('CliMcpServer Direct Aspect Tests', function () {\n this.timeout(30000);\n\n let workspaceData: WorkspaceData;\n let mcpServer: CliMcpServerMain;\n let workspacePath: string;\n\n before(async () => {\n // Set up mock workspace with components\n workspaceData = mockWorkspace();\n workspacePath = workspaceData.workspacePath;\n await mockComponents(workspacePath);\n\n // Load the aspect directly\n mcpServer = await loadAspect(CliMcpServerAspect, workspacePath);\n });\n\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n\n describe('Setup Editor Methods', () => {\n let setupWorkspaceData: WorkspaceData;\n let setupWorkspacePath: string;\n let setupMcpServer: CliMcpServerMain;\n\n beforeEach(async () => {\n // Create a separate mock workspace for setup testing\n setupWorkspaceData = mockWorkspace();\n setupWorkspacePath = setupWorkspaceData.workspacePath;\n await mockComponents(setupWorkspacePath);\n\n // Load the aspect for this workspace\n setupMcpServer = await loadAspect(CliMcpServerAspect, setupWorkspacePath);\n });\n\n afterEach(async () => {\n // Clean up the setup workspace\n if (setupWorkspaceData) {\n await destroyWorkspace(setupWorkspaceData);\n }\n });\n\n it('should handle unsupported editor gracefully', async () => {\n try {\n await mcpServer.setupEditor('unsupported-editor', {\n isGlobal: false,\n });\n expect.fail('Should have thrown an error for unsupported editor');\n } catch (error) {\n expect(error).to.exist;\n expect((error as Error).message).to.include('Editor \"unsupported-editor\" is not supported yet');\n expect((error as Error).message).to.include('Currently supported: vscode, cursor, windsurf, roo, cline');\n }\n });\n\n it('should setup VS Code integration directly', async () => {\n await setupMcpServer.setupEditor(\n 'vscode',\n {\n isGlobal: false,\n },\n setupWorkspacePath\n );\n\n // Verify that the mcp.json file was created in the workspace directory\n const vscodeMcpPath = path.join(setupWorkspacePath, '.vscode', 'mcp.json');\n const mcpExists = await fs.pathExists(vscodeMcpPath);\n expect(mcpExists).to.be.true;\n\n // Verify the content of the mcp.json file\n const mcpConfig = await fs.readJson(vscodeMcpPath);\n expect(mcpConfig).to.have.property('servers');\n expect(mcpConfig.servers).to.have.property('bit-cli');\n expect(mcpConfig.servers['bit-cli']).to.deep.equal({\n type: 'stdio',\n command: 'bit',\n args: ['mcp-server', 'start'],\n });\n });\n\n it('should setup VS Code integration with consumer project options', async () => {\n await setupMcpServer.setupEditor(\n 'vscode',\n {\n consumerProject: true,\n includeAdditional: 'status,list',\n isGlobal: false,\n },\n setupWorkspacePath\n );\n\n const vscodeMcpPath = path.join(setupWorkspacePath, '.vscode', 'mcp.json');\n const mcpConfig = await fs.readJson(vscodeMcpPath);\n\n expect(mcpConfig.servers['bit-cli'].args).to.include('--consumer-project');\n expect(mcpConfig.servers['bit-cli'].args).to.include('--include-additional');\n expect(mcpConfig.servers['bit-cli'].args).to.include('status,list');\n });\n\n it('should setup Cursor integration directly', async () => {\n await setupMcpServer.setupEditor(\n 'cursor',\n {\n isGlobal: false,\n },\n setupWorkspacePath\n );\n\n // Verify that the mcp.json file was created in the workspace directory\n const cursorConfigPath = path.join(setupWorkspacePath, '.cursor', 'mcp.json');\n const configExists = await fs.pathExists(cursorConfigPath);\n expect(configExists).to.be.true;\n\n // Verify the content of the config file\n const config = await fs.readJson(cursorConfigPath);\n expect(config).to.have.property('mcpServers');\n expect(config.mcpServers).to.have.property('bit');\n expect(config.mcpServers.bit).to.deep.equal({\n type: 'stdio',\n command: 'bit',\n args: ['mcp-server', 'start'],\n });\n });\n\n it('should setup Windsurf integration directly', async () => {\n await setupMcpServer.setupEditor(\n 'windsurf',\n {\n isGlobal: false,\n },\n setupWorkspacePath\n );\n\n // Verify that the mcp.json file was created in the workspace directory\n const windsurfConfigPath = path.join(setupWorkspacePath, '.windsurf', 'mcp.json');\n const configExists = await fs.pathExists(windsurfConfigPath);\n expect(configExists).to.be.true;\n\n // Verify the content of the config file\n const config = await fs.readJson(windsurfConfigPath);\n expect(config).to.have.property('mcpServers');\n expect(config.mcpServers).to.have.property('bit');\n expect(config.mcpServers.bit).to.deep.equal({\n type: 'stdio',\n command: 'bit',\n args: ['mcp-server', 'start'],\n });\n });\n\n it('should setup Roo Code integration directly', async () => {\n await setupMcpServer.setupEditor(\n 'roo',\n {\n isGlobal: false,\n },\n setupWorkspacePath\n );\n\n // Verify that the mcp.json file was created in the workspace directory\n const rooConfigPath = path.join(setupWorkspacePath, '.roo', 'mcp.json');\n const configExists = await fs.pathExists(rooConfigPath);\n expect(configExists).to.be.true;\n\n // Verify the content of the config file\n const config = await fs.readJson(rooConfigPath);\n expect(config).to.have.property('mcpServers');\n expect(config.mcpServers).to.have.property('bit');\n expect(config.mcpServers.bit).to.deep.equal({\n type: 'stdio',\n command: 'bit',\n args: ['mcp-server', 'start'],\n });\n });\n\n it('should throw error when trying to setup Roo Code globally', async () => {\n try {\n await setupMcpServer.setupEditor(\n 'roo',\n {\n isGlobal: true,\n },\n setupWorkspacePath\n );\n expect.fail('Should have thrown an error for global Roo Code setup');\n } catch (error) {\n expect(error).to.exist;\n expect((error as Error).message).to.include('Roo Code global configuration is not supported');\n expect((error as Error).message).to.include('VS Code internal storage that cannot be accessed');\n }\n });\n\n it('should merge with existing VS Code mcp.json config', async () => {\n // First, create existing MCP config\n const vscodeMcpPath = path.join(setupWorkspacePath, '.vscode', 'mcp.json');\n await fs.ensureDir(path.dirname(vscodeMcpPath));\n await fs.writeJson(vscodeMcpPath, {\n servers: {\n 'existing-server': {\n type: 'stdio',\n command: 'some-other-command',\n args: ['start'],\n },\n },\n });\n\n // Run setup\n await setupMcpServer.setupEditor(\n 'vscode',\n {\n isGlobal: false,\n },\n setupWorkspacePath\n );\n\n // Verify that existing MCP config is preserved and Bit config is added\n const mcpConfig = await fs.readJson(vscodeMcpPath);\n expect(mcpConfig.servers).to.have.property('existing-server');\n expect(mcpConfig.servers['existing-server']).to.deep.equal({\n type: 'stdio',\n command: 'some-other-command',\n args: ['start'],\n });\n expect(mcpConfig.servers).to.have.property('bit-cli');\n expect(mcpConfig.servers['bit-cli']).to.deep.equal({\n type: 'stdio',\n command: 'bit',\n args: ['mcp-server', 'start'],\n });\n });\n });\n});\n"],"mappings":";;AAGA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAA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C,iBAAiB,CAAC,CAAC,CAACzD,EAAE,CAAC0D,IAAI,CAACC,KAAK,CAAC;QACzDC,IAAI,EAAE,OAAO;QACb3E,OAAO,EAAE,oBAAoB;QAC7BC,IAAI,EAAE,CAAC,OAAO;MAChB,CAAC,CAAC;MACF,IAAAY,cAAM,EAACyD,SAAS,CAACE,OAAO,CAAC,CAACzD,EAAE,CAACW,IAAI,CAACM,QAAQ,CAAC,SAAS,CAAC;MACrD,IAAAnB,cAAM,EAACyD,SAAS,CAACE,OAAO,CAAC,SAAS,CAAC,CAAC,CAACzD,EAAE,CAAC0D,IAAI,CAACC,KAAK,CAAC;QACjDC,IAAI,EAAE,OAAO;QACb3E,OAAO,EAAE,KAAK;QACdC,IAAI,EAAE,CAAC,YAAY,EAAE,OAAO;MAC9B,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "CliMcpServerAspect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _cliMcpServer().CliMcpServerAspect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
function _cliMcpServer() {
|
|
14
|
+
const data = require("./cli-mcp-server.aspect");
|
|
15
|
+
_cliMcpServer = function () {
|
|
16
|
+
return data;
|
|
17
|
+
};
|
|
18
|
+
return data;
|
|
19
|
+
}
|
|
20
|
+
var _default = exports.default = _cliMcpServer().CliMcpServerAspect;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_cliMcpServer","data","require","_default","exports","default","CliMcpServerAspect"],"sources":["index.ts"],"sourcesContent":["import { CliMcpServerAspect } from './cli-mcp-server.aspect';\n\nexport type { CliMcpServerMain } from './cli-mcp-server.main.runtime';\nexport default CliMcpServerAspect;\nexport { CliMcpServerAspect };\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6D,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG9CC,kCAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CLIArgs, Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
import { CliMcpServerMain } from './cli-mcp-server.main.runtime';
|
|
3
|
+
export type McpStartCmdOptions = {
|
|
4
|
+
includeAdditional?: string;
|
|
5
|
+
bitBin?: string;
|
|
6
|
+
consumerProject?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class McpServerCmd implements Command {
|
|
9
|
+
private mcpServer;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
alias: string;
|
|
13
|
+
group: string;
|
|
14
|
+
loader: boolean;
|
|
15
|
+
options: CommandOptions;
|
|
16
|
+
commands: Command[];
|
|
17
|
+
constructor(mcpServer: CliMcpServerMain);
|
|
18
|
+
wait(args: CLIArgs, flags: McpStartCmdOptions): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare class McpStartCmd implements Command {
|
|
21
|
+
private mcpServer;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
extendedDescription: string;
|
|
25
|
+
alias: string;
|
|
26
|
+
group: string;
|
|
27
|
+
loader: boolean;
|
|
28
|
+
options: CommandOptions;
|
|
29
|
+
constructor(mcpServer: CliMcpServerMain);
|
|
30
|
+
wait(args: CLIArgs, flags: McpStartCmdOptions): Promise<void>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.McpStartCmd = exports.McpServerCmd = void 0;
|
|
7
|
+
function _lodash() {
|
|
8
|
+
const data = require("lodash");
|
|
9
|
+
_lodash = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
class McpServerCmd {
|
|
18
|
+
constructor(mcpServer) {
|
|
19
|
+
this.mcpServer = mcpServer;
|
|
20
|
+
_defineProperty(this, "name", 'mcp-server [sub-command]');
|
|
21
|
+
_defineProperty(this, "description", 'Start the Bit CLI Model Context Protocol (MCP) server for programmatic and remote access to Bit commands.');
|
|
22
|
+
_defineProperty(this, "alias", '');
|
|
23
|
+
_defineProperty(this, "group", 'advanced');
|
|
24
|
+
_defineProperty(this, "loader", false);
|
|
25
|
+
_defineProperty(this, "options", [['', 'include-additional <commands>', 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes'], ['', 'bit-bin <binary>', 'Specify the binary to use for running Bit commands (default: "bit")'], ['', 'consumer-project', 'For non-Bit workspaces that only consume Bit component packages. Enables only "schema", "show", and "remote_search" tools']]);
|
|
26
|
+
_defineProperty(this, "commands", []);
|
|
27
|
+
}
|
|
28
|
+
async wait(args, flags) {
|
|
29
|
+
if ((0, _lodash().compact)(args).length) {
|
|
30
|
+
throw new Error(`"${args}" is not a subcommand of "mcp-server", please run "bit mcp-server --help" to list the subcommands`);
|
|
31
|
+
}
|
|
32
|
+
await this.mcpServer.runMcpServer(flags);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.McpServerCmd = McpServerCmd;
|
|
36
|
+
class McpStartCmd {
|
|
37
|
+
constructor(mcpServer) {
|
|
38
|
+
this.mcpServer = mcpServer;
|
|
39
|
+
_defineProperty(this, "name", 'start');
|
|
40
|
+
_defineProperty(this, "description", 'Start the MCP server');
|
|
41
|
+
_defineProperty(this, "extendedDescription", 'Start the Model Context Protocol (MCP) server with the specified configuration');
|
|
42
|
+
_defineProperty(this, "alias", '');
|
|
43
|
+
_defineProperty(this, "group", 'advanced');
|
|
44
|
+
_defineProperty(this, "loader", false);
|
|
45
|
+
_defineProperty(this, "options", [['', 'include-additional <commands>', 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes'], ['', 'bit-bin <binary>', 'Specify the binary to use for running Bit commands (default: "bit")'], ['', 'consumer-project', 'For non-Bit workspaces that only consume Bit component packages. Enables only "schema", "show", and "remote_search" tools']]);
|
|
46
|
+
}
|
|
47
|
+
async wait(args, flags) {
|
|
48
|
+
await this.mcpServer.runMcpServer(flags);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.McpStartCmd = McpStartCmd;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=mcp-server.cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_lodash","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","McpServerCmd","constructor","mcpServer","wait","args","flags","compact","length","Error","runMcpServer","exports","McpStartCmd"],"sources":["mcp-server.cmd.ts"],"sourcesContent":["import { compact } from 'lodash';\nimport { CLIArgs, Command, CommandOptions } from '@teambit/cli';\nimport { CliMcpServerMain } from './cli-mcp-server.main.runtime';\n\nexport type McpStartCmdOptions = {\n includeAdditional?: string;\n bitBin?: string;\n consumerProject?: boolean;\n};\n\nexport class McpServerCmd implements Command {\n name = 'mcp-server [sub-command]';\n description =\n 'Start the Bit CLI Model Context Protocol (MCP) server for programmatic and remote access to Bit commands.';\n alias = '';\n group = 'advanced';\n loader = false;\n options = [\n [\n '',\n 'include-additional <commands>',\n 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes',\n ],\n ['', 'bit-bin <binary>', 'Specify the binary to use for running Bit commands (default: \"bit\")'],\n [\n '',\n 'consumer-project',\n 'For non-Bit workspaces that only consume Bit component packages. Enables only \"schema\", \"show\", and \"remote_search\" tools',\n ],\n ] as CommandOptions;\n commands: Command[] = [];\n\n constructor(private mcpServer: CliMcpServerMain) {}\n\n async wait(args: CLIArgs, flags: McpStartCmdOptions): Promise<void> {\n if (compact(args).length) {\n throw new Error(\n `\"${args}\" is not a subcommand of \"mcp-server\", please run \"bit mcp-server --help\" to list the subcommands`\n );\n }\n\n await this.mcpServer.runMcpServer(flags);\n }\n}\n\nexport class McpStartCmd implements Command {\n name = 'start';\n description = 'Start the MCP server';\n extendedDescription = 'Start the Model Context Protocol (MCP) server with the specified configuration';\n alias = '';\n group = 'advanced';\n loader = false;\n options = [\n [\n '',\n 'include-additional <commands>',\n 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes',\n ],\n ['', 'bit-bin <binary>', 'Specify the binary to use for running Bit commands (default: \"bit\")'],\n [\n '',\n 'consumer-project',\n 'For non-Bit workspaces that only consume Bit component packages. Enables only \"schema\", \"show\", and \"remote_search\" tools',\n ],\n ] as CommandOptions;\n\n constructor(private mcpServer: CliMcpServerMain) {}\n\n async wait(args: CLIArgs, flags: McpStartCmdOptions): Promise<void> {\n await this.mcpServer.runMcpServer(flags);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAA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MAAMsB,IAAIA,CAACC,IAAa,EAAEC,KAAyB,EAAiB;IAClE,IAAI,IAAAC,iBAAO,EAACF,IAAI,CAAC,CAACG,MAAM,EAAE;MACxB,MAAM,IAAIC,KAAK,CACb,IAAIJ,IAAI,mGACV,CAAC;IACH;IAEA,MAAM,IAAI,CAACF,SAAS,CAACO,YAAY,CAACJ,KAAK,CAAC;EAC1C;AACF;AAACK,OAAA,CAAAV,YAAA,GAAAA,YAAA;AAEM,MAAMW,WAAW,CAAoB;EAqB1CV,WAAWA,CAASC,SAA2B,EAAE;IAAA,KAA7BA,SAA2B,GAA3BA,SAA2B;IAAArB,eAAA,eApBxC,OAAO;IAAAA,eAAA,sBACA,sBAAsB;IAAAA,eAAA,8BACd,gFAAgF;IAAAA,eAAA,gBAC9F,EAAE;IAAAA,eAAA,gBACF,UAAU;IAAAA,eAAA,iBACT,KAAK;IAAAA,eAAA,kBACJ,CACR,CACE,EAAE,EACF,+BAA+B,EAC/B,wFAAwF,CACzF,EACD,CAAC,EAAE,EAAE,kBAAkB,EAAE,qEAAqE,CAAC,EAC/F,CACE,EAAE,EACF,kBAAkB,EAClB,2HAA2H,CAC5H,CACF;EAEiD;EAElD,MAAMsB,IAAIA,CAACC,IAAa,EAAEC,KAAyB,EAAiB;IAClE,MAAM,IAAI,CAACH,SAAS,CAACO,YAAY,CAACJ,KAAK,CAAC;EAC1C;AACF;AAACK,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
;
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.mcp_cli-mcp-server@1ed79eba7ca236740e6158efa8a6f27425ecaa11/dist/README.docs.mdx';
|
|
3
|
+
|
|
4
|
+
export const compositions = [];
|
|
5
|
+
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[]};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
import { CliMcpServerMain } from './cli-mcp-server.main.runtime';
|
|
3
|
+
export type McpRulesCmdOptions = {
|
|
4
|
+
global?: boolean;
|
|
5
|
+
print?: boolean;
|
|
6
|
+
consumerProject?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class McpRulesCmd implements Command {
|
|
9
|
+
private mcpServerMain;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
extendedDescription: string;
|
|
13
|
+
arguments: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}[];
|
|
17
|
+
options: CommandOptions;
|
|
18
|
+
constructor(mcpServerMain: CliMcpServerMain);
|
|
19
|
+
report([editor]: [string], { global: isGlobal, print: shouldPrint, consumerProject }: McpRulesCmdOptions): Promise<string>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.McpRulesCmd = void 0;
|
|
7
|
+
function _chalk() {
|
|
8
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
9
|
+
_chalk = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
+
class McpRulesCmd {
|
|
19
|
+
constructor(mcpServerMain) {
|
|
20
|
+
this.mcpServerMain = mcpServerMain;
|
|
21
|
+
_defineProperty(this, "name", 'rules [editor]');
|
|
22
|
+
_defineProperty(this, "description", 'Write Bit MCP rules/instructions file for VS Code, Cursor, Roo Code, Cline, or print to screen');
|
|
23
|
+
_defineProperty(this, "extendedDescription", 'Creates or updates rules/instructions markdown files to provide AI assistants with guidance on using Bit MCP server. Currently supports VS Code, Cursor, Roo Code, and Cline. Use --print to display content on screen. Use --consumer-project for non-Bit workspaces that only consume components as packages.');
|
|
24
|
+
_defineProperty(this, "arguments", [{
|
|
25
|
+
name: 'editor',
|
|
26
|
+
description: 'Editor to write rules for (default: vscode). Available: vscode, cursor, roo, cline'
|
|
27
|
+
}]);
|
|
28
|
+
_defineProperty(this, "options", [['g', 'global', 'Write rules to global configuration (default: workspace-specific)'], ['p', 'print', 'Print rules content to screen instead of writing to file'], ['', 'consumer-project', 'Generate rules for consumer projects that only use Bit components as packages']]);
|
|
29
|
+
}
|
|
30
|
+
async report([editor = 'vscode'], {
|
|
31
|
+
global: isGlobal = false,
|
|
32
|
+
print: shouldPrint = false,
|
|
33
|
+
consumerProject = false
|
|
34
|
+
}) {
|
|
35
|
+
try {
|
|
36
|
+
// Handle Windsurf requests by directing to print option
|
|
37
|
+
if (editor.toLowerCase() === 'windsurf') {
|
|
38
|
+
if (!shouldPrint) {
|
|
39
|
+
return _chalk().default.yellow('⚠️ Windsurf uses a single-file configuration (.windsurfrules) that is complex to manage automatically.\n' + 'Please use --print flag to get the rules content and manually add it to your .windsurfrules file.');
|
|
40
|
+
}
|
|
41
|
+
// If print is requested, we'll show the content below
|
|
42
|
+
}
|
|
43
|
+
if (shouldPrint) {
|
|
44
|
+
const rulesContent = await this.mcpServerMain.getRulesContent(consumerProject);
|
|
45
|
+
return rulesContent;
|
|
46
|
+
}
|
|
47
|
+
await this.mcpServerMain.writeRulesFile(editor, {
|
|
48
|
+
isGlobal,
|
|
49
|
+
consumerProject
|
|
50
|
+
});
|
|
51
|
+
const scope = isGlobal ? 'global' : 'workspace';
|
|
52
|
+
const editorName = this.mcpServerMain.getEditorDisplayName(editor);
|
|
53
|
+
return _chalk().default.green(`✓ Successfully wrote ${editorName} Bit MCP rules file (${scope})`);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
const editorName = this.mcpServerMain.getEditorDisplayName(editor);
|
|
56
|
+
return _chalk().default.red(`Error writing ${editorName} rules file: ${error.message}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.McpRulesCmd = McpRulesCmd;
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=rules-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","McpRulesCmd","constructor","mcpServerMain","name","description","report","editor","global","isGlobal","print","shouldPrint","consumerProject","toLowerCase","chalk","yellow","rulesContent","getRulesContent","writeRulesFile","scope","editorName","getEditorDisplayName","green","error","red","message","exports"],"sources":["rules-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { CliMcpServerMain } from './cli-mcp-server.main.runtime';\n\nexport type McpRulesCmdOptions = {\n global?: boolean;\n print?: boolean;\n consumerProject?: boolean;\n};\n\nexport class McpRulesCmd implements Command {\n name = 'rules [editor]';\n description = 'Write Bit MCP rules/instructions file for VS Code, Cursor, Roo Code, Cline, or print to screen';\n extendedDescription =\n 'Creates or updates rules/instructions markdown files to provide AI assistants with guidance on using Bit MCP server. Currently supports VS Code, Cursor, Roo Code, and Cline. Use --print to display content on screen. Use --consumer-project for non-Bit workspaces that only consume components as packages.';\n arguments = [\n {\n name: 'editor',\n description: 'Editor to write rules for (default: vscode). Available: vscode, cursor, roo, cline',\n },\n ];\n options = [\n ['g', 'global', 'Write rules to global configuration (default: workspace-specific)'],\n ['p', 'print', 'Print rules content to screen instead of writing to file'],\n ['', 'consumer-project', 'Generate rules for consumer projects that only use Bit components as packages'],\n ] as CommandOptions;\n\n constructor(private mcpServerMain: CliMcpServerMain) {}\n\n async report(\n [editor = 'vscode']: [string],\n { global: isGlobal = false, print: shouldPrint = false, consumerProject = false }: McpRulesCmdOptions\n ): Promise<string> {\n try {\n // Handle Windsurf requests by directing to print option\n if (editor.toLowerCase() === 'windsurf') {\n if (!shouldPrint) {\n return chalk.yellow(\n '⚠️ Windsurf uses a single-file configuration (.windsurfrules) that is complex to manage automatically.\\n' +\n 'Please use --print flag to get the rules content and manually add it to your .windsurfrules file.'\n );\n }\n // If print is requested, we'll show the content below\n }\n\n if (shouldPrint) {\n const rulesContent = await this.mcpServerMain.getRulesContent(consumerProject);\n return rulesContent;\n }\n\n await this.mcpServerMain.writeRulesFile(editor, {\n isGlobal,\n consumerProject,\n });\n\n const scope = isGlobal ? 'global' : 'workspace';\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n return chalk.green(`✓ Successfully wrote ${editorName} Bit MCP rules file (${scope})`);\n } catch (error) {\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n return chalk.red(`Error writing ${editorName} rules file: ${(error as Error).message}`);\n }\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,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,GAAG;EAA0B,CAAC,EACpF;IACjB,IAAI;MACF;MACA,IAAIL,MAAM,CAACM,WAAW,CAAC,CAAC,KAAK,UAAU,EAAE;QACvC,IAAI,CAACF,WAAW,EAAE;UAChB,OAAOG,gBAAK,CAACC,MAAM,CACjB,2GAA2G,GACzG,mGACJ,CAAC;QACH;QACA;MACF;MAEA,IAAIJ,WAAW,EAAE;QACf,MAAMK,YAAY,GAAG,MAAM,IAAI,CAACb,aAAa,CAACc,eAAe,CAACL,eAAe,CAAC;QAC9E,OAAOI,YAAY;MACrB;MAEA,MAAM,IAAI,CAACb,aAAa,CAACe,cAAc,CAACX,MAAM,EAAE;QAC9CE,QAAQ;QACRG;MACF,CAAC,CAAC;MAEF,MAAMO,KAAK,GAAGV,QAAQ,GAAG,QAAQ,GAAG,WAAW;MAC/C,MAAMW,UAAU,GAAG,IAAI,CAACjB,aAAa,CAACkB,oBAAoB,CAACd,MAAM,CAAC;MAClE,OAAOO,gBAAK,CAACQ,KAAK,CAAC,wBAAwBF,UAAU,wBAAwBD,KAAK,GAAG,CAAC;IACxF,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAMH,UAAU,GAAG,IAAI,CAACjB,aAAa,CAACkB,oBAAoB,CAACd,MAAM,CAAC;MAClE,OAAOO,gBAAK,CAACU,GAAG,CAAC,iBAAiBJ,UAAU,gBAAiBG,KAAK,CAAWE,OAAO,EAAE,CAAC;IACzF;EACF;AACF;AAACC,OAAA,CAAAzB,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
import { CliMcpServerMain } from './cli-mcp-server.main.runtime';
|
|
3
|
+
export type McpSetupCmdOptions = {
|
|
4
|
+
consumerProject?: boolean;
|
|
5
|
+
includeAdditional?: string;
|
|
6
|
+
global?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class McpSetupCmd implements Command {
|
|
9
|
+
private mcpServerMain;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
extendedDescription: string;
|
|
13
|
+
arguments: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}[];
|
|
17
|
+
options: CommandOptions;
|
|
18
|
+
constructor(mcpServerMain: CliMcpServerMain);
|
|
19
|
+
report([editor]: [string], { consumerProject, includeAdditional, global: isGlobal }: McpSetupCmdOptions): Promise<string>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.McpSetupCmd = void 0;
|
|
7
|
+
function _chalk() {
|
|
8
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
9
|
+
_chalk = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
+
class McpSetupCmd {
|
|
19
|
+
constructor(mcpServerMain) {
|
|
20
|
+
this.mcpServerMain = mcpServerMain;
|
|
21
|
+
_defineProperty(this, "name", 'setup [editor]');
|
|
22
|
+
_defineProperty(this, "description", 'Setup MCP integration with VS Code, Cursor, Windsurf, Roo Code, Cline, or other editors');
|
|
23
|
+
_defineProperty(this, "extendedDescription", 'Creates or updates configuration files to integrate Bit MCP server with supported editors. Currently supports VS Code, Cursor, Windsurf, Roo Code, and Cline.');
|
|
24
|
+
_defineProperty(this, "arguments", [{
|
|
25
|
+
name: 'editor',
|
|
26
|
+
description: 'Editor to setup (default: vscode). Available: vscode, cursor, windsurf, roo, cline'
|
|
27
|
+
}]);
|
|
28
|
+
_defineProperty(this, "options", [['', 'consumer-project', 'Configure for non-Bit workspaces that only consume Bit component packages'], ['', 'include-additional <commands>', 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes'], ['g', 'global', 'Setup global configuration (default: workspace-specific)']]);
|
|
29
|
+
}
|
|
30
|
+
async report([editor = 'vscode'], {
|
|
31
|
+
consumerProject,
|
|
32
|
+
includeAdditional,
|
|
33
|
+
global: isGlobal = false
|
|
34
|
+
}) {
|
|
35
|
+
try {
|
|
36
|
+
await this.mcpServerMain.setupEditor(editor, {
|
|
37
|
+
consumerProject,
|
|
38
|
+
includeAdditional,
|
|
39
|
+
isGlobal
|
|
40
|
+
});
|
|
41
|
+
const scope = isGlobal ? 'global' : 'workspace';
|
|
42
|
+
const editorName = this.mcpServerMain.getEditorDisplayName(editor);
|
|
43
|
+
|
|
44
|
+
// Get the config file path based on the editor type
|
|
45
|
+
const configPath = this.mcpServerMain.getEditorConfigPath(editor, isGlobal);
|
|
46
|
+
return _chalk().default.green(`✓ Successfully configured ${editorName} MCP integration (${scope})\n` + ` Configuration written to: ${_chalk().default.cyan(configPath)}`);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
const editorName = this.mcpServerMain.getEditorDisplayName(editor);
|
|
49
|
+
return _chalk().default.red(`Error setting up ${editorName} integration: ${error.message}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.McpSetupCmd = McpSetupCmd;
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=setup-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","McpSetupCmd","constructor","mcpServerMain","name","description","report","editor","consumerProject","includeAdditional","global","isGlobal","setupEditor","scope","editorName","getEditorDisplayName","configPath","getEditorConfigPath","chalk","green","cyan","error","red","message","exports"],"sources":["setup-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { CliMcpServerMain } from './cli-mcp-server.main.runtime';\n\nexport type McpSetupCmdOptions = {\n consumerProject?: boolean;\n includeAdditional?: string;\n global?: boolean;\n};\n\nexport class McpSetupCmd implements Command {\n name = 'setup [editor]';\n description = 'Setup MCP integration with VS Code, Cursor, Windsurf, Roo Code, Cline, or other editors';\n extendedDescription =\n 'Creates or updates configuration files to integrate Bit MCP server with supported editors. Currently supports VS Code, Cursor, Windsurf, Roo Code, and Cline.';\n arguments = [\n {\n name: 'editor',\n description: 'Editor to setup (default: vscode). Available: vscode, cursor, windsurf, roo, cline',\n },\n ];\n options = [\n ['', 'consumer-project', 'Configure for non-Bit workspaces that only consume Bit component packages'],\n [\n '',\n 'include-additional <commands>',\n 'Add specific commands to the default MCP tools set. Use comma-separated list in quotes',\n ],\n ['g', 'global', 'Setup global configuration (default: workspace-specific)'],\n ] as CommandOptions;\n\n constructor(private mcpServerMain: CliMcpServerMain) {}\n\n async report(\n [editor = 'vscode']: [string],\n { consumerProject, includeAdditional, global: isGlobal = false }: McpSetupCmdOptions\n ): Promise<string> {\n try {\n await this.mcpServerMain.setupEditor(editor, {\n consumerProject,\n includeAdditional,\n isGlobal,\n });\n\n const scope = isGlobal ? 'global' : 'workspace';\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n\n // Get the config file path based on the editor type\n const configPath = this.mcpServerMain.getEditorConfigPath(editor, isGlobal);\n\n return chalk.green(\n `✓ Successfully configured ${editorName} MCP integration (${scope})\\n` +\n ` Configuration written to: ${chalk.cyan(configPath)}`\n );\n } catch (error) {\n const editorName = this.mcpServerMain.getEditorDisplayName(editor);\n return chalk.red(`Error setting up ${editorName} integration: ${(error as Error).message}`);\n }\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AASnB,MAAMgB,WAAW,CAAoB;EAqB1CC,WAAWA,CAASC,aAA+B,EAAE;IAAA,KAAjCA,aAA+B,GAA/BA,aAA+B;IAAApB,eAAA,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AvB,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for setting up MCP server configuration
|
|
3
|
+
*/
|
|
4
|
+
export interface SetupOptions {
|
|
5
|
+
consumerProject?: boolean;
|
|
6
|
+
includeAdditional?: string;
|
|
7
|
+
isGlobal: boolean;
|
|
8
|
+
workspaceDir?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Options for writing rules/instructions files
|
|
12
|
+
*/
|
|
13
|
+
export interface RulesOptions {
|
|
14
|
+
isGlobal: boolean;
|
|
15
|
+
workspaceDir?: string;
|
|
16
|
+
consumerProject?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Utility class for setting up MCP server configurations across different editors
|
|
20
|
+
*/
|
|
21
|
+
export declare class McpSetupUtils {
|
|
22
|
+
/**
|
|
23
|
+
* Build MCP server arguments based on provided options
|
|
24
|
+
*/
|
|
25
|
+
static buildMcpServerArgs(options: SetupOptions): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Read and parse a JSON file, returning empty object if file doesn't exist
|
|
28
|
+
*/
|
|
29
|
+
static readJsonFile(filePath: string): Promise<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Get display name for an editor
|
|
32
|
+
*/
|
|
33
|
+
static getEditorDisplayName(editor: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Get VS Code settings.json path based on global/workspace scope
|
|
36
|
+
*/
|
|
37
|
+
static getVSCodeSettingsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Get VS Code mcp.json path for workspace configuration
|
|
40
|
+
*/
|
|
41
|
+
static getVSCodeMcpConfigPath(workspaceDir?: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Setup VS Code MCP integration
|
|
44
|
+
*/
|
|
45
|
+
static setupVSCode(options: SetupOptions): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Get Cursor mcp.json path based on global/workspace scope
|
|
48
|
+
*/
|
|
49
|
+
static getCursorSettingsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Setup Cursor MCP integration
|
|
52
|
+
*/
|
|
53
|
+
static setupCursor(options: SetupOptions): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Get Windsurf mcp.json path based on global/workspace scope
|
|
56
|
+
*/
|
|
57
|
+
static getWindsurfSettingsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Setup Windsurf MCP integration
|
|
60
|
+
*/
|
|
61
|
+
static setupWindsurf(options: SetupOptions): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Get VS Code prompts path based on global/workspace scope
|
|
64
|
+
*/
|
|
65
|
+
static getVSCodePromptsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Get Cursor prompts path based on global/workspace scope
|
|
68
|
+
*/
|
|
69
|
+
static getCursorPromptsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Get Roo Code prompts path based on global/workspace scope
|
|
72
|
+
*/
|
|
73
|
+
static getRooCodePromptsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Get default Bit MCP rules content from template file
|
|
76
|
+
*/
|
|
77
|
+
static getDefaultRulesContent(consumerProject?: boolean): Promise<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Write Bit MCP rules file for VS Code
|
|
80
|
+
*/
|
|
81
|
+
static writeVSCodeRules(options: RulesOptions): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Write Bit MCP rules file for Cursor
|
|
84
|
+
*/
|
|
85
|
+
static writeCursorRules(options: RulesOptions): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Write Bit MCP rules file for Roo Code
|
|
88
|
+
*/
|
|
89
|
+
static writeRooCodeRules(options: RulesOptions): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Write Bit MCP rules file for Cline
|
|
92
|
+
*/
|
|
93
|
+
static writeClineRules(options: RulesOptions): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Get Roo Code mcp.json path based on global/workspace scope
|
|
96
|
+
*/
|
|
97
|
+
static getRooCodeSettingsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* Setup Roo Code MCP integration
|
|
100
|
+
*/
|
|
101
|
+
static setupRooCode(options: SetupOptions): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Get Cline prompts path based on global/workspace scope
|
|
104
|
+
*/
|
|
105
|
+
static getClinePromptsPath(isGlobal: boolean, workspaceDir?: string): string;
|
|
106
|
+
}
|