Notion Large File Upload

io.github.shoubhiksaha由 GitHub 帳號 shoubhiksaha 發布v1.0.0更新於 Nov 3, 2026

Upload local files up to 5 GB to Notion and attach them to pages, read from disk, not the chat.

發布方自己的服務:Notion

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

本機 MCP 伺服器,將磁碟上的大型檔案(最大 5 GB)上傳到 Notion 並附加為頁面上的區塊。

可以做什麼
  • 依絕對路徑將本機檔案分塊串流上傳到 Notion,並回傳檔案上傳 ID
  • 上傳檔案後立即以影片、PDF、圖片、音訊或檔案區塊附加到頁面或父區塊,可附上說明文字
  • 將已上傳的檔案 ID 附加到頁面或區塊,例如附加失敗時不必重新上傳即可重試
  • 上傳期間回報進度,並在用戶端取消呼叫時停止上傳
適用情境
當代理產出的大型本機檔案(螢幕錄影、會議音訊、測試截圖或 PDF 報告)需要放進 Notion,而 Notion 內建上傳上限為 20 MiB 或以 base64 傳送會耗盡上下文時適用。
執行需求
以本機 stdio 程序執行,通常透過 npx 啟動,需要 Node.js 以及能啟動本機伺服器的 MCP 用戶端。需要 NOTION_KEY 整合權杖(也接受 NOTION_API_KEY 與 NOTION_TOKEN),以及列出允許上傳資料夾的 NOTION_UPLOAD_ALLOWED_DIRS。Notion 整合需有目標頁面的存取權,並需要連線到 Notion 的網路。
安裝前請注意
伺服器會讀取本機磁碟檔案,遭提示注入的代理可能試圖上傳敏感檔案,應將 NOTION_UPLOAD_ALLOWED_DIRS 限制在必要資料夾。它會在頁面上建立區塊,屬於寫入操作;整合權杖可存取所有分享給它的頁面。上傳須在一小時內完成附加,免費工作區單檔上限為 5 MiB。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Notion Large File Upload,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

notion-large-file-upload-mcp

[npm version] [License: MIT]

An MCP server that lets AI agents (Claude Desktop, Claude Code, Cursor, Zed) upload local files of up to 5 GB to Notion and attach them to pages. It reads each file from disk by path, so the file never passes through the model's context.


Why this server is needed

  • Notion's hosted MCP server stops at 20 MiB. Its notion-create-file-upload tool only does single-part uploads, and Notion's open-source MCP server no longer accepts uploads at all.
  • Base64 fills the context window. Some MCP servers can send larger files, but the agent has to pass the file through the conversation as base64, which uses up the model's context after a few files.
  • Agents give up on big files. Without a way to upload them, agents fall back to thumbnails or links instead of the screen recording, meeting audio, test screenshots or PDF report they produced.

notion-large-file-upload-mcp wraps notion-multipart-uploader to provide:

  • Streaming 10 MiB chunking: Does not load 5 GB files into RAM.
  • Concurrent chunk uploads: Parallelizes multi-part uploads with worker queues.
  • Resilient retry engine: Automatically handles rate limits (429), server overload (529), exponential backoff with jitter, and Retry-After headers.
  • Direct Block Attachment: Can attach the uploaded asset to a page or block as a video, pdf, image, audio or file block.
  • Progress and cancellation: Reports MCP progress notifications while uploading and stops the upload when the client cancels the tool call.

Quick Setup

1. Claude Desktop

Add this to your claude_desktop_config.json:

json
{  "mcpServers": {    "notion-large-files": {      "command": "npx",      "args": ["-y", "notion-large-file-upload-mcp"],      "env": {        "NOTION_KEY": "secret_your_notion_integration_token",        "NOTION_UPLOAD_ALLOWED_DIRS": "/Users/me/Videos/exports:/Users/me/Documents/reports"      }    }  }}

Config location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

2. Cursor IDE

  1. Open Cursor Settings -> Features -> MCP.
  2. Click Add New MCP Server.
  3. Configure:
    • Name: notion-large-files
    • Type: command
    • Command: npx -y notion-large-file-upload-mcp
    • Environment Variables: NOTION_KEY=secret_... and NOTION_UPLOAD_ALLOWED_DIRS=/path/to/exports

3. Claude Code / CLI

bash
claude mcp add notion-large-files -e NOTION_KEY=secret_... -e NOTION_UPLOAD_ALLOWED_DIRS=/path/to/exports -- npx -y notion-large-file-upload-mcp

