Notion Uploader MCP

Notion Uploader MCP

Enables uploading images and files to Notion pages from Cursor chat, supporting multiple attachment types like image blocks, file blocks, cover images, and icons.

Category
Visit Server

README

Notion Uploader MCP

Model Context Protocol (MCP) サーバーで、CursorのチャットからNotionページに画像やファイルをアップロードできます。

機能

  • ローカルファイルをNotionページにアップロード
  • 複数の添付方法をサポート:
    • image: ページ内に画像ブロックとして追加
    • file: ページ内にファイルブロックとして追加
    • cover: ページのカバー画像として設定
    • icon: ページのアイコンとして設定
  • データベースプロパティへの添付
  • 大容量ファイルのマルチパートアップロード対応(20MB以上)
  • キャプション追加機能

セットアップ

1. Notion APIトークンの取得

  1. Notion Integrations にアクセス
  2. "New integration" をクリック
  3. インテグレーションを作成し、APIトークンをコピー
  4. アップロード先のNotionページにインテグレーションを招待

2. 依存関係のインストール

cd tools/notion-uploader-mcp
npm install

3. ビルド

npm run build

4. 環境変数の設定

.envファイルを作成し、Notion APIトークンを設定:

cp .env.example .env
# .envファイルを編集してNOTION_TOKENを設定

または、環境変数として設定:

export NOTION_TOKEN=secret_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

5. MCP設定への追加

プロジェクトルートの .mcp.json に以下を追加:

{
  "mcpServers": {
    "notion-uploader": {
      "type": "stdio",
      "command": "node",
      "args": ["./tools/notion-uploader-mcp/dist/server.mjs"],
      "env": {
        "NOTION_TOKEN": "${NOTION_TOKEN}"
      }
    }
  }
}

使用方法

Cursorのチャットで、upload_to_notion ツールが利用可能になります。

パラメータ

  • file_path (必須): アップロードするファイルの絶対パス
  • page_id_or_url (必須): NotionページのIDまたはURL
  • attach_as (オプション): 添付方法
    • "image" (デフォルト): 画像ブロックとして追加
    • "file": ファイルブロックとして追加
    • "cover": ページカバーとして設定
    • "icon": ページアイコンとして設定
  • property (オプション): データベースのファイルプロパティ名
  • caption (オプション): ファイルのキャプション

使用例

# 画像をページに追加
upload_to_notion(
  file_path: "/path/to/image.png",
  page_id_or_url: "https://notion.so/your-page-id",
  caption: "プロジェクトのスクリーンショット"
)

# ページカバーとして設定
upload_to_notion(
  file_path: "/path/to/cover.jpg",
  page_id_or_url: "your-page-id",
  attach_as: "cover"
)

# データベースプロパティに添付
upload_to_notion(
  file_path: "/path/to/document.pdf",
  page_id_or_url: "database-page-id",
  property: "添付ファイル"
)

開発

開発モード

TypeScriptファイルを直接実行:

npm run dev

ビルド

TypeScriptをJavaScriptにコンパイル:

npm run build

トラブルシューティング

  1. NOTION_TOKEN not found: 環境変数が正しく設定されているか確認
  2. Page not found: ページIDが正しいか、インテグレーションが招待されているか確認
  3. Permission denied: インテグレーションに適切な権限があるか確認

ライセンス

プロジェクトのライセンスに従います。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured