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 handles Notion auth for a project, lets you choose which pages or data sources belong to that project, stores bindings in .labbook/, keeps long-lived tokens in a shared credential provider, and returns the API context your agent needs to call Notion directly.
It is not a full Notion SDK. After setup, your agent should use the official Notion API directly.
Main Features
- Connect a repo to specific Notion pages or data sources for an agent.
- Reuse saved Notion credentials across projects.
- Bind only the pages or data sources a project should use.
- Return access tokens, headers, and bound resource IDs for the official Notion API.
- Work with Codex, Claude Code, and other MCP-capable clients.
Install
Requirements:
- Python 3.10 or newer
uv- a Codex, Claude Code, or another MCP-capable client
Recommended:
codex mcp add labbook -- uvx agent-labbook mcp
claude mcp add --scope project labbook -- uvx agent-labbook mcp
Or use the checked-in .mcp.json when this repo is the MCP source.
Use
- Read
labbook://agent-labbook/project/statusor runnotion_status. - Reuse a saved credential when available, or start auth with
notion_auth_browserornotion_start_headless_auth. - Choose the pages or data sources that belong to the project, then finish the handoff with
notion_statusandnotion_finalize_pending_authwhen needed. - Read
labbook://agent-labbook/project/bindingsor runnotion_list_bindingsto inspect the bound roots. - Run
notion_get_api_contextand use the returned token, headers, and resource IDs with the official Notion API.
If your content already exists as markdown, prefer Notion's markdown content APIs:
POST /v1/pageswithmarkdownGET /v1/pages/{page_id}/markdownPATCH /v1/pages/{page_id}/markdown
Reference: https://developers.notion.com/guides/data-apis/working-with-markdown-content
Notes
.labbook/should never be committed.- This repo handles auth and project binding, not general Notion API wrapping.
- For self-hosting, see
docs/self-host.md. - For versioning details, see
docs/versioning.md.
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.14.7.tar.gz.
File metadata
- Download URL: agent_labbook-0.14.7.tar.gz
- Upload date:
- Size: 43.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e48e8bf84a5af0f43361e564d8aa328546574d22998066fc12897bc1b6596633
|
|
| MD5 |
36ace4424befe5ec50e3fc9153729583
|
|
| BLAKE2b-256 |
59f10556da2652b8a076f262dcdca3076c27604c07ea059af100458498fb8dcc
|
Provenance
The following attestation bundles were made for agent_labbook-0.14.7.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.14.7.tar.gz -
Subject digest:
e48e8bf84a5af0f43361e564d8aa328546574d22998066fc12897bc1b6596633 - Sigstore transparency entry: 1242812998
- Sigstore integration time:
-
Permalink:
binbinsh/agent-labbook@461721587cabc5f097b586ef0622145a73b5603a -
Branch / Tag:
refs/tags/v0.14.7 - Owner: https://github.com/binbinsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@461721587cabc5f097b586ef0622145a73b5603a -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_labbook-0.14.7-py3-none-any.whl.
File metadata
- Download URL: agent_labbook-0.14.7-py3-none-any.whl
- Upload date:
- Size: 39.1 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 |
7d9234caa57241f78c1ebb35f8fe6b45dc99e77ca4bcdd44d347530011a56452
|
|
| MD5 |
aef37e593370a503cc3c4735958cb1df
|
|
| BLAKE2b-256 |
558fdda7e576c1213386b158a833feb6615cf7ba8632000b77e7b4120c5c68ca
|
Provenance
The following attestation bundles were made for agent_labbook-0.14.7-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.14.7-py3-none-any.whl -
Subject digest:
7d9234caa57241f78c1ebb35f8fe6b45dc99e77ca4bcdd44d347530011a56452 - Sigstore transparency entry: 1242813038
- Sigstore integration time:
-
Permalink:
binbinsh/agent-labbook@461721587cabc5f097b586ef0622145a73b5603a -
Branch / Tag:
refs/tags/v0.14.7 - Owner: https://github.com/binbinsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@461721587cabc5f097b586ef0622145a73b5603a -
Trigger Event:
push
-
Statement type: