Skip to main content
Glama
test-connection.shβ€’3.37 kB
#!/bin/bash # Test MCP Content Analyzer connection and functionality set -e echo "πŸ” Testing MCP Content Analyzer..." # Check if server is built if [ ! -d "dist" ]; then echo "❌ Server not built. Run 'npm run build' first." exit 1 fi # Check if Claude Desktop config exists CLAUDE_CONFIG="$HOME/Library/Application Support/Claude/claude_desktop_config.json" if [ ! -f "$CLAUDE_CONFIG" ]; then echo "❌ Claude Desktop configuration not found. Run './scripts/generate-config.sh' first." exit 1 fi echo "βœ… Build directory exists" echo "βœ… Claude Desktop configuration found" # Test TypeScript compilation echo "πŸ” Testing TypeScript compilation..." npm run type-check echo "βœ… TypeScript compilation successful" # Test Node.js imports echo "πŸ” Testing Node.js module imports..." node -e " import('./dist/index.js') .then(() => console.log('βœ… Module imports successful')) .catch(err => { console.error('❌ Module import failed:', err.message); process.exit(1); }); " --input-type=module # Check dependencies echo "πŸ” Checking critical dependencies..." node -e " try { require('@modelcontextprotocol/sdk/server/index.js'); require('pdfjs-dist'); require('mammoth'); require('playwright'); require('exceljs'); console.log('βœ… All critical dependencies available'); } catch (err) { console.error('❌ Dependency check failed:', err.message); process.exit(1); } " # Test data directory echo "πŸ” Testing data directory..." if [ ! -d "data" ]; then mkdir -p data echo "βœ… Created data directory" else echo "βœ… Data directory exists" fi # Test logs directory echo "πŸ” Testing logs directory..." if [ ! -d "logs" ]; then mkdir -p logs echo "βœ… Created logs directory" else echo "βœ… Logs directory exists" fi # Test environment configuration echo "πŸ” Testing environment configuration..." if [ -f ".env" ]; then echo "βœ… Environment file exists" else cp .env.template .env echo "βœ… Created environment file from template" fi # Test Playwright browser installation echo "πŸ” Testing Playwright browser..." if npx playwright --version > /dev/null 2>&1; then echo "βœ… Playwright installed" # Check if chromium is available node -e " import('./dist/servers/web-scraper.js') .then(module => { console.log('βœ… Web scraper module loadable'); }) .catch(err => { console.log('⚠️ Web scraper may need browser installation'); console.log('Run: npx playwright install chromium'); }); " --input-type=module else echo "⚠️ Playwright not found. Web scraping may not work." fi echo "" echo "🎯 Connection Test Summary:" echo "βœ… TypeScript compilation" echo "βœ… Node.js module loading" echo "βœ… Dependencies available" echo "βœ… Directory structure" echo "βœ… Configuration files" echo "" echo "πŸ“‹ Manual Testing Steps:" echo "1. Restart Claude Desktop completely" echo "2. In Claude Desktop, try:" echo ' "Please test the MCP connection by calling test_connection with message \"Test from script\""' echo ' "Can you get the server information using get_server_info?"' echo "" echo "πŸš€ If manual tests work, the MCP server is ready!" echo "πŸ“Š Monitor logs: tail -f ~/Library/Logs/Claude/mcp-server-content-analyzer.log"

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/DuncanDam/my-mcp'

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