Skip to main content
Glama
josuekongolo

CompanyIQ MCP Server

by josuekongolo
test-single-year.jsβ€’1.66 kB
import dotenv from 'dotenv'; import { BrowserScraper } from './build/scraper/browser_scraper.js'; // Load environment variables from .env file dotenv.config(); async function testSingleYear() { console.log('πŸš€ Testing OpenAI Vision Parser'); console.log('================================\n'); const scraper = new BrowserScraper(undefined, '999059198'); const orgNr = '999059198'; // Test with an existing PDF file const existingPdf = 'data/pdfs/temp/aarsregnskap_999059198-2021.pdf'; console.log(`πŸ“– Testing with existing PDF: ${existingPdf}\n`); try { console.log('πŸ” Parsing PDF with OpenAI Vision API...'); const result = await scraper.pdfParser.parseFinancialPDF(existingPdf); console.log('\nβœ… EXTRACTION RESULTS:'); console.log('━━━━━━━━━━━━━━━━━━━━━━━━'); console.log(`Revenue: ${result.revenue ? (result.revenue/1000000).toFixed(1) + 'M NOK' : 'Not found'}`); console.log(`Profit: ${result.profit ? (result.profit/1000000).toFixed(1) + 'M NOK' : 'Not found'}`); console.log(`Assets: ${result.assets ? (result.assets/1000000).toFixed(1) + 'M NOK' : 'Not found'}`); console.log(`Equity: ${result.equity ? (result.equity/1000000).toFixed(1) + 'M NOK' : 'Not found'}`); if (result.revenue || result.profit || result.assets || result.equity) { console.log('\nπŸŽ‰ OpenAI Vision Parser is working successfully!'); } else { console.log('\n⚠️ No data extracted - the PDF might not contain financial data'); } } catch (error) { console.error('❌ Test failed:', error.message || error); } } testSingleYear();

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/josuekongolo/companyiq-mcp'

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