Skip to main content
Glama
JinyongHyun

notion_summary_server

by JinyongHyun

notion_summary_server

An MCP server that automatically saves summaries of AI papers or stock articles to a Notion database.

File Structure

notion_summary_server/
├── server.py           # MCP 서버 메인 파일
├── .env                # 환경변수 (직접 생성, git 제외)
├── .env.example        # 환경변수 템플릿
├── .gitignore
├── requirements.txt
└── README.md

Related MCP server: notion-mcp-server

Tools

Tool

Description

save_summary_to_notion

Saves the summary content as a new page in the Notion DB

Input Parameters

Parameter

Type

Required

Description

title

string

Page title

content

string

Summary content

source_url

string

URL of the original article or paper

category

"stock"

"paper"

Select the target DB to save to


Prerequisites

1. Create a Notion Integration

  1. Go to https://www.notion.so/my-integrations

  2. Click New integration

  3. Enter a name and create → Copy the Internal Integration Token

2. Connect Integration to Notion DB

For each of the two databases:

  1. Click the ... menu in the top right → Connections → Add the created integration

  2. If the integration is not connected, an object_not_found error will occur during API calls


Installation

cd d:\python\notion_summary_server

# 가상환경 생성 (선택)
python -m venv .venv
.venv\Scripts\activate

# 의존성 설치
pip install -r requirements.txt

Environment Variable Configuration

Copy .env.example to create a .env file:

copy .env.example .env

Open the .env file and enter the values:

NOTION_API_KEY=secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NOTION_STOCK_DB_ID=33117b872be68187a1b4ddc51261856e
NOTION_PAPER_DB_ID=34617b872be68060a474e18a73510f38

How to find the DB ID: The 32-character string in the Notion database page URL after notion.so/ and before ?


Registering with Claude Code MCP

Run the following command in your terminal:

claude mcp add notion_summary_server -- python d:/python/notion_summary_server/server.py

Or add it directly to ~/.claude/settings.json:

{
  "mcpServers": {
    "notion_summary_server": {
      "command": "python",
      "args": ["d:/python/notion_summary_server/server.py"]
    }
  }
}

After registration, restart Claude Code or verify with the /mcp command:

/mcp

Usage Examples

Ask Claude as follows:

이 논문을 요약해서 Notion에 저장해줘:
https://arxiv.org/abs/2310.06825
오늘 삼성전자 기사 요약해서 주식 DB에 저장해줘

Example of calling the MCP tool directly:

{
  "tool": "save_summary_to_notion",
  "arguments": {
    "title": "Attention Is All You Need",
    "content": "Transformer 아키텍처를 제안한 논문. Self-attention 메커니즘만으로 RNN 없이 seq2seq 모델 구현. BLEU 점수에서 SOTA 달성.",
    "source_url": "https://arxiv.org/abs/1706.03762",
    "category": "paper"
  }
}

Notion Page Structure

The format of the saved page:

[제목]
┌─────────────────────────────────┐
│ 🔗 원본 링크: {source_url}       │
└─────────────────────────────────┘

## 요약
{content}

---
저장일시: 2025-05-09 10:30 UTC  |  분류: AI 논문

Notes

  • It automatically detects and uses the title property name of the Notion DB regardless of what it is.

  • If the summary content is long, it is automatically split and saved (Notion block limit: 2000 characters).

  • Never commit API keys to git. The .env file is included in .gitignore.

Related MCP Connectors

Related MCP Servers