# CompanyIQ MCP Server - Setup Guide
## β
Installation Complete!
Your CompanyIQ MCP Server has been successfully built and is ready to use.
## π Project Structure
```
companyiq-mcp/
βββ src/ # Source code
β βββ tools/ # 7 MCP tools
β βββ apis/ # API clients (BrΓΈnnΓΈysund, SSB)
β βββ analytics/ # Growth & risk analytics
β βββ database/ # SQLite database layer
β βββ index.ts # Main MCP server
βββ build/ # Compiled JavaScript
βββ data/ # SQLite database
β βββ companies.db # β
Created and ready
βββ package.json
βββ tsconfig.json
βββ README.md
```
## π Next Steps
### 1. Configure Claude Desktop
Edit your Claude Desktop configuration file:
**Mac/Linux:**
```bash
~/Library/Application Support/Claude/claude_desktop_config.json
```
**Windows:**
```
%APPDATA%\Claude\claude_desktop_config.json
```
### 2. Add CompanyIQ Configuration
Add this to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"companyiq": {
"command": "node",
"args": [
"/Users/josuekongolo/Downloads/mcp/companyiq-mcp/build/index.js"
]
}
}
}
```
**β οΈ Important:** Use the ABSOLUTE path shown above (adjust if you moved the folder).
### 3. Restart Claude Desktop
Completely quit and restart Claude Desktop for the changes to take effect.
## π§ͺ Test the Server
After restarting Claude Desktop, try these commands:
```
1. List all available tools:
"What tools do you have available?"
2. Search for companies:
"Find IT companies in Oslo with more than 50 employees"
3. Market analysis:
"Give me a market landscape analysis for Norwegian IT sector (NACE 62)"
4. Growth analysis:
"Show me the fastest growing companies in the tech sector"
```
## π Available Tools
1. **search_companies** - Search Norwegian companies
2. **analyze_growth** - Identify high-growth companies
3. **analyze_ownership** - Analyze ownership structures
4. **track_board** - Track board composition
5. **analyze_financials** - Financial analysis & risk assessment
6. **market_landscape** - Competitive landscape analysis
7. **consolidation_trends** - M&A and consolidation trends
## π§ Development
```bash
# Watch mode (auto-rebuild on changes)
npm run watch
# Manual build
npm run build
# Test server directly
echo '{}' | node build/index.js
```
## π Documentation
See [README.md](README.md) for:
- Complete tool documentation
- Usage examples
- NACE code reference
- API documentation
## π Troubleshooting
### Common Issues
**1. "ENOENT: no such file or directory, mkdir './data'"**
β
**FIXED** in latest version! The database now uses absolute paths.
If you still see this:
```bash
npm run build
```
**2. Server won't start:**
- Check that build/index.js exists
- Verify build/database/schema.sql exists
- Check permissions: `chmod +x build/index.js`
- Check logs: `~/Library/Logs/Claude/mcp-server-companyiq.log`
**3. Database errors:**
- Database is created automatically in `data/` directory
- If issues persist, delete and rebuild:
```bash
rm -f data/companies.db
npm run build
```
**4. Claude Desktop doesn't see the server:**
- Verify absolute path in config (no `~`, use full path)
- Check for JSON syntax errors in claude_desktop_config.json
- Check the logs for errors
- Restart Claude Desktop completely
### Check Logs
View real-time logs:
```bash
tail -f ~/Library/Logs/Claude/mcp-server-companyiq.log
```
Common log locations:
- Main log: `~/Library/Logs/Claude/mcp-server-companyiq.log`
- MCP log: `~/Library/Logs/Claude/mcp.log`
- Claude log: `~/Library/Logs/Claude/main.log`
## π Success Criteria
β
All files created
β
TypeScript compiled without errors
β
Database initialized (companies.db exists)
β
Server starts and shows: "CompanyIQ MCP Server running on stdio"
β
Ready to configure in Claude Desktop
---
**Built with Claude Code** π