Skip to main content
Glama
josuekongolo

CompanyIQ MCP Server

by josuekongolo
populate-test-db.js2.09 kB
import { CompanyDatabase } from './build/database/db.js'; import { readFileSync } from 'fs'; function populateTestData() { console.log('📊 Populating database with test data...'); const db = new CompanyDatabase('./data/company.db'); const orgNr = '999059198'; // First ensure company exists if (!db.getCompany(orgNr)) { db.insertOrUpdateCompany({ org_nr: orgNr, name: 'Test Company AS', organization_form: 'AS', nace_code: '123', employees_count: 10, last_updated: new Date().toISOString() }); } // Try to load existing JSON files try { const data2023 = JSON.parse(readFileSync('data/extracted/999059198/financial_data_2023.json', 'utf8')); db.insertFinancialSnapshot({ org_nr: orgNr, year: 2023, revenue: data2023.revenue, profit: data2023.profit, assets: data2023.assets, equity: data2023.equity, employees: null, source: 'openai_vision_extraction' }); console.log('✅ Inserted 2023 data'); } catch (e) { console.log('Could not load 2023 data:', e.message); } try { const data2022 = JSON.parse(readFileSync('data/extracted/999059198/financial_data_2022.json', 'utf8')); db.insertFinancialSnapshot({ org_nr: orgNr, year: 2022, revenue: data2022.revenue, profit: data2022.profit, assets: data2022.assets, equity: data2022.equity, employees: null, source: 'openai_vision_extraction' }); console.log('✅ Inserted 2022 data'); } catch (e) { console.log('Could not load 2022 data:', e.message); } // Also add a 2024 entry for API data db.insertFinancialSnapshot({ org_nr: orgNr, year: 2024, revenue: 350000000, profit: 15000000, assets: 400000000, equity: 80000000, employees: 25, source: 'regnskapsregisteret_api' }); console.log('✅ Inserted 2024 data'); // Check what we have const history = db.getFinancialHistory(orgNr, 10); console.log(`\n📊 Database now contains ${history.length} years of data`); } populateTestData();

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