
fr0zon3/notion-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
마크다운을 통해 AI 에이전트를 노트에 연결하는 Notion mcp | Notion 마크다운을 읽고 쓰기
개요
AI 에이전트를 원시 API JSON 대신 표준 마크다운으로 Notion에 연결하는 운영 지향 MCP 서버입니다. 에이전트는 GFM 마크다운을 읽고 씁니다. 서버는 블록 변환, 데이터베이스 스키마 매핑, OAuth, 그리고 다중 인스턴스 배포를 위한 선택적 Redis 지원 영속성을 처리합니다. - — 도구 핸들러는 안정적인 공개 MCP 계약을 유지하기 위해 server.ts에 남아 있습니다; 지원 모듈은 교차 처리 문제를 처리합니다. - — 캐시스토어 추상화는 Notion 클라이언트 로직을 변경하지 않고 메모리(기본값) 또는 Redis 백엔드를 허용합니다. - — Redis가 설정되었지만 접근 불가능할 경우, 서버는 경고를 기록하고 메모리 내 및 파일 영속성을 계속 수행합니다. - Node.js 20+ - 노션과 함께 페이지를 공유하는 통합 복제된 체크아웃에서 실행할 때 .env.example을 .env로 복사하세요: 심볼링크 생성이 불가능한 플랫폼에서는 심볼링크 의존 보안 테스트가 자동으로 건너뛸 수 있습니다(개발자 모드가 없는 윈도우에서 흔히 발생합니다). 1. 저장소를 포크하고 메인 기능에서 기능 분기를 생성 2.
개요(AI 번역)
AI 에이전트를 원시 API JSON 대신 표준 마크다운으로 Notion에 연결하는 운영 지향 MCP 서버입니다.
에이전트는 GFM 마크다운을 읽고 씁니다. 서버는 블록 변환, 데이터베이스 스키마 매핑, OAuth, 그리고 다중 인스턴스 배포를 위한 선택적 Redis 지원 영속성을 처리합니다.
특집 하이라이트
| 역량 | 세부 정보 |
|---|---|
| 마크다운 우선 입출력 | 42개의 MCP 도구; 에이전트는 Notion 블록 JSON |
| 왕복 충실도 | 토글, 열, 호출, 테이블, 업로드 등 24가지 블록 유형 |
| 데이터베이스 인체공학적 설계 | 쓰기 { "Status": "Done" } — 스키마 변환은 자동으로 이루어집니다 |
| 이중 전송 | Stdio(API 토큰)와 HTTP(OAuth 또는 베어러가 보호하는 정적 토큰) |
| 보안 기본 설정 | 콘텐츠 공지 접두사, URL 정제, 작업 공간-루트 파일 포함 |
| 선택적 리디스 | 공유 스키마 캐시와 우아한 백업 가능한 OAuth 토큰 영속성 |
| CLI 프로필 | 읽기/쓰기 모드를 통한 easy-notion를 통한 저문맥 Notion 접근 |
건축
작업 흐름 요청 (툴 호출)
프로젝트 구조
디자인 결정
- 단일 서버 모듈 — 툴 핸들러는 'server.'에 남습니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
easy-notion-mcp
Production-oriented MCP server that connects AI agents to Notion through standard markdown instead of raw API JSON.
Agents read and write GFM markdown. The server handles block conversion, database schema mapping, OAuth, and optional Redis-backed persistence for multi-instance deployments.
Feature highlights
| Capability | Details |
|---|---|
| Markdown-first I/O | 42 MCP tools; agents never construct Notion block JSON |
| Round-trip fidelity | 24 block types including toggles, columns, callouts, tables, uploads |
| Database ergonomics | Write { "Status": "Done" } — schema conversion is automatic |
| Dual transport | Stdio (API token) and HTTP (OAuth or bearer-protected static token) |
| Security defaults | Content-notice prefix, URL sanitization, workspace-root file containment |
| Optional Redis | Shared schema cache and OAuth token persistence with graceful fallback |
| CLI profiles | Low-context Notion access via easy-notion with readonly/readwrite modes |
Architecture
flowchart TB
subgraph clients [MCP Clients]
CC[Claude Code / Cursor]
HTTP[HTTP MCP clients]
end
subgraph transport [Transport Layer]
STDIO[index.ts — stdio]
HTTP_SRV[http.ts — Express]
end
subgraph core [Application Core]
SRV[server.ts — MCP tools & resources]
NC[notion-client.ts — Notion SDK wrapper]
MD[markdown converters]
end
subgraph persistence [Persistence — optional]
MEM[(In-memory cache)]
REDIS[(Redis)]
FS[(Encrypted token files)]
end
CC --> STDIO
HTTP --> HTTP_SRV
STDIO --> SRV
HTTP_SRV --> SRV
SRV --> NC
SRV --> MD
NC --> MEM
NC --> REDIS
HTTP_SRV --> FS
HTTP_SRV --> REDIS
Request workflow (tool call)
sequenceDiagram
participant Agent
participant MCP as MCP Server
participant Cache as Cache Store
participant Notion as Notion API
Agent->>MCP: tools/call (e.g. read_page)
MCP->>Notion: blocks.children.list (paginated)
Notion-->>MCP: block tree
MCP->>MCP: blocks → markdown
MCP-->>Agent: { markdown, warnings? }
Agent->>MCP: tools/call (add_database_entry)
MCP->>Cache: get schema:dbId
alt cache miss
Cache->>Notion: dataSources.retrieve
Notion-->>Cache: schema
Cache-->>MCP: schema
else cache hit
Cache-->>MCP: schema
end
MCP->>MCP: convert property values
MCP->>Notion: pages.create
Notion-->>MCP: page
MCP-->>Agent: { id, url }
Project structure
easy-notion-mcp/
├── src/
│ ├── index.ts # Stdio entry point
│ ├── http.ts # HTTP/OAuth entry point
│ ├── cli.ts # Profile-based CLI
│ ├── server.ts # MCP tool & resource handlers
│ ├── notion-client.ts # Notion SDK integration
│ ├── config/env.ts # Typed environment parsing
│ ├── logging/logger.ts # Structured logging
│ ├── persistence/ # Cache + Redis integration
설치
npx -y easy-notion-mcp설정
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "easy-notion-mcp"],
"env": {
"NOTION_TOKEN": "ntn_your_integration_token"
}
}
}
}