@notionhq/notion-mcp-server 1.2.0 → 1.4.0

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 CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  This project implements an [MCP server](https://spec.modelcontextprotocol.io/) for the [Notion API](https://developers.notion.com/reference/intro).
6
6
 
7
- ### Installation
7
+ ![mcp-demo](https://github.com/user-attachments/assets/1f82cd82-87e4-4d7c-8b72-486ef1f18663)
8
8
 
9
- Add the following to your `.cursor/mcp.json` or `claude_desktop_config.json` (MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`)
9
+ ### Installation
10
10
 
11
- Don't forget to add your Bearer token.
11
+ Add the following to your `.cursor/mcp.json` or `claude_desktop_config.json` (MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`)
12
12
 
13
13
  ```javascript
14
14
  {
@@ -24,14 +24,19 @@ Don't forget to add your Bearer token.
24
24
  }
25
25
  ```
26
26
 
27
+ Don't forget to replace `ntn_****` with your integration secret. Find it from your integration configuration tab:
28
+ <img width="918" alt="retrieve-token" src="https://github.com/user-attachments/assets/67b44536-5333-49fa-809c-59581bf5370a" />
29
+
30
+ Ensure relevant pages and databases are connected to your integration.
31
+
27
32
  ### Examples
28
33
 
29
- 1. Using the following command
34
+ 1. Using the following instruction
30
35
  ```
31
36
  Comment "Hello MCP" on page "Getting started"
32
37
  ```
33
38
 
34
- AI will correctly plan two API calls, v1/search and v1/comments, to achieve the task
39
+ AI will correctly plan two API calls, `v1/search` and `v1/comments`, to achieve the task
35
40
 
36
41
  2. Similarly, the following instruction will result in a new page named "Notion MCP" added to parent page "Development"
37
42
  ```
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "mcp",
7
7
  "server"
8
8
  ],
9
- "version": "1.2.0",
9
+ "version": "1.4.0",
10
10
  "license": "MIT",
11
11
  "type": "module",
12
12
  "scripts": {
@@ -20,17 +20,7 @@
20
20
  "scheme": "basic"
21
21
  }
22
22
  },
23
- "parameters": {
24
- "notionVersion": {
25
- "name": "Notion-Version",
26
- "in": "header",
27
- "required": true,
28
- "schema": {
29
- "enum": ["2022-06-28"]
30
- },
31
- "description": "The [API version](https://developers.notion.com/reference/versioning) to use for this request. The latest version is `2022-06-28`."
32
- }
33
- },
23
+ "parameters": {},
34
24
  "schemas": {}
35
25
  },
36
26
  "security": [
@@ -562,15 +552,6 @@
562
552
  "type": "string"
563
553
  },
564
554
  "required": true
565
- },
566
- {
567
- "name": "Notion-Version",
568
- "in": "header",
569
- "description": "The [API version](/reference/versioning) to use for this request. The latest version is `<<latestNotionVersion>>`.",
570
- "required": true,
571
- "schema": {
572
- "type": "string"
573
- }
574
555
  }
575
556
  ],
576
557
  "requestBody": {
@@ -580,24 +561,89 @@
580
561
  "type": "object",
581
562
  "properties": {
582
563
  "properties": {
583
- "type": "string",
584
564
  "description": "The property values to update for the page. The keys are the names or IDs of the property and the values are property values. If a page property ID is not included, then it is not changed.",
585
- "format": "json"
565
+ "type": "object",
566
+ "properties": {
567
+ "title": {
568
+ "type": "array",
569
+ "items": {
570
+ "type": "object",
571
+ "properties": {
572
+ "text": {
573
+ "type": "object",
574
+ "properties": {
575
+ "content": {
576
+ "type": "string",
577
+ "maxLength": 2000
578
+ },
579
+ "link": {
580
+ "type": ["object", "null"],
581
+ "properties": {
582
+ "url": {
583
+ "type": "string"
584
+ }
585
+ },
586
+ "required": ["url"]
587
+ }
588
+ },
589
+ "additionalProperties": false,
590
+ "required": ["content"]
591
+ },
592
+ "type": {
593
+ "enum": ["text"]
594
+ }
595
+ },
596
+ "additionalProperties": false,
597
+ "required": ["text"]
598
+ },
599
+ "maxItems": 100
600
+ },
601
+ "type": {
602
+ "enum": ["title"]
603
+ }
604
+ },
605
+ "additionalProperties": false,
606
+ "required": ["title"]
586
607
  },
587
608
  "in_trash": {
588
609
  "type": "boolean",
589
610
  "description": "Set to true to delete a block. Set to false to restore a block.",
590
611
  "default": false
591
612
  },
613
+ "archived": {
614
+ "type": "boolean"
615
+ },
592
616
  "icon": {
593
- "type": "string",
594
617
  "description": "A page icon for the page. Supported types are [external file object](https://developers.notion.com/reference/file-object) or [emoji object](https://developers.notion.com/reference/emoji-object).",
595
- "format": "json"
618
+ "type": "object",
619
+ "properties": {
620
+ "emoji": {
621
+ "type": "string"
622
+ }
623
+ },
624
+ "additionalProperties": false,
625
+ "required": ["emoji"]
596
626
  },
597
627
  "cover": {
598
- "type": "string",
628
+ "type": "object",
599
629
  "description": "A cover image for the page. Only [external file objects](https://developers.notion.com/reference/file-object) are supported.",
600
- "format": "json"
630
+ "properties": {
631
+ "external": {
632
+ "type": "object",
633
+ "properties": {
634
+ "url": {
635
+ "type": "string"
636
+ }
637
+ },
638
+ "additionalProperties": false,
639
+ "required": ["url"]
640
+ },
641
+ "type": {
642
+ "enum": ["external"]
643
+ }
644
+ },
645
+ "required": ["external"],
646
+ "additionalProperties": false
601
647
  }
602
648
  }
603
649
  }
@@ -814,15 +860,6 @@
814
860
  "type": "string"
815
861
  },
816
862
  "required": true
817
- },
818
- {
819
- "name": "Notion-Version",
820
- "in": "header",
821
- "description": "The [API version](/reference/versioning) to use for this request. The latest version is `<<latestNotionVersion>>`.",
822
- "required": true,
823
- "schema": {
824
- "type": "string"
825
- }
826
863
  }
827
864
  ],
828
865
  "requestBody": {
@@ -832,19 +869,85 @@
832
869
  "type": "object",
833
870
  "properties": {
834
871
  "title": {
872
+ "description": "An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the title of the database that is displayed in the Notion UI. If omitted, then the database title remains unchanged.",
835
873
  "type": "array",
836
- "description": "An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the title of the database that is displayed in the Notion UI. If omitted, then the database title remains unchanged."
874
+ "items": {
875
+ "type": "object",
876
+ "required": ["text"],
877
+ "properties": {
878
+ "text": {
879
+ "type": "object",
880
+ "properties": {
881
+ "content": {
882
+ "type": "string",
883
+ "maxLength": 2000
884
+ },
885
+ "link": {
886
+ "type": ["object", "null"],
887
+ "properties": {
888
+ "url": {
889
+ "type": "string"
890
+ }
891
+ },
892
+ "required": ["url"]
893
+ }
894
+ },
895
+ "additionalProperties": false,
896
+ "required": ["content"]
897
+ },
898
+ "type": {
899
+ "enum": ["text"]
900
+ }
901
+ },
902
+ "additionalProperties": false
903
+ }
837
904
  },
838
905
  "description": {
839
906
  "type": "array",
907
+ "items": {
908
+ "type": "object",
909
+ "required": ["text"],
910
+ "properties": {
911
+ "text": {
912
+ "type": "object",
913
+ "properties": {
914
+ "content": {
915
+ "type": "string",
916
+ "maxLength": 2000
917
+ },
918
+ "link": {
919
+ "type": ["object", "null"],
920
+ "properties": {
921
+ "url": {
922
+ "type": "string"
923
+ }
924
+ },
925
+ "required": ["url"]
926
+ }
927
+ },
928
+ "additionalProperties": false,
929
+ "required": ["content"]
930
+ },
931
+ "type": {
932
+ "enum": ["text"]
933
+ }
934
+ },
935
+ "additionalProperties": false
936
+ },
937
+ "maxItems": 100,
840
938
  "description": "An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the description of the database that is displayed in the Notion UI. If omitted, then the database description remains unchanged."
841
939
  },
842
940
  "properties": {
843
- "type": "string",
844
- "description": "The properties of a database to be changed in the request, in the form of a JSON object. If updating an existing property, then the keys are the names or IDs of the properties as they appear in Notion, and the values are [property schema objects](ref:property-schema-object). If adding a new property, then the key is the name of the new database property and the value is a [property schema object](ref:property-schema-object).",
845
- "format": "json"
941
+ "type": "object",
942
+ "description": "Property schema of database. The keys are the names of properties as they appear in Notion and the values are [property schema objects](https://developers.notion.com/reference/property-schema-object).",
943
+ "properties": {
944
+ "name": {
945
+ "type": "string"
946
+ }
947
+ }
846
948
  }
847
- }
949
+ },
950
+ "additionalProperties": false
848
951
  }
849
952
  }
850
953
  }