Skip to main content
Glama
test-mcp-fix.jsโ€ข2.14 kB
/** * Test the MCP server fix for destructuring issue */ import { handleJSTestAnalyzer } from '../lib/tools/js-test-analyzer.js'; import { handleJSPerformanceAnalyzer } from '../lib/tools/js-performance-analyzer.js'; import { handleBundleAnalyzer } from '../lib/tools/bundle-analyzer.js'; async function testMCPFix() { console.log('๐Ÿงช Testing MCP server fix...\n'); // Test js_test_analyzer const testCode = ` import { describe, test, expect } from 'vitest'; describe('Component tests', () => { test('should work', () => { const { result } = render(<Component />); expect(result).toBeDefined(); }); }); `; try { console.log('๐Ÿ“ Testing js_test_analyzer with fixed params...'); const result = await handleJSTestAnalyzer({ params: { code: testCode, filename: 'test.js', }, }); console.log('โœ… js_test_analyzer: SUCCESS'); console.log('Result preview:', result.content[0].text.substring(0, 200) + '...'); } catch (error) { console.log('โŒ js_test_analyzer: FAILED -', error.message); } // Test js_performance_analyzer try { console.log('\n๐Ÿš€ Testing js_performance_analyzer with fixed params...'); const result = await handleJSPerformanceAnalyzer({ params: { code: testCode, filename: 'test.js', }, }); console.log('โœ… js_performance_analyzer: SUCCESS'); console.log('Result preview:', result.content[0].text.substring(0, 200) + '...'); } catch (error) { console.log('โŒ js_performance_analyzer: FAILED -', error.message); } // Test bundle_size_analyzer try { console.log('\n๐Ÿ“ฆ Testing bundle_size_analyzer with fixed params...'); const result = await handleBundleAnalyzer({ params: { projectPath: '/home/moika/Documents/code/moidvk', entryPoint: 'server.js', }, }); console.log('โœ… bundle_size_analyzer: SUCCESS'); console.log('Result preview:', result.content[0].text.substring(0, 200) + '...'); } catch (error) { console.log('โŒ bundle_size_analyzer: FAILED -', error.message); } } testMCPFix().catch(console.error);

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/moikas-code/moidvk'

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