Skip to main content
Glama
verify.jsโ€ข3.41 kB
#!/usr/bin/env node /** * Verification script for Weekly Summary MCP * Tests that all components are working correctly */ import { toolDefinitions } from './src/tools/index.js'; import { handleToolCall } from './src/tools/handler.js'; import config from './src/config.js'; import { existsSync } from 'fs'; console.log('๐Ÿงช Weekly Summary MCP - Verification\n'); let errors = 0; let warnings = 0; // Test 1: Configuration console.log('1๏ธโƒฃ Checking configuration...'); if (!config.user.name || config.user.name === 'User') { console.log(' โš ๏ธ USER_NAME not configured in .env'); warnings++; } else { console.log(` โœ… User: ${config.user.name}`); } if (!config.user.email) { console.log(' โš ๏ธ USER_EMAIL not configured in .env'); warnings++; } else { console.log(` โœ… Email: ${config.user.email}`); } console.log(` โœ… Output dir: ${config.output.dir}`); console.log(''); // Test 2: Tool Definitions console.log('2๏ธโƒฃ Checking tool definitions...'); if (toolDefinitions.length === 5) { console.log(` โœ… All 5 tools defined`); toolDefinitions.forEach(tool => { console.log(` โ€ข ${tool.name}`); }); } else { console.log(` โŒ Expected 5 tools, found ${toolDefinitions.length}`); errors++; } console.log(''); // Test 3: Output Directory console.log('3๏ธโƒฃ Checking output directory...'); if (existsSync(config.output.dir)) { console.log(' โœ… Summaries directory exists'); } else { console.log(' โš ๏ธ Summaries directory does not exist (will be created on first use)'); warnings++; } console.log(''); // Test 4: Tool Handler console.log('4๏ธโƒฃ Testing tool handler...'); try { await handleToolCall('unknown_tool', {}); console.log(' โŒ Should have thrown error for unknown tool'); errors++; } catch (error) { if (error.code === 'UNKNOWN_TOOL') { console.log(' โœ… Unknown tool handling works'); } else { console.log(` โŒ Unexpected error: ${error.message}`); errors++; } } console.log(''); // Test 5: List Summaries (should work even with no summaries) console.log('5๏ธโƒฃ Testing list_summaries tool...'); try { const result = await handleToolCall('list_summaries', { limit: 1 }); const parsed = JSON.parse(result); if (parsed.success) { console.log(` โœ… list_summaries works (found ${parsed.total_count} summaries)`); } else { console.log(` โŒ list_summaries failed: ${parsed.error.message}`); errors++; } } catch (error) { console.log(` โŒ list_summaries error: ${error.message}`); errors++; } console.log(''); // Summary console.log('๐Ÿ“Š Verification Summary'); console.log('======================'); console.log(`Errors: ${errors}`); console.log(`Warnings: ${warnings}`); console.log(''); if (errors === 0 && warnings === 0) { console.log('โœ… All checks passed! MCP server is ready to use.'); console.log(''); console.log('Next steps:'); console.log('1. Add to ~/.cursor/mcp.json (see QUICKSTART.md)'); console.log('2. Restart Cursor'); console.log('3. Test: "Generate my weekly summary"'); process.exit(0); } else if (errors === 0) { console.log('โš ๏ธ Some warnings found. MCP will work but configuration could be improved.'); console.log(' Edit .env to configure USER_NAME and USER_EMAIL'); process.exit(0); } else { console.log('โŒ Errors found. Please fix before using MCP server.'); process.exit(1); }

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/philipbloch/summary-mcp'

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