Skip to main content

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.json when the repository itself is the MCP source

Typical Flow

  1. Run notion_status.
  2. Run notion_auth_browser, or notion_start_headless_auth if connecting through SSH or another headless environment. For browser auth, prefer a long timeout_seconds such as 1800 so the agent keeps waiting while you finish Notion consent and resource selection.
  3. Choose the Notion pages or data sources for this project.
  4. Run notion_get_api_context.
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_labbook-0.13.5.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_labbook-0.13.5-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_labbook-0.13.5.tar.gz.

File metadata

  • Download URL: agent_labbook-0.13.5.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_labbook-0.13.5.tar.gz
Algorithm Hash digest
SHA256 6f2799b4abf9fde02fc265ca0f467c5def9d4581b29aa182a75c9111706a0f6f
MD5 0bcf62de7b303b1e755f3f802f45ea71
BLAKE2b-256 9d51e7162e4fec8a7b7eca0f2e8f8de6f00f5dc75c10b152045b81dd0e6040ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_labbook-0.13.5.tar.gz:

Publisher: publish-pypi.yml on binbinsh/agent-labbook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_labbook-0.13.5-py3-none-any.whl.

File metadata

  • Download URL: agent_labbook-0.13.5-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_labbook-0.13.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b4065368c8d2228de9791166913a5844c5234a4b77dd0202c4679ed7390d2d82
MD5 c85ab48564c614d949609a71f3b3cb44
BLAKE2b-256 41f065575ec64fa759f666b840153152a50217a5fbcb4feef9128722a8040182

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_labbook-0.13.5-py3-none-any.whl:

Publisher: publish-pypi.yml on binbinsh/agent-labbook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page