Skip to main content
Glama
test.js1.61 kB
/** * Quick test script for Project Inspector MCP * Run with: node test.js */ import { inspectProject } from './src/tools/inspectProject.js'; import { detectStack } from './src/tools/detectStack.js'; import { listKeyFiles } from './src/tools/listKeyFiles.js'; const testPath = process.cwd(); console.log('='.repeat(60)); console.log('Testing Project Inspector MCP'); console.log('='.repeat(60)); console.log(`\nTest Path: ${testPath}\n`); // Test 1: inspect_project console.log('\n--- TEST 1: inspect_project ---\n'); try { const result = await inspectProject({ path: testPath }); console.log(JSON.stringify(result, null, 2)); } catch (err) { console.error('Error:', err.message); } // Test 2: detect_stack console.log('\n--- TEST 2: detect_stack ---\n'); try { const result = await detectStack({ path: testPath }); console.log(JSON.stringify(result, null, 2)); } catch (err) { console.error('Error:', err.message); } // Test 3: list_key_files console.log('\n--- TEST 3: list_key_files ---\n'); try { const result = await listKeyFiles({ path: testPath }); console.log(JSON.stringify(result, null, 2)); } catch (err) { console.error('Error:', err.message); } // Test 4: Error handling (non-existent path) console.log('\n--- TEST 4: Error handling (non-existent path) ---\n'); try { const result = await inspectProject({ path: 'C:\\nonexistent\\path' }); console.log(JSON.stringify(result, null, 2)); } catch (err) { console.error('Error:', err.message); } console.log('\n' + '='.repeat(60)); console.log('Tests completed!'); console.log('='.repeat(60));

Latest Blog Posts

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/QoutaID/qoutaMcp'

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