Skip to main content
Glama
cedendahlkim

Bolagsinfo Γ— Notion MCP Server

by cedendahlkim
README.md
# 🏒 Bolagsinfo Γ— Notion MCP Server

> **DEV.to Notion MCP Challenge 2026**

An MCP (Model Context Protocol) server that connects [Bolagsinfo.com](https://bolagsinfo.com) β€” a Nordic B2B lead intelligence platform with **2.4 million+ companies** β€” to Notion. This lets AI agents like Claude, Windsurf, and Cursor search Nordic company leads, push them to Notion databases, enrich them with AI-powered Buy Signals (KΓΆpsignaler), and manage a complete sales pipeline β€” all through natural language conversation. No clicking, no copy-pasting, no tab-switching. Just tell your AI assistant what you need and watch your Notion CRM fill up with qualified leads.

---

## ⚑ 5-Minute Setup

### 1. Clone & install

```bash
git clone https://github.com/cedendahlkim/bolagsinfo-notion-mcp.git
cd bolagsinfo-notion-mcp
pip install -r requirements.txt
```

### 2. Get your Notion API key

1. Go to [notion.so/my-integrations](https://www.notion.so/my-integrations)
2. Click **"New integration"**
3. Name it `Bolagsinfo MCP`, select your workspace
4. Copy the **Internal Integration Secret** (starts with `ntn_`)
5. **Important:** Share your target Notion page with this integration (click β€’β€’β€’ β†’ "Connect to" β†’ "Bolagsinfo MCP")

### 3. Configure environment

```bash
cp .env.example .env
# Edit .env and add your NOTION_API_KEY
```

### 4. Run the server

```bash
# Stdio transport (for Claude Desktop / Windsurf / Cursor)
python server.py

# SSE transport (for Docker / remote)
python server.py --sse

# Or with Docker
docker-compose up
```

### 5. Connect to your AI assistant

**Claude Desktop** β€” add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "bolagsinfo": {
      "command": "python",
      "args": ["server.py"],
      "cwd": "/path/to/bolagsinfo-notion-mcp",
      "env": {
        "NOTION_API_KEY": "ntn_your_key_here"
      }
    }
  }
}
```

**Windsurf** β€” add to MCP server settings:

```json
{
  "mcpServers": {
    "bolagsinfo": {
      "command": "python",
      "args": ["/path/to/bolagsinfo-notion-mcp/server.py"],
      "env": {
        "NOTION_API_KEY": "ntn_your_key_here"
      }
    }
  }
}
```

---

## πŸ› οΈ MCP Tools

| Tool | Description |
|------|-------------|
| `search_leads` | Search 2.4M+ Nordic companies by name, city, industry, Buy Signal Score |
| `create_lead_database` | Create a Notion database with the complete Bolagsinfo lead schema |
| `push_leads_to_notion` | Push companies (by org number) into Notion with smart upsert |
| `enrich_notion_lead` | Refresh a Notion lead with latest data from Bolagsinfo |
| `get_pipeline_summary` | Get pipeline analytics: status breakdown, scores, email coverage |

---

## πŸ’¬ Example Conversation

Here's a real workflow β€” from search to pipeline analytics β€” in one conversation:

### Step 1: Search for leads

> **You:** Hitta 10 e-handelsfΓΆretag i Stockholm med hΓΆg kΓΆpsignal
>
> **AI:** Found 10 e-commerce companies in Stockholm:
>
> | Company | Buy Signal | Email | Industry |
> |---------|-----------|-------|----------|
> | Nordic E-com AB | 87 | info@nordicecom.se | E-handel |
> | ShopFlow Sweden | 82 | hello@shopflow.se | Digital handel |
> | ... | ... | ... | ... |

### Step 2: Create a Notion database

> **You:** Skapa en Notion-databas fΓΆr dessa leads pΓ₯ min sida
>
> **AI:** βœ… Created "Bolagsinfo Leads" database. Database ID: `abc123...`

### Step 3: Push leads to Notion

> **You:** Pusha alla 10 fΓΆretagen till databasen
>
> **AI:** βœ… Synced 10 leads to Notion:
> - Created: 10
> - Updated: 0
> - Errors: 0

### Step 4: Check pipeline

> **You:** Visa pipeline-sammanfattning
>
> **AI:** πŸ“Š Pipeline Summary:
> - Total leads: 10
> - Status: New (10)
> - Avg Buy Signal Score: 78.5
> - Email coverage: 80%
> - Top municipality: Stockholm (10)

### Step 5: Enrich a specific lead

> **You:** Berika det fΓΆrsta fΓΆretaget med fΓ€rsk data
>
> **AI:** βœ… Enriched "Nordic E-com AB":
> - Buy Signal Score: 87
> - Digital Maturity: 72
> - CMS: WooCommerce
> - Has Chatbot: No ← opportunity!

---

## πŸ“Έ Notion Database Result

After pushing leads, your Notion database looks like this:

![Bolagsinfo Leads in Notion](https://bolagsinfo.com/og-image.png)

*Each lead includes company info, Buy Signal Score, AI Category, Digital Maturity, tech stack analysis, and pipeline status β€” all synced from Bolagsinfo.com.*

---

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     MCP (stdio/SSE)     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Agent    β”‚ ◄──────────────────────► β”‚  Bolagsinfo MCP      β”‚
β”‚  (Claude,    β”‚                          β”‚  Server (FastMCP)     β”‚
β”‚   Windsurf,  β”‚                          β”‚                      β”‚
β”‚   Cursor)    β”‚                          β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚  β”‚ 5 MCP Tools    β”‚  β”‚
                                          β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                                          β”‚          β”‚           β”‚
                                          β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                                          β”‚  β”‚ Services       β”‚  β”‚
                                          β”‚  β”‚ β€’ Bolagsinfo   │──────► bolagsinfo.com API
                                          β”‚  β”‚ β€’ Notion       │──────► Notion API
                                          β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ”‘ Key Features

- **2.4M+ companies** β€” Search the largest Nordic B2B database
- **AI Buy Signals** β€” Every company scored 0-100 on purchase likelihood
- **Smart upsert** β€” No duplicates. Updates existing leads, creates new ones.
- **Rate limit aware** β€” Respects Notion's 3 req/s limit with async semaphore
- **Full CRM schema** β€” 18 fields including tech stack, digital maturity, chatbot detection
- **Pipeline analytics** β€” Status breakdown, score averages, email coverage in seconds
- **Zero config** β€” Just add your Notion API key and go

---

## πŸ“Š What is a Buy Signal Score?

Bolagsinfo.com analyzes every company across multiple dimensions:

- **Digital presence** β€” Website quality, SSL, mobile optimization
- **Tech stack gaps** β€” Missing chatbot, outdated CMS, no analytics
- **Growth signals** β€” Employee growth, new registrations, industry trends
- **Engagement readiness** β€” Has email, social presence, decision-maker accessibility

A score of **70+** means the company is a **hot lead** β€” they have clear digital gaps that your services can fill.

---

## πŸ‡ΈπŸ‡ͺ Built by Gracestack AB

[Gracestack AB](https://gracestack.se) builds AI-powered tools for B2B sales in the Nordics. Bolagsinfo.com is our flagship product β€” used by sales teams across Sweden and Norway to find, qualify, and close deals faster.

**Kim Cedendahl & Sofia Cedendahl** β€” Co-founders & Developers (50/50 owners of Gracestack AB)
- 🌐 [bolagsinfo.com](https://bolagsinfo.com)
- 🐦 [@gracestack](https://twitter.com/gracestack)
- πŸ’Ό [LinkedIn](https://linkedin.com/in/kimcedendahl)

---

## πŸ“„ License

MIT β€” use it, fork it, build on it.