Notion auth and project binding for Codex, Claude Code, and other MCP clients.
Project description
agent-labbook
Agent Labbook is the Notion connection layer for Codex, Claude Code, and other MCP clients. It starts Notion auth, lets you choose which pages or data sources belong to a project, stores tokens and bindings locally in .labbook/, and returns the API context your agent needs to call Notion directly.
Use it when you want to:
- connect a repo to specific Notion pages or data sources for an agent
- let an agent read or update project docs and data sources through the official Notion API
- avoid building your own Notion auth wrapper for coding agents
It is not a full Notion SDK. After setup, your agent should use the official Notion API directly.
Install
Use Agent Labbook as a local MCP server for the current project.
Requirements:
- Python 3.10 or newer
uv- a Codex, Claude Code, or other MCP-capable client that can run a local MCP server
Recommended setup:
codex mcp add labbook -- uvx agent-labbook mcp
claude mcp add --scope project labbook -- uvx agent-labbook mcp
- or use the checked-in
.mcp.jsonwhen the repository itself is the MCP source
Typical Flow
- Run
notion_status. - Run
notion_auth_browser, ornotion_start_headless_authif connecting through SSH or another headless environment. For browser auth, prefer a longtimeout_secondssuch as1800so the agent keeps waiting while you finish Notion consent and resource selection. - Choose the Notion pages or data sources for this project.
- Run
notion_get_api_context. - Use the returned token, headers, and resource IDs with the official Notion API.
Hosted Backend
The default backend is https://labbook.superplanner.net. It is privacy-friendly: it handles OAuth and token refresh without keeping your project tokens or Notion content in server-side storage. Long-lived tokens and bindings stay local in .labbook/.
If you want to self-host it, see docs/self-host.md.
Notes
.labbook/should never be committed- this repo handles auth and project binding, not general Notion API wrapping
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_labbook-0.13.3.tar.gz.
File metadata
- Download URL: agent_labbook-0.13.3.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f73ed0f241d27e8c4edfa538ba7653d622dd4b43895e4e9aa831a7da341c292
|
|
| MD5 |
02834ff0c1a34691cfe661d119d8a2ba
|
|
| BLAKE2b-256 |
df1fef89f30fa2f5f576e39854d4812667e625a05ef4c4ff7b6c552a8198406a
|
Provenance
The following attestation bundles were made for agent_labbook-0.13.3.tar.gz:
Publisher:
publish-pypi.yml on binbinsh/agent-labbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_labbook-0.13.3.tar.gz -
Subject digest:
8f73ed0f241d27e8c4edfa538ba7653d622dd4b43895e4e9aa831a7da341c292 - Sigstore transparency entry: 1224346810
- Sigstore integration time:
-
Permalink:
binbinsh/agent-labbook@f8663db0956210850f4cee2d3c7cf5e5d25ae6bf -
Branch / Tag:
refs/tags/v0.13.3 - Owner: https://github.com/binbinsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f8663db0956210850f4cee2d3c7cf5e5d25ae6bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_labbook-0.13.3-py3-none-any.whl.
File metadata
- Download URL: agent_labbook-0.13.3-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4890b7652ce7f0ef89614ec57f52301c3c6ed00f89a1795cb18912b9cb01a7f9
|
|
| MD5 |
5006c1dd5e3cf5f009df5d2d4053614e
|
|
| BLAKE2b-256 |
b8c9f07449b4a525add19e03dbaccd239a064919c853ad25c2c3b0df8bd1176f
|
Provenance
The following attestation bundles were made for agent_labbook-0.13.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on binbinsh/agent-labbook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_labbook-0.13.3-py3-none-any.whl -
Subject digest:
4890b7652ce7f0ef89614ec57f52301c3c6ed00f89a1795cb18912b9cb01a7f9 - Sigstore transparency entry: 1224346812
- Sigstore integration time:
-
Permalink:
binbinsh/agent-labbook@f8663db0956210850f4cee2d3c7cf5e5d25ae6bf -
Branch / Tag:
refs/tags/v0.13.3 - Owner: https://github.com/binbinsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f8663db0956210850f4cee2d3c7cf5e5d25ae6bf -
Trigger Event:
push
-
Statement type: