agentleFS
shoubhiksahashoubhiksaha/notion-multipart-uploader/docs/llms.txt

notion-multipart-uploader

llms.txt13 starsChanged 4 days agoMITView on GitHub

Upload any binary file, from a few bytes to 5 GB, to Notion with the Notion API, from Node.js or from AI agents through an MCP server. It fills the gap left by the official SDK, which exposes the raw file-upload endpoints but doesn't split files, needs the whole file in memory, and leaves retries and error handling to you. It runs Notion's multi-part upload (create, send parts, complete), reads from disk or any stream without loading the whole file…

  • Installs packages
Files
llms.txt
# notion-multipart-uploader

> Upload any binary file, from a few bytes to 5 GB, to Notion with the Notion API, from Node.js or from AI agents through an MCP server. It fills the gap left by the official SDK, which exposes the raw file-upload endpoints but doesn't split files, needs the whole file in memory, and leaves retries and error handling to you. It runs Notion's multi-part upload (create, send parts, complete), reads from disk or any stream without loading the whole file into memory, handles retries, rate limits, progress and cancellation, and returns a file_upload ID to attach to pages, blocks, database properties, covers and comments.

- Install: `npm install notion-multipart-uploader`. Node.js 20 or later, no dependencies, ESM and CommonJS, TypeScript types.
- `uploadFile(apiKey, filePath)` uploads a file from disk. `uploadStream(apiKey, stream, mimeType, filename, { size })` uploads a stream of known size. `uploadToNotion(apiKey, data, mimeType, filename)` uploads a Buffer, Blob or string.
- Notion's limits: 20 MiB per request, 5 GB per file on paid workspaces, 5 MiB per file on free workspaces. Uploads must be attached within one hour of being created.
- MCP server for Claude Desktop, Claude Code and Cursor: `npx -y notion-large-file-upload-mcp`, configured with `NOTION_KEY` and `NOTION_UPLOAD_ALLOWED_DIRS`. It reads files from disk by path, so they don't pass through the model's context.

## Docs

- [README](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/README.md): Quick start, API, options, error codes and FAQ
- [Uploading large files](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/docs/upload-large-files.md): uploadFile and uploadStream examples, including copying a file from one Notion page to another
- [Attaching files to Notion](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/docs/attach-to-notion.md): Attaching an upload to blocks, files properties, page covers, icons and comments
- [Using with AI agents and MCP](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/docs/ai-agents-mcp.md): MCP server setup for Claude Desktop, Claude Code and Cursor, and its tools
- [Differences from @notionhq/client](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/docs/differences-from-sdk.md): What this package adds on top of the official SDK
- [MCP server README](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/mcp-server/README.md): Configuration, tools and limitations of notion-large-file-upload-mcp

## Optional

- [All docs in one file](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/docs/llms-full.txt)
- [Changelog](https://raw.githubusercontent.com/shoubhiksaha/notion-multipart-uploader/main/CHANGELOG.md)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.