Skip to main content
Glama

DevDb MCP Server

artisan-service.ts1.41 kB
import * as vscode from 'vscode'; import { exec } from 'child_process'; import { promisify } from 'util'; import { getBasePath } from '../workspace'; const execAsync = promisify(exec); export class ArtisanService { constructor(private workspaceRoot: string) { } static create(): ArtisanService | undefined { const workspaceRoot = getBasePath(); if (!workspaceRoot) { vscode.window.showErrorMessage('No workspace folder found'); return undefined; } return new ArtisanService(workspaceRoot); } async runCommand(command: string, args: string[] = []): Promise<boolean> { const config = vscode.workspace.getConfiguration('Devdb'); const phpPath = config.get<string>('phpExecutablePath') || 'php'; const fullCommand = `${phpPath} artisan ${command} ${args.join(' ')}`; const { stdout, stderr } = await execAsync( fullCommand, { cwd: this.workspaceRoot } ).catch(error => { vscode.window.showErrorMessage( `Failed to run artisan command: ${error.message}` ); return { stdout: '', stderr: error.message }; }); if (stderr) { vscode.window.showErrorMessage( `Error running artisan command: ${stderr}` ); return false; } return true; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/damms005/devdb-vscode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server