Configuration

Environment variableRequiredDescription
NOTION_KEYYesNotion integration token. NOTION_API_KEY and NOTION_TOKEN are also accepted.
NOTION_UPLOAD_ALLOWED_DIRSYesDirectories files may be uploaded from, separated by : (; on Windows). The upload tools refuse to run without it.

Restricting which files can be uploaded

The tools read files from the machine the server runs on. Without a limit, an agent that is tricked by a prompt injection could upload sensitive files such as ~/.ssh/id_rsa or .env to Notion. That's why NOTION_UPLOAD_ALLOWED_DIRS is required: set it to the folders your agent actually produces files in.

Paths must be absolute, and symlinks are resolved before the check, so a link inside an allowed folder can't point outside it. A link that stays inside an allowed folder is uploaded under the link's name.

Before uploading, the server also checks that Notion supports the file type and that the file fits the workspace's upload limit (5 MiB per file on free workspaces), so the agent gets a clear error instead of a failed multi-GB upload.


Available Tools

upload_large_file_to_notion

Uploads a local file of any size up to 5 GB to Notion and returns the Notion file_upload ID.

ParameterTypeRequiredDescription
filePathstringYesAbsolute path to the local file on disk
mimeTypestringNoMIME type (e.g., video/mp4). Automatically inferred if omitted

upload_and_attach_to_notion

Uploads the local file and immediately creates a child block on the target Notion page or block.

ParameterTypeRequiredDescription
filePathstringYesAbsolute path to the local file on disk
blockIdstringYesTarget Notion Page ID or parent Block ID
blockTypestringNovideo, pdf, image, audio, or file (inferred from MIME if omitted)
mimeTypestringNoMIME type (inferred if omitted)
captionstringNoOptional caption text displayed under the block (up to 2,000 characters)

If the upload succeeds but attaching fails (for example, the page isn't shared with the integration), the error includes the file ID so the agent can retry with attach_file_upload_to_notion instead of uploading again.


attach_file_upload_to_notion

Attaches an already uploaded file to a Notion page or block. Notion expires uploads that aren't attached within an hour of being created.

ParameterTypeRequiredDescription
fileUploadIdstringYesThe file_upload ID returned by an upload tool
blockIdstringYesTarget Notion Page ID or parent Block ID
blockTypestringYesvideo, pdf, image, audio, or file
captionstringNoOptional caption text displayed under the block (up to 2,000 characters)

Limitations

  • The server reads files from the computer it runs on, so it needs an MCP client that runs local servers. Files attached in a chat on claude.ai or ChatGPT aren't on that disk.
  • Free Notion workspaces accept files up to 5 MiB. Paid plans allow up to 5 GB.
  • Each upload has to be attached within an hour of starting, so a 5 GB file needs about 12 Mbit/s of upload bandwidth.

Its name in the MCP Registry is io.github.shoubhiksaha/notion-large-file-upload.


Local Development

bash
git clone https://github.com/shoubhiksaha/notion-multipart-uploader.gitcd notion-multipart-uploadernpm install          # one install for the library and the server (npm workspace)npm run test:mcp     # builds the library and runs the server's tests against itNOTION_KEY="secret_..." NOTION_UPLOAD_ALLOWED_DIRS="$PWD" npm start -w mcp-server

The server is linked to the library in this checkout, so a change to the library is picked up as soon as it's built. The tests start the server over stdio with a fake Notion API, so they don't need a token or network access. See CONTRIBUTING.md for the release process.

License

MIT © Shoubhik Saha

來源:mcp-server/README.md,提交 3ff02a3

工具

3

upload_large_file_to_notion

Uploads a local file (especially > 20 MiB up to 5 GB) to Notion using streaming multipart chunking. Bypasses Notion MCP's 20 MiB limit. Returns the Notion file_upload ID, which must be attached to a page or block before it expires.

輸入參數filePath必填mimeType

upload_and_attach_to_notion

Uploads a large local file (> 20 MiB up to 5 GB) and immediately attaches it as a block to a Notion page or parent block.

輸入參數blockId必填captionfilePath必填mimeTypeblockType

attach_file_upload_to_notion

Attaches a file that was already uploaded (a Notion file_upload ID) as a block to a Notion page or parent block. Use it after upload_large_file_to_notion, or to retry a failed attachment without uploading again.

輸入參數blockId必填captionblockType必填fileUploadId必填

版本歷史

1
  1. v1.0.0最新Oct 29, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Notion 整合