@n24q02m/better-notion-mcp 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
**Composite MCP Server for Notion - Human-Like Workflows for AI Agents**
|
|
4
4
|
|
|
5
|
-
[](https://github.com/n24q02m/better-notion-mcp/stargazers)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://www.npmjs.com/package/@n24q02m/better-notion-mcp)
|
|
7
8
|
[](https://hub.docker.com/r/n24q02m/better-notion-mcp)
|
|
8
|
-
[](https://github.com/n24q02m/better-notion-mcp/stargazers)
|
|
9
9
|
|
|
10
10
|
## 🎯 Design Philosophy
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@ This MCP server transforms Notion's 28+ atomic REST API endpoints into **7 mega
|
|
|
22
22
|
## ✨ Key Features
|
|
23
23
|
|
|
24
24
|
- **7 Mega Tools**: 75% Official API coverage (21/28 endpoints) with safe operations only
|
|
25
|
-
- **
|
|
25
|
+
- **30 Actions**: Multiple actions per tool for comprehensive functionality
|
|
26
26
|
- **Markdown Support**: Write and read Notion content in markdown format
|
|
27
27
|
- **Auto-Pagination**: Automatically fetch all results without cursor management
|
|
28
28
|
- **Bulk Operations**: Create/update/delete multiple items in single requests
|
|
@@ -104,25 +104,47 @@ Each tool supports multiple actions, mapping to 21+ Official Notion API endpoint
|
|
|
104
104
|
- **duplicate**: Duplicate a page with all content
|
|
105
105
|
- Example: `{action: "duplicate", page_id: "xxx"}`
|
|
106
106
|
|
|
107
|
-
### 2. **`databases`** - Database management (
|
|
107
|
+
### 2. **`databases`** - Database management (9 actions → 3+ API endpoints)
|
|
108
108
|
|
|
109
|
-
**Actions**: `create`, `get`, `query`, `create_page`, `update_page`, `delete_page`
|
|
109
|
+
**Actions**: `create`, `get`, `query`, `create_page`, `update_page`, `delete_page`, `create_data_source`, `update_data_source`, `update_database`
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
**ARCHITECTURE NOTE:** Notion databases now support multiple data sources. A database is a container that holds one or more data sources. Each data source has its own schema (properties) and rows (pages).
|
|
112
|
+
|
|
113
|
+
- **create**: Create database with initial data source
|
|
114
|
+
- Maps to: `POST /v1/databases` (API 2025-09-03)
|
|
113
115
|
- Example: `{action: "create", parent_id: "xxx", title: "Tasks", properties: {Status: {select: {...}}}}`
|
|
114
116
|
|
|
115
117
|
- **get**: Retrieve database schema and structure
|
|
116
|
-
- Maps to: `GET /v1/databases/{id}`
|
|
118
|
+
- Maps to: `GET /v1/databases/{id}` + auto-fetch data_source_id
|
|
117
119
|
- Example: `{action: "get", database_id: "xxx"}`
|
|
118
120
|
|
|
119
121
|
- **query**: Query database with filters/sorts + smart search
|
|
120
122
|
- Maps to: `POST /v1/databases/{id}/query`
|
|
121
123
|
- Example: `{action: "query", database_id: "xxx", search: "project", limit: 10}`
|
|
122
124
|
|
|
123
|
-
- **create_page
|
|
124
|
-
- Maps to: `POST
|
|
125
|
-
- Example: `{action: "create_page", database_id: "xxx", pages: [{properties: {
|
|
125
|
+
- **create_page**: Create new database items (bulk)
|
|
126
|
+
- Maps to: `POST /v1/pages`
|
|
127
|
+
- Example: `{action: "create_page", database_id: "xxx", pages: [{properties: {Name: "Task 1", Status: "Todo"}}]}`
|
|
128
|
+
|
|
129
|
+
- **update_page**: Update database items (bulk)
|
|
130
|
+
- Maps to: `PATCH /v1/pages`
|
|
131
|
+
- Example: `{action: "update_page", page_id: "yyy", page_properties: {Status: "Done"}}`
|
|
132
|
+
|
|
133
|
+
- **delete_page**: Delete database items (bulk)
|
|
134
|
+
- Maps to: `DELETE /v1/pages` (via batch)
|
|
135
|
+
- Example: `{action: "delete_page", page_ids: ["yyy", "zzz"]}`
|
|
136
|
+
|
|
137
|
+
- **create_data_source**: Add second data source to database
|
|
138
|
+
- Maps to: `POST /v1/data_sources`
|
|
139
|
+
- Example: `{action: "create_data_source", database_id: "xxx", title: "Archive", properties: {...}}`
|
|
140
|
+
|
|
141
|
+
- **update_data_source**: Update data source schema
|
|
142
|
+
- Maps to: `PATCH /v1/data_sources/{id}`
|
|
143
|
+
- Example: `{action: "update_data_source", data_source_id: "yyy", properties: {NewField: {checkbox: {}}}}`
|
|
144
|
+
|
|
145
|
+
- **update_database**: Update database container (title, icon, cover, move)
|
|
146
|
+
- Maps to: `PATCH /v1/databases/{id}`
|
|
147
|
+
- Example: `{action: "update_database", database_id: "xxx", title: "New Title", icon: "📊"}`
|
|
126
148
|
|
|
127
149
|
### 3. **`blocks`** - Granular block editing (5 actions → 5 API endpoints)
|
|
128
150
|
|
|
@@ -131,12 +153,25 @@ Each tool supports multiple actions, mapping to 21+ Official Notion API endpoint
|
|
|
131
153
|
- Maps to: `GET/PATCH/DELETE /v1/blocks/{id}` + `GET/PATCH /v1/blocks/{id}/children`
|
|
132
154
|
- Example: `{action: "append", block_id: "xxx", content: "## New section\nContent here"}`
|
|
133
155
|
|
|
134
|
-
### 4. **`users`** - User management (
|
|
156
|
+
### 4. **`users`** - User management (4 actions → 3+ API endpoints)
|
|
135
157
|
|
|
136
|
-
**Actions**: `list`, `get`, `me`
|
|
158
|
+
**Actions**: `list`, `get`, `me`, `from_workspace`
|
|
137
159
|
|
|
138
|
-
-
|
|
139
|
-
-
|
|
160
|
+
- **list**: List all users in workspace (requires permission)
|
|
161
|
+
- Maps to: `GET /v1/users`
|
|
162
|
+
- Example: `{action: "list"}`
|
|
163
|
+
|
|
164
|
+
- **get**: Get specific user by ID
|
|
165
|
+
- Maps to: `GET /v1/users/{id}`
|
|
166
|
+
- Example: `{action: "get", user_id: "xxx"}`
|
|
167
|
+
|
|
168
|
+
- **me**: Get current bot/integration info
|
|
169
|
+
- Maps to: `GET /v1/users/me`
|
|
170
|
+
- Example: `{action: "me"}`
|
|
171
|
+
|
|
172
|
+
- **from_workspace**: Extract users from accessible pages (permission bypass)
|
|
173
|
+
- Alternative method when users.list() permission is denied
|
|
174
|
+
- Example: `{action: "from_workspace"}`
|
|
140
175
|
|
|
141
176
|
### 5. **`workspace`** - Workspace operations (2 actions → 2 API endpoints)
|
|
142
177
|
|
|
@@ -157,11 +192,15 @@ Each tool supports multiple actions, mapping to 21+ Official Notion API endpoint
|
|
|
157
192
|
- Maps to: `GET /v1/comments`, `POST /v1/comments`
|
|
158
193
|
- Example: `{action: "list", page_id: "xxx"}` or `{action: "create", page_id: "xxx", content: "Great!"}`
|
|
159
194
|
|
|
160
|
-
### 7. **`content_convert`** - Markdown ↔ Notion blocks utility
|
|
195
|
+
### 7. **`content_convert`** - Markdown ↔ Notion blocks utility (2 directions)
|
|
161
196
|
|
|
162
197
|
**Utility tool** for converting between formats (not a direct API call)
|
|
163
198
|
|
|
164
|
-
-
|
|
199
|
+
- **markdown-to-blocks**: Parse markdown into Notion block structure
|
|
200
|
+
- Example: `{direction: "markdown-to-blocks", content: "# Hello\n\nWorld"}`
|
|
201
|
+
|
|
202
|
+
- **blocks-to-markdown**: Convert Notion blocks to markdown
|
|
203
|
+
- Example: `{direction: "blocks-to-markdown", content: [{"type": "paragraph", "paragraph": {...}}]}`
|
|
165
204
|
|
|
166
205
|
## 🔧 Development
|
|
167
206
|
|