nooon 0.7.0 → 0.8.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.
Files changed (3) hide show
  1. package/README.md +24 -15
  2. package/dist/index.js +18 -6
  3. package/package.json +12 -12
package/README.md CHANGED
@@ -8,10 +8,16 @@ Lightweight, read-only Notion MCP Server optimized for token efficiency.
8
8
  - Minimal output using [TOON format](https://github.com/toon-format/toon)
9
9
  - Smart caching based on `last_edited_time`
10
10
  - Recursive block fetching in a single call
11
- - Pre-built binaries for macOS and Linux
12
11
 
13
12
  ## Installation
14
13
 
14
+ ```bash
15
+ bunx nooon
16
+ ```
17
+
18
+ <details>
19
+ <summary>Manual Install (Pre-built binaries)</summary>
20
+
15
21
  Download from [Releases](https://github.com/corrupt952/nooon/releases):
16
22
 
17
23
  ```bash
@@ -28,6 +34,8 @@ curl -L https://github.com/corrupt952/nooon/releases/latest/download/nooon-linux
28
34
  curl -L https://github.com/corrupt952/nooon/releases/latest/download/nooon-linux-arm64 -o nooon && chmod +x nooon
29
35
  ```
30
36
 
37
+ </details>
38
+
31
39
  ## Authentication
32
40
 
33
41
  Choose one of the following methods:
@@ -41,8 +49,8 @@ export NOTION_TOKEN=ntn_xxx
41
49
  **OAuth (Interactive)**
42
50
 
43
51
  ```bash
44
- nooon config --client-id <id> --client-secret <secret>
45
- nooon auth
52
+ bunx nooon config --client-id <id> --client-secret <secret>
53
+ bunx nooon auth
46
54
  ```
47
55
 
48
56
  Get credentials from [Notion Integrations](https://www.notion.so/my-integrations).
@@ -52,13 +60,13 @@ Get credentials from [Notion Integrations](https://www.notion.so/my-integrations
52
60
  Register with Claude Code:
53
61
 
54
62
  ```bash
55
- eval $(nooon mcp install)
63
+ eval $(bunx nooon mcp install)
56
64
  ```
57
65
 
58
66
  Check status:
59
67
 
60
68
  ```bash
61
- nooon status
69
+ bunx nooon status
62
70
  ```
63
71
 
64
72
  ## MCP Tools
@@ -67,21 +75,22 @@ nooon status
67
75
  |------|-------------|
68
76
  | `nooon_search` | Search pages and databases by keyword |
69
77
  | `nooon_page` | Get page content with nested blocks (cached) |
70
- | `nooon_database` | Get database schema |
78
+ | `nooon_database` | Get database schema and available views |
79
+ | `nooon_data_source` | Get data source schema (property definitions) |
71
80
  | `nooon_query` | Query database with filter/sort |
72
81
  | `nooon_clear_cache` | Clear cached pages |
73
82
 
74
83
  ## CLI Reference
75
84
 
76
85
  ```
77
- nooon auth Start OAuth flow
78
- nooon logout Clear credentials
79
- nooon status Show auth status
80
- nooon config Configure OAuth credentials
81
- nooon cache clear Clear page cache
82
- nooon mcp Start MCP server
83
- nooon mcp install Output claude mcp add command
84
- nooon mcp config Output mcpServers JSON
86
+ bunx nooon auth Start OAuth flow
87
+ bunx nooon logout Clear credentials
88
+ bunx nooon status Show auth status
89
+ bunx nooon config Configure OAuth credentials
90
+ bunx nooon cache clear Clear page cache
91
+ bunx nooon mcp Start MCP server
92
+ bunx nooon mcp install Output claude mcp add command
93
+ bunx nooon mcp config Output mcpServers JSON
85
94
  ```
86
95
 
87
96
  ## Building from Source
@@ -91,7 +100,7 @@ bun install
91
100
  bun run compile
92
101
  ```
93
102
 
94
- For team distribution (users only need to run `nooon auth`, no integration setup required):
103
+ For team distribution (users only need to run `bunx nooon auth`, no integration setup required):
95
104
 
96
105
  ```bash
97
106
  NOTION_CLIENT_ID=xxx NOTION_CLIENT_SECRET=xxx bun run compile
package/dist/index.js CHANGED
@@ -30517,10 +30517,10 @@ ${text}
30517
30517
  result = block.url || "";
30518
30518
  break;
30519
30519
  case "child_page":
30520
- result = `\uD83D\uDCC4 ${block.title}`;
30520
+ result = `\uD83D\uDCC4 ${block.title} (${block.id})`;
30521
30521
  break;
30522
30522
  case "child_database":
30523
- result = `\uD83D\uDCCA ${block.title}`;
30523
+ result = `\uD83D\uDCCA ${block.title} (${block.id})`;
30524
30524
  break;
30525
30525
  default:
30526
30526
  result = text || "";
@@ -30602,6 +30602,11 @@ ${content}`;
30602
30602
  }
30603
30603
  };
30604
30604
  // src/formatters/toon.ts
30605
+ function extractLinks(richText) {
30606
+ if (!richText)
30607
+ return [];
30608
+ return richText.filter((item) => item.href).map((item) => ({ text: item.text, href: item.href }));
30609
+ }
30605
30610
  function richTextToPlain(richText) {
30606
30611
  if (!richText)
30607
30612
  return "";
@@ -30609,8 +30614,15 @@ function richTextToPlain(richText) {
30609
30614
  }
30610
30615
  function blockToToon(block) {
30611
30616
  const result = { type: block.type };
30617
+ if (block.id) {
30618
+ result.id = block.id;
30619
+ }
30612
30620
  if (block.richText) {
30613
30621
  result.text = richTextToPlain(block.richText);
30622
+ const links = extractLinks(block.richText);
30623
+ if (links.length > 0) {
30624
+ result.links = links;
30625
+ }
30614
30626
  }
30615
30627
  if (block.checked !== undefined) {
30616
30628
  result.checked = block.checked;
@@ -31153,9 +31165,9 @@ function slimBlock(block) {
31153
31165
  case "template":
31154
31166
  return base;
31155
31167
  case "child_page":
31156
- return { ...base, title: block.child_page.title };
31168
+ return { ...base, id: block.id, title: block.child_page.title };
31157
31169
  case "child_database":
31158
- return { ...base, title: block.child_database.title };
31170
+ return { ...base, id: block.id, title: block.child_database.title };
31159
31171
  default:
31160
31172
  return base;
31161
31173
  }
@@ -31257,7 +31269,7 @@ function parseSorts(json2) {
31257
31269
  // src/mcp.ts
31258
31270
  var server = new McpServer({
31259
31271
  name: "nooon",
31260
- version: "0.7.0"
31272
+ version: "0.8.0"
31261
31273
  });
31262
31274
  server.tool("nooon_search", "Search Notion pages and databases by keyword. Returns a list of matching items with their IDs and titles. For data_source objects, use nooon_data_source or nooon_query.", {
31263
31275
  query: exports_external.string().describe("Search keyword"),
@@ -31450,7 +31462,7 @@ EXAMPLES:
31450
31462
  async function main() {
31451
31463
  const args = process.argv.slice(2);
31452
31464
  if (args.includes("--version") || args.includes("-v")) {
31453
- console.log("0.7.0");
31465
+ console.log("0.8.0");
31454
31466
  return;
31455
31467
  }
31456
31468
  if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "nooon",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Lightweight, read-only Notion MCP Server optimized for token efficiency",
5
5
  "type": "module",
6
6
  "bin": {
7
- "nooon": "./dist/index.js"
7
+ "nooon": "dist/index.js"
8
8
  },
9
9
  "files": [
10
10
  "dist"
@@ -26,6 +26,15 @@
26
26
  "url": "https://github.com/corrupt952/nooon/issues"
27
27
  },
28
28
  "homepage": "https://github.com/corrupt952/nooon#readme",
29
+ "scripts": {
30
+ "build": "bun build src/index.ts --outdir dist --target bun --define \"PKG_VERSION='$(jq -r .version package.json)'\"",
31
+ "compile": "bun build --compile src/index.ts --outfile nooon --define \"PKG_VERSION='$(jq -r .version package.json)'\" --define \"__EMBEDDED_CLIENT_ID__='$NOTION_CLIENT_ID'\" --define \"__EMBEDDED_CLIENT_SECRET__='$NOTION_CLIENT_SECRET'\"",
32
+ "dev": "bun run src/index.ts",
33
+ "lint": "biome check .",
34
+ "lint:fix": "biome check --write .",
35
+ "format": "biome format --write .",
36
+ "test": "bun test"
37
+ },
29
38
  "dependencies": {
30
39
  "@modelcontextprotocol/sdk": "^1.25.3",
31
40
  "@notionhq/client": "^5.0.0",
@@ -37,14 +46,5 @@
37
46
  "@biomejs/biome": "2.3.13",
38
47
  "@types/bun": "^1.1.14",
39
48
  "typescript": "^5.7.2"
40
- },
41
- "scripts": {
42
- "build": "bun build src/index.ts --outdir dist --target bun --define \"PKG_VERSION='$(jq -r .version package.json)'\"",
43
- "compile": "bun build --compile src/index.ts --outfile nooon --define \"PKG_VERSION='$(jq -r .version package.json)'\" --define \"__EMBEDDED_CLIENT_ID__='$NOTION_CLIENT_ID'\" --define \"__EMBEDDED_CLIENT_SECRET__='$NOTION_CLIENT_SECRET'\"",
44
- "dev": "bun run src/index.ts",
45
- "lint": "biome check .",
46
- "lint:fix": "biome check --write .",
47
- "format": "biome format --write .",
48
- "test": "bun test"
49
49
  }
50
- }
50
+ }