Notion (notion)¶
The notion connector indexes Notion pages as markdown documents and Notion
database (data source) entries as searchable records.
How MFS sees it¶
notion://workspace/
├── pages/
│ └── <page-id>.md document
└── data_sources/
└── <data-source-id>/
├── records.jsonl record_collection
└── schema.json table_schema
Pages render to markdown and are searchable with no extra config. Data source
records need [[objects]].text_fields to become searchable (their properties are
flattened before rendering).
Credentials¶
You need a Notion Internal Integration token plus explicit page sharing.
- https://www.notion.so/profile/integrations → New integration → pick the workspace.
- Under Capabilities, enable Read content (nothing else is needed).
- Copy the Internal Integration Token (
secret_…).
The token alone grants nothing — you must share each page or database with the
integration: open the page → ••• → Connections → Connect to → the
integration. Sharing propagates to sub-pages, so sharing the workspace home page
is the workspace-wide path; sharing one section scopes it there.
Configuration¶
token = "env:NOTION_TOKEN"
[[objects]]
match = "/data_sources/<data-source-id>"
text_fields = ["Name", "Description"]
locator_fields = ["id"]
The [[objects]] block is only needed for searchable database records — pages
work without it.
Sync and freshness¶
The connector uses each page's last_edited_time as its cursor for incremental
re-sync; deletions are caught by full_scan.
Search and browse¶
mfs add notion://workspace --config ./notion.toml
mfs search "launch checklist" notion://workspace/pages
mfs cat notion://workspace/pages/<page-id>.md --range 1:80
mfs cat notion://workspace/data_sources/<data-source-id>/records.jsonl --locator '{"id":"<page-id>"}'
Pitfalls¶
- The integration only sees pages and databases explicitly shared with it.
- The plugin uses Notion's
data_sourceAPI and paths underdata_sources/(older terminology said "databases"). - Database records need
text_fieldsto be searchable.