Local account pool, dashboard, and protocol proxy for Notion AI
Run multiple Notion sessions behind one local entrypoint with pooled accounts, quota visibility, a browser dashboard, and an Anthropic-compatible API.
Core Capabilities • Architecture • Setup • Documentation
English | 简体中文
notion-manager is a local Notion AI management tool. It extracts live Notion sessions through the bundled Chrome extension, builds a multi-account pool, refreshes quota and model state in the background, and exposes three practical entrypoints:
Dashboardat/dashboard/Reverse Proxyfor the full Notion AI web UI at/aiAnthropic Messages APIatPOST /v1/messages
- Load any number of account JSON files from
accounts/ - Pick accounts by effective remaining quota instead of naive random routing
- Skip exhausted accounts automatically
- Persist refreshed quota and discovered models back into account JSON files
- Use a separate account selection path for researcher mode
- Embedded React dashboard at
/dashboard/ - Password login with session cookies
- View account status, plans, quota, discovered models, and refresh progress
- Toggle
enable_web_search,enable_workspace_search, anddebug_logging - Open the best available account or a specific account into the local proxy
- Create a targeted proxy session through
/proxy/start - Open the full Notion AI experience locally through
/ai - Inject pooled account cookies automatically
- Proxy HTML,
/api/*, static assets,msgstore, and WebSocket traffic - Rewrite Notion frontend base URLs and strip analytics scripts
POST /v1/messages- Supports both
Authorization: Bearer <api_key>andx-api-key: <api_key> - Streaming and non-streaming responses
- Anthropic
tools - File content blocks for images, PDFs, and CSVs
- Default model fallback via
proxy.default_model

Works with Cherry Studio — a multi-LLM desktop client
- Use
researcherorfast-researcheras the model name - Streams thinking blocks and final report text
- Request-level search control via
X-Web-SearchandX-Workspace-Search - Search precedence is request headers > dashboard/config > defaults
graph TD
A[Chrome Extension] -->|extract account JSON| B[accounts/*.json]
B --> C[Account Pool]
D[Dashboard /dashboard/] -->|session auth| E[Admin API]
E --> C
F[API Client] -->|POST /v1/messages| G[Anthropic Handler]
G --> C
G --> H[Uploads / tools / search control]
H --> I[Notion AI API]
J[Browser] -->|/proxy/start -> /ai| K[Reverse Proxy]
K --> C
K --> L[notion.so / msgstore]
- Go
1.25+ - Chrome or Chromium for the extension workflow
- At least one usable Notion account
The repo already includes embedded dashboard assets, so go run is enough if you only want to run the service.
- Open
chrome://extensions - Enable developer mode
- Load
chrome-extension/ - Open a logged-in
https://www.notion.so/ - Click the extension and extract the config
- Save the result into
accounts/<name>.json
Example:
accounts/
alice.json
team-a.json
backup.json
Copy the example config and edit as needed:
cp example.config.yaml config.yamlserver.portsets the listening portserver.admin_passwordcan be set manually or left empty for auto-generation
You can also skip this step entirely — the service will start with defaults and auto-generate config.yaml with a random API key and admin password.
Important:
- If
server.api_keyis empty, startup generates one and writes it back toconfig.yaml - If
server.admin_passwordis empty, startup generates a random password, prints it to the console, hashes it, and writes it back — save the plaintext shown on first run - If
server.admin_passwordis plaintext, startup replaces it with a salted SHA256 hash
go run ./cmd/notion-managerIf you change the dashboard source under web/, rebuild it with npm run build inside web/, then sync the output into internal/web/dist/.
Examples below use port 3000 from example.config.yaml. If you start without a config.yaml, the default port is 8081.
curl http://localhost:3000/healthOpen:
http://localhost:3000/dashboard/
Basic API call:
curl http://localhost:3000/v1/messages \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"model": "sonnet-4.6",
"max_tokens": 512,
"messages": [
{ "role": "user", "content": "Summarize what notion-manager does." }
]
}'- API Usage — Standard requests, search overrides, file uploads, research mode
- Dashboard & Proxy — Dashboard login, proxy session workflow
- Configuration — Full config reference, endpoints, notes
This project is licensed under CC BY-NC-SA 4.0. Non-commercial use only.
