@roomi-fields/notebooklm-mcp 1.3.6 → 1.5.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 +69 -34
- package/dist/accounts/account-manager.d.ts +163 -0
- package/dist/accounts/account-manager.d.ts.map +1 -0
- package/dist/accounts/account-manager.js +614 -0
- package/dist/accounts/account-manager.js.map +1 -0
- package/dist/accounts/auto-login-manager.d.ts +62 -0
- package/dist/accounts/auto-login-manager.d.ts.map +1 -0
- package/dist/accounts/auto-login-manager.js +537 -0
- package/dist/accounts/auto-login-manager.js.map +1 -0
- package/dist/accounts/crypto.d.ts +45 -0
- package/dist/accounts/crypto.d.ts.map +1 -0
- package/dist/accounts/crypto.js +138 -0
- package/dist/accounts/crypto.js.map +1 -0
- package/dist/accounts/index.d.ts +14 -0
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/accounts/index.js +14 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/types.d.ts +103 -0
- package/dist/accounts/types.d.ts.map +1 -0
- package/dist/accounts/types.js +7 -0
- package/dist/accounts/types.js.map +1 -0
- package/dist/auth/auth-manager.d.ts +9 -2
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +60 -6
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
- package/dist/auto-discovery/auto-discovery.js +2 -1
- package/dist/auto-discovery/auto-discovery.js.map +1 -1
- package/dist/cli/accounts.d.ts +13 -0
- package/dist/cli/accounts.d.ts.map +1 -0
- package/dist/cli/accounts.js +195 -0
- package/dist/cli/accounts.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-generator.d.ts +153 -0
- package/dist/content/content-generator.d.ts.map +1 -0
- package/dist/content/content-generator.js +637 -0
- package/dist/content/content-generator.js.map +1 -0
- package/dist/content/content-manager.d.ts +364 -0
- package/dist/content/content-manager.d.ts.map +1 -0
- package/dist/content/content-manager.js +3846 -0
- package/dist/content/content-manager.js.map +1 -0
- package/dist/content/content-templates.d.ts +183 -0
- package/dist/content/content-templates.d.ts.map +1 -0
- package/dist/content/content-templates.js +719 -0
- package/dist/content/content-templates.js.map +1 -0
- package/dist/content/index.d.ts +14 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +14 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/types.d.ts +285 -0
- package/dist/content/types.d.ts.map +1 -0
- package/dist/content/types.js +10 -0
- package/dist/content/types.js.map +1 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http-wrapper.d.ts +7 -0
- package/dist/http-wrapper.d.ts.map +1 -1
- package/dist/http-wrapper.js +449 -29
- package/dist/http-wrapper.js.map +1 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts +4 -0
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +20 -3
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/session/browser-session.d.ts +35 -8
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +242 -28
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +6 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +46 -14
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts +3 -3
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +8 -7
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/stdio-http-proxy.d.ts +24 -0
- package/dist/stdio-http-proxy.d.ts.map +1 -0
- package/dist/stdio-http-proxy.js +592 -0
- package/dist/stdio-http-proxy.js.map +1 -0
- package/dist/tools/index.d.ts +106 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1028 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +81 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/citation-extractor.d.ts +66 -0
- package/dist/utils/citation-extractor.d.ts.map +1 -0
- package/dist/utils/citation-extractor.js +492 -0
- package/dist/utils/citation-extractor.js.map +1 -0
- package/dist/utils/page-utils.d.ts +8 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +112 -8
- package/dist/utils/page-utils.js.map +1 -1
- package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
- package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
- package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
- package/package.json +10 -10
- package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
- package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
- package/dist/__tests__/cleanup-manager.test.js +0 -341
- package/dist/__tests__/cleanup-manager.test.js.map +0 -1
- package/dist/__tests__/config-parsing.test.d.ts +0 -2
- package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
- package/dist/__tests__/config-parsing.test.js +0 -338
- package/dist/__tests__/config-parsing.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -267
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -166
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/logger.test.d.ts +0 -2
- package/dist/__tests__/logger.test.d.ts.map +0 -1
- package/dist/__tests__/logger.test.js +0 -324
- package/dist/__tests__/logger.test.js.map +0 -1
- package/dist/__tests__/page-utils.test.d.ts +0 -2
- package/dist/__tests__/page-utils.test.d.ts.map +0 -1
- package/dist/__tests__/page-utils.test.js +0 -349
- package/dist/__tests__/page-utils.test.js.map +0 -1
- package/dist/__tests__/setup-verification.test.d.ts +0 -2
- package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
- package/dist/__tests__/setup-verification.test.js +0 -15
- package/dist/__tests__/setup-verification.test.js.map +0 -1
- package/dist/__tests__/stealth-utils.test.d.ts +0 -2
- package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
- package/dist/__tests__/stealth-utils.test.js +0 -413
- package/dist/__tests__/stealth-utils.test.js.map +0 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -461
- package/dist/__tests__/types.test.js.map +0 -1
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Stdio-to-HTTP Proxy for NotebookLM MCP Server
|
|
4
|
+
*
|
|
5
|
+
* This proxy enables Claude Desktop (which only supports stdio MCP)
|
|
6
|
+
* to use the HTTP server backend. It translates MCP stdio protocol
|
|
7
|
+
* to HTTP REST API calls.
|
|
8
|
+
*
|
|
9
|
+
* Architecture:
|
|
10
|
+
* Claude Desktop → stdio → this proxy → HTTP → NotebookLM MCP Server → Chrome → NotebookLM
|
|
11
|
+
*
|
|
12
|
+
* Benefits:
|
|
13
|
+
* - No Chrome profile conflicts (HTTP server owns the Chrome instance)
|
|
14
|
+
* - Can run simultaneously with HTTP server
|
|
15
|
+
* - Lightweight client (no Playwright dependency)
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* node dist/stdio-http-proxy.js
|
|
19
|
+
*
|
|
20
|
+
* Environment Variables:
|
|
21
|
+
* MCP_HTTP_URL - HTTP server URL (default: http://localhost:3000)
|
|
22
|
+
*/
|
|
23
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
24
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
25
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
26
|
+
// HTTP server URL (configurable via environment)
|
|
27
|
+
const HTTP_BASE_URL = process.env.MCP_HTTP_URL || 'http://localhost:3000';
|
|
28
|
+
/**
|
|
29
|
+
* Helper to make HTTP requests to the backend server
|
|
30
|
+
*/
|
|
31
|
+
async function httpRequest(method, endpoint, body) {
|
|
32
|
+
const url = `${HTTP_BASE_URL}${endpoint}`;
|
|
33
|
+
const options = {
|
|
34
|
+
method,
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
if (body && (method === 'POST' || method === 'PUT')) {
|
|
40
|
+
options.body = JSON.stringify(body);
|
|
41
|
+
}
|
|
42
|
+
const response = await fetch(url, options);
|
|
43
|
+
if (!response.ok) {
|
|
44
|
+
const errorText = await response.text();
|
|
45
|
+
throw new Error(`HTTP ${response.status}: ${errorText}`);
|
|
46
|
+
}
|
|
47
|
+
return response.json();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Log to stderr (stdio uses stdout for MCP protocol)
|
|
51
|
+
*/
|
|
52
|
+
function log(message) {
|
|
53
|
+
console.error(`[stdio-proxy] ${message}`);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Build tool definitions for the proxy
|
|
57
|
+
* These mirror the HTTP server's tools but are fetched dynamically
|
|
58
|
+
*/
|
|
59
|
+
function buildProxyToolDefinitions() {
|
|
60
|
+
// Static tool definitions that match the HTTP server
|
|
61
|
+
// These could be fetched dynamically in the future
|
|
62
|
+
return [
|
|
63
|
+
{
|
|
64
|
+
name: 'ask_question',
|
|
65
|
+
description: '🔌 [PROXY MODE] Ask NotebookLM via HTTP server.\n\n' +
|
|
66
|
+
'This tool proxies requests to the HTTP server at ' +
|
|
67
|
+
HTTP_BASE_URL +
|
|
68
|
+
'\n' +
|
|
69
|
+
'Ensure the HTTP server is running: npm run start:http\n\n' +
|
|
70
|
+
'Parameters:\n' +
|
|
71
|
+
'- question (required): The question to ask\n' +
|
|
72
|
+
'- notebook_id: Library notebook ID\n' +
|
|
73
|
+
'- notebook_url: Direct notebook URL\n' +
|
|
74
|
+
'- session_id: Reuse existing session\n' +
|
|
75
|
+
'- show_browser: Show browser window for debugging\n' +
|
|
76
|
+
'- source_format: Citation extraction format (none, inline, footnotes, json, expanded)',
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: 'object',
|
|
79
|
+
properties: {
|
|
80
|
+
question: { type: 'string', description: 'The question to ask NotebookLM' },
|
|
81
|
+
session_id: { type: 'string', description: 'Optional session ID for context' },
|
|
82
|
+
notebook_id: { type: 'string', description: 'Optional notebook ID from library' },
|
|
83
|
+
notebook_url: { type: 'string', description: 'Optional direct notebook URL' },
|
|
84
|
+
show_browser: { type: 'boolean', description: 'Show browser window for debugging' },
|
|
85
|
+
source_format: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
enum: ['none', 'inline', 'footnotes', 'json', 'expanded'],
|
|
88
|
+
description: 'Citation extraction format: none (default, fastest), inline ([1: "text..."]), footnotes (sources at end), json (separate object), expanded (replace markers with full text)',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
required: ['question'],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'list_notebooks',
|
|
96
|
+
description: '🔌 [PROXY] List all notebooks from library via HTTP server',
|
|
97
|
+
inputSchema: { type: 'object', properties: {} },
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'get_notebook',
|
|
101
|
+
description: '🔌 [PROXY] Get notebook details by ID via HTTP server',
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
properties: { id: { type: 'string', description: 'Notebook ID' } },
|
|
105
|
+
required: ['id'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'add_notebook',
|
|
110
|
+
description: '🔌 [PROXY] Add notebook to library via HTTP server',
|
|
111
|
+
inputSchema: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
properties: {
|
|
114
|
+
url: { type: 'string', description: 'NotebookLM URL' },
|
|
115
|
+
name: { type: 'string', description: 'Display name' },
|
|
116
|
+
description: { type: 'string', description: 'Description' },
|
|
117
|
+
topics: { type: 'array', items: { type: 'string' }, description: 'Topics' },
|
|
118
|
+
content_types: { type: 'array', items: { type: 'string' } },
|
|
119
|
+
use_cases: { type: 'array', items: { type: 'string' } },
|
|
120
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
121
|
+
},
|
|
122
|
+
required: ['url', 'name', 'description', 'topics'],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'auto_discover_notebook',
|
|
127
|
+
description: '🔌 [PROXY] Auto-discover notebook metadata via HTTP server',
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: { url: { type: 'string', description: 'NotebookLM URL' } },
|
|
131
|
+
required: ['url'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'select_notebook',
|
|
136
|
+
description: '🔌 [PROXY] Set active notebook via HTTP server',
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
properties: { id: { type: 'string', description: 'Notebook ID' } },
|
|
140
|
+
required: ['id'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'update_notebook',
|
|
145
|
+
description: '🔌 [PROXY] Update notebook metadata via HTTP server',
|
|
146
|
+
inputSchema: {
|
|
147
|
+
type: 'object',
|
|
148
|
+
properties: {
|
|
149
|
+
id: { type: 'string', description: 'Notebook ID' },
|
|
150
|
+
name: { type: 'string' },
|
|
151
|
+
description: { type: 'string' },
|
|
152
|
+
topics: { type: 'array', items: { type: 'string' } },
|
|
153
|
+
content_types: { type: 'array', items: { type: 'string' } },
|
|
154
|
+
use_cases: { type: 'array', items: { type: 'string' } },
|
|
155
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
156
|
+
url: { type: 'string' },
|
|
157
|
+
},
|
|
158
|
+
required: ['id'],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'remove_notebook',
|
|
163
|
+
description: '🔌 [PROXY] Remove notebook from library via HTTP server',
|
|
164
|
+
inputSchema: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
properties: { id: { type: 'string', description: 'Notebook ID' } },
|
|
167
|
+
required: ['id'],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'search_notebooks',
|
|
172
|
+
description: '🔌 [PROXY] Search notebooks via HTTP server',
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
properties: { query: { type: 'string', description: 'Search query' } },
|
|
176
|
+
required: ['query'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'get_library_stats',
|
|
181
|
+
description: '🔌 [PROXY] Get library statistics via HTTP server',
|
|
182
|
+
inputSchema: { type: 'object', properties: {} },
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'list_sessions',
|
|
186
|
+
description: '🔌 [PROXY] List active sessions via HTTP server',
|
|
187
|
+
inputSchema: { type: 'object', properties: {} },
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'close_session',
|
|
191
|
+
description: '🔌 [PROXY] Close session via HTTP server',
|
|
192
|
+
inputSchema: {
|
|
193
|
+
type: 'object',
|
|
194
|
+
properties: { session_id: { type: 'string', description: 'Session ID' } },
|
|
195
|
+
required: ['session_id'],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'reset_session',
|
|
200
|
+
description: '🔌 [PROXY] Reset session history via HTTP server',
|
|
201
|
+
inputSchema: {
|
|
202
|
+
type: 'object',
|
|
203
|
+
properties: { session_id: { type: 'string', description: 'Session ID' } },
|
|
204
|
+
required: ['session_id'],
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: 'get_health',
|
|
209
|
+
description: '🔌 [PROXY] Get server health status via HTTP server',
|
|
210
|
+
inputSchema: { type: 'object', properties: {} },
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'setup_auth',
|
|
214
|
+
description: '🔌 [PROXY] Setup Google authentication via HTTP server.\n' +
|
|
215
|
+
'Opens browser on the HTTP server machine for login.',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: { show_browser: { type: 'boolean', description: 'Show browser window' } },
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'de_auth',
|
|
223
|
+
description: '🔌 [PROXY] Logout (clear credentials) via HTTP server',
|
|
224
|
+
inputSchema: { type: 'object', properties: {} },
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 're_auth',
|
|
228
|
+
description: '🔌 [PROXY] Re-authenticate with different account via HTTP server',
|
|
229
|
+
inputSchema: {
|
|
230
|
+
type: 'object',
|
|
231
|
+
properties: { show_browser: { type: 'boolean', description: 'Show browser window' } },
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'cleanup_data',
|
|
236
|
+
description: '🔌 [PROXY] Cleanup server data via HTTP server',
|
|
237
|
+
inputSchema: {
|
|
238
|
+
type: 'object',
|
|
239
|
+
properties: {
|
|
240
|
+
confirm: { type: 'boolean', description: 'Confirm deletion (false for preview)' },
|
|
241
|
+
preserve_library: { type: 'boolean', description: 'Keep library.json' },
|
|
242
|
+
},
|
|
243
|
+
required: ['confirm'],
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
// Content Management Tools
|
|
247
|
+
{
|
|
248
|
+
name: 'add_source',
|
|
249
|
+
description: '🔌 [PROXY] Add source/document to notebook via HTTP server',
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
source_type: {
|
|
254
|
+
type: 'string',
|
|
255
|
+
enum: ['file', 'url', 'text', 'youtube', 'google_drive'],
|
|
256
|
+
description: 'Type of source to add',
|
|
257
|
+
},
|
|
258
|
+
file_path: { type: 'string', description: 'Path to file (for file type)' },
|
|
259
|
+
url: { type: 'string', description: 'URL (for url/youtube/google_drive types)' },
|
|
260
|
+
text: { type: 'string', description: 'Text content (for text type)' },
|
|
261
|
+
title: { type: 'string', description: 'Optional title for the source' },
|
|
262
|
+
notebook_url: { type: 'string', description: 'Optional notebook URL' },
|
|
263
|
+
session_id: { type: 'string', description: 'Optional session ID' },
|
|
264
|
+
},
|
|
265
|
+
required: ['source_type'],
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: 'generate_audio',
|
|
270
|
+
description: '🔌 [PROXY] Generate audio overview (podcast) via HTTP server',
|
|
271
|
+
inputSchema: {
|
|
272
|
+
type: 'object',
|
|
273
|
+
properties: {
|
|
274
|
+
custom_instructions: {
|
|
275
|
+
type: 'string',
|
|
276
|
+
description: 'Custom focus/instructions for audio',
|
|
277
|
+
},
|
|
278
|
+
notebook_url: { type: 'string', description: 'Optional notebook URL' },
|
|
279
|
+
session_id: { type: 'string', description: 'Optional session ID' },
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'generate_content',
|
|
285
|
+
description: '🔌 [PROXY] Generate content via HTTP server.\n' +
|
|
286
|
+
'Supported content types:\n' +
|
|
287
|
+
'- audio_overview: Audio podcast/overview (Deep Dive conversation)\n' +
|
|
288
|
+
'- video: Video summary that visually explains main topics (brief or explainer format)\n' +
|
|
289
|
+
'- presentation: Slides/presentation with AI-generated content and images\n' +
|
|
290
|
+
'- report: Briefing document (2,000-3,000 words) summarizing key findings, PDF/DOCX export\n' +
|
|
291
|
+
'- infographic: Visual infographic in horizontal (16:9) or vertical (9:16) format\n' +
|
|
292
|
+
'- data_table: Structured table organizing key information (CSV/Excel export)',
|
|
293
|
+
inputSchema: {
|
|
294
|
+
type: 'object',
|
|
295
|
+
properties: {
|
|
296
|
+
content_type: {
|
|
297
|
+
type: 'string',
|
|
298
|
+
enum: [
|
|
299
|
+
'audio_overview',
|
|
300
|
+
'video',
|
|
301
|
+
'presentation',
|
|
302
|
+
'report',
|
|
303
|
+
'infographic',
|
|
304
|
+
'data_table',
|
|
305
|
+
],
|
|
306
|
+
description: 'Type of content to generate: audio_overview (podcast), video (brief or explainer), presentation (slides), report (briefing doc 2,000-3,000 words, PDF/DOCX export), infographic (horizontal 16:9 or vertical 9:16), or data_table (CSV/Excel export)',
|
|
307
|
+
},
|
|
308
|
+
custom_instructions: { type: 'string', description: 'Custom instructions' },
|
|
309
|
+
notebook_url: { type: 'string', description: 'Optional notebook URL' },
|
|
310
|
+
session_id: { type: 'string', description: 'Optional session ID' },
|
|
311
|
+
},
|
|
312
|
+
required: ['content_type'],
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'list_content',
|
|
317
|
+
description: '🔌 [PROXY] List sources and generated content via HTTP server',
|
|
318
|
+
inputSchema: {
|
|
319
|
+
type: 'object',
|
|
320
|
+
properties: {
|
|
321
|
+
notebook_url: { type: 'string', description: 'Optional notebook URL' },
|
|
322
|
+
session_id: { type: 'string', description: 'Optional session ID' },
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: 'download_audio',
|
|
328
|
+
description: '🔌 [PROXY] Download generated audio file via HTTP server',
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: {
|
|
332
|
+
output_path: { type: 'string', description: 'Local path to save the audio file' },
|
|
333
|
+
notebook_url: { type: 'string', description: 'Optional notebook URL' },
|
|
334
|
+
session_id: { type: 'string', description: 'Optional session ID' },
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
];
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Map tool calls to HTTP endpoints
|
|
342
|
+
*/
|
|
343
|
+
async function handleToolCall(name, args) {
|
|
344
|
+
try {
|
|
345
|
+
switch (name) {
|
|
346
|
+
// Query endpoints
|
|
347
|
+
case 'ask_question':
|
|
348
|
+
return await httpRequest('POST', '/ask', args);
|
|
349
|
+
case 'get_health':
|
|
350
|
+
return await httpRequest('GET', '/health');
|
|
351
|
+
// Notebook endpoints
|
|
352
|
+
case 'list_notebooks':
|
|
353
|
+
return await httpRequest('GET', '/notebooks');
|
|
354
|
+
case 'get_notebook':
|
|
355
|
+
return await httpRequest('GET', `/notebooks/${args.id}`);
|
|
356
|
+
case 'add_notebook':
|
|
357
|
+
return await httpRequest('POST', '/notebooks', args);
|
|
358
|
+
case 'auto_discover_notebook':
|
|
359
|
+
return await httpRequest('POST', '/notebooks/auto-discover', args);
|
|
360
|
+
case 'select_notebook':
|
|
361
|
+
return await httpRequest('PUT', `/notebooks/${args.id}/activate`);
|
|
362
|
+
case 'update_notebook': {
|
|
363
|
+
const { id, ...updateData } = args;
|
|
364
|
+
return await httpRequest('PUT', `/notebooks/${id}`, updateData);
|
|
365
|
+
}
|
|
366
|
+
case 'remove_notebook':
|
|
367
|
+
return await httpRequest('DELETE', `/notebooks/${args.id}`);
|
|
368
|
+
case 'search_notebooks':
|
|
369
|
+
return await httpRequest('GET', `/notebooks/search?query=${encodeURIComponent(String(args.query))}`);
|
|
370
|
+
case 'get_library_stats':
|
|
371
|
+
return await httpRequest('GET', '/notebooks/stats');
|
|
372
|
+
// Session endpoints
|
|
373
|
+
case 'list_sessions':
|
|
374
|
+
return await httpRequest('GET', '/sessions');
|
|
375
|
+
case 'close_session':
|
|
376
|
+
return await httpRequest('DELETE', `/sessions/${args.session_id}`);
|
|
377
|
+
case 'reset_session':
|
|
378
|
+
return await httpRequest('POST', `/sessions/${args.session_id}/reset`);
|
|
379
|
+
// Auth endpoints
|
|
380
|
+
case 'setup_auth':
|
|
381
|
+
return await httpRequest('POST', '/setup-auth', args);
|
|
382
|
+
case 'de_auth':
|
|
383
|
+
return await httpRequest('POST', '/de-auth');
|
|
384
|
+
case 're_auth':
|
|
385
|
+
return await httpRequest('POST', '/re-auth', args);
|
|
386
|
+
case 'cleanup_data':
|
|
387
|
+
return await httpRequest('POST', '/cleanup-data', args);
|
|
388
|
+
// Content Management endpoints
|
|
389
|
+
case 'add_source':
|
|
390
|
+
return await httpRequest('POST', '/content/sources', args);
|
|
391
|
+
case 'delete_source': {
|
|
392
|
+
// Use source_id in path if provided, otherwise use query params for source_name
|
|
393
|
+
const deleteParams = new URLSearchParams();
|
|
394
|
+
if (args.notebook_url)
|
|
395
|
+
deleteParams.set('notebook_url', String(args.notebook_url));
|
|
396
|
+
if (args.session_id)
|
|
397
|
+
deleteParams.set('session_id', String(args.session_id));
|
|
398
|
+
const deleteQuery = deleteParams.toString();
|
|
399
|
+
if (args.source_id) {
|
|
400
|
+
return await httpRequest('DELETE', `/content/sources/${encodeURIComponent(String(args.source_id))}${deleteQuery ? `?${deleteQuery}` : ''}`);
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
if (args.source_name)
|
|
404
|
+
deleteParams.set('source_name', String(args.source_name));
|
|
405
|
+
const deleteByNameQuery = deleteParams.toString();
|
|
406
|
+
return await httpRequest('DELETE', `/content/sources${deleteByNameQuery ? `?${deleteByNameQuery}` : ''}`);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
case 'generate_audio':
|
|
410
|
+
return await httpRequest('POST', '/content/audio', args);
|
|
411
|
+
case 'generate_content':
|
|
412
|
+
return await httpRequest('POST', '/content/generate', args);
|
|
413
|
+
case 'list_content': {
|
|
414
|
+
const queryParams = new URLSearchParams();
|
|
415
|
+
if (args.notebook_url)
|
|
416
|
+
queryParams.set('notebook_url', String(args.notebook_url));
|
|
417
|
+
if (args.session_id)
|
|
418
|
+
queryParams.set('session_id', String(args.session_id));
|
|
419
|
+
const query = queryParams.toString();
|
|
420
|
+
return await httpRequest('GET', `/content${query ? `?${query}` : ''}`);
|
|
421
|
+
}
|
|
422
|
+
case 'download_audio': {
|
|
423
|
+
const downloadParams = new URLSearchParams();
|
|
424
|
+
if (args.output_path)
|
|
425
|
+
downloadParams.set('output_path', String(args.output_path));
|
|
426
|
+
if (args.notebook_url)
|
|
427
|
+
downloadParams.set('notebook_url', String(args.notebook_url));
|
|
428
|
+
if (args.session_id)
|
|
429
|
+
downloadParams.set('session_id', String(args.session_id));
|
|
430
|
+
const downloadQuery = downloadParams.toString();
|
|
431
|
+
return await httpRequest('GET', `/content/audio/download${downloadQuery ? `?${downloadQuery}` : ''}`);
|
|
432
|
+
}
|
|
433
|
+
default:
|
|
434
|
+
return { success: false, error: `Unknown tool: ${name}` };
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
catch (error) {
|
|
438
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
439
|
+
// Check if HTTP server is not running
|
|
440
|
+
if (message.includes('ECONNREFUSED') || message.includes('fetch failed')) {
|
|
441
|
+
return {
|
|
442
|
+
success: false,
|
|
443
|
+
error: `Cannot connect to HTTP server at ${HTTP_BASE_URL}\n\n` +
|
|
444
|
+
'Please ensure the HTTP server is running:\n' +
|
|
445
|
+
' npm run start:http\n\n' +
|
|
446
|
+
'Or start it as a daemon:\n' +
|
|
447
|
+
' npm run daemon:start\n\n' +
|
|
448
|
+
`Original error: ${message}`,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
return { success: false, error: message };
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Main Proxy Server Class
|
|
456
|
+
*/
|
|
457
|
+
class StdioHttpProxyServer {
|
|
458
|
+
server;
|
|
459
|
+
toolDefinitions;
|
|
460
|
+
constructor() {
|
|
461
|
+
this.server = new Server({
|
|
462
|
+
name: 'notebooklm-mcp-proxy',
|
|
463
|
+
version: '1.3.6',
|
|
464
|
+
}, {
|
|
465
|
+
capabilities: {
|
|
466
|
+
tools: {},
|
|
467
|
+
resources: {},
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
this.toolDefinitions = buildProxyToolDefinitions();
|
|
471
|
+
this.setupHandlers();
|
|
472
|
+
this.setupShutdownHandlers();
|
|
473
|
+
log('🔌 NotebookLM MCP Stdio-HTTP Proxy initialized');
|
|
474
|
+
log(` Backend: ${HTTP_BASE_URL}`);
|
|
475
|
+
}
|
|
476
|
+
setupHandlers() {
|
|
477
|
+
// List available tools
|
|
478
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
479
|
+
log('📋 list_tools request');
|
|
480
|
+
return { tools: this.toolDefinitions };
|
|
481
|
+
});
|
|
482
|
+
// List resources (proxy to HTTP server or return empty)
|
|
483
|
+
this.server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
484
|
+
log('📚 list_resources request');
|
|
485
|
+
// For now, return a simple resource pointing to the library
|
|
486
|
+
const resources = [
|
|
487
|
+
{
|
|
488
|
+
uri: 'notebooklm://library',
|
|
489
|
+
name: 'Notebook Library (via HTTP proxy)',
|
|
490
|
+
description: 'Access notebook library through HTTP server. Use list_notebooks tool instead.',
|
|
491
|
+
mimeType: 'application/json',
|
|
492
|
+
},
|
|
493
|
+
];
|
|
494
|
+
return { resources };
|
|
495
|
+
});
|
|
496
|
+
// List resource templates
|
|
497
|
+
this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => {
|
|
498
|
+
log('📑 list_resource_templates request');
|
|
499
|
+
return { resourceTemplates: [] };
|
|
500
|
+
});
|
|
501
|
+
// Read resource
|
|
502
|
+
this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
503
|
+
const { uri } = request.params;
|
|
504
|
+
log(`📖 read_resource: ${uri}`);
|
|
505
|
+
// Proxy library resource to HTTP
|
|
506
|
+
if (uri === 'notebooklm://library') {
|
|
507
|
+
try {
|
|
508
|
+
const result = await httpRequest('GET', '/notebooks');
|
|
509
|
+
return {
|
|
510
|
+
contents: [
|
|
511
|
+
{
|
|
512
|
+
uri,
|
|
513
|
+
mimeType: 'application/json',
|
|
514
|
+
text: JSON.stringify(result.data || result, null, 2),
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
catch (error) {
|
|
520
|
+
throw new Error(`Failed to fetch library: ${error}`);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
throw new Error(`Unknown resource: ${uri}. Use tools instead of resources with the proxy.`);
|
|
524
|
+
});
|
|
525
|
+
// Handle tool calls - proxy to HTTP server
|
|
526
|
+
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
527
|
+
const { name, arguments: args } = request.params;
|
|
528
|
+
log(`🔧 Tool call: ${name}`);
|
|
529
|
+
const result = await handleToolCall(name, (args || {}));
|
|
530
|
+
return {
|
|
531
|
+
content: [
|
|
532
|
+
{
|
|
533
|
+
type: 'text',
|
|
534
|
+
text: JSON.stringify(result, null, 2),
|
|
535
|
+
},
|
|
536
|
+
],
|
|
537
|
+
};
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
setupShutdownHandlers() {
|
|
541
|
+
let shuttingDown = false;
|
|
542
|
+
const shutdown = async (signal) => {
|
|
543
|
+
if (shuttingDown)
|
|
544
|
+
return;
|
|
545
|
+
shuttingDown = true;
|
|
546
|
+
log(`🛑 Received ${signal}, shutting down...`);
|
|
547
|
+
try {
|
|
548
|
+
await this.server.close();
|
|
549
|
+
log('✅ Proxy shutdown complete');
|
|
550
|
+
process.exit(0);
|
|
551
|
+
}
|
|
552
|
+
catch (error) {
|
|
553
|
+
log(`❌ Error during shutdown: ${error}`);
|
|
554
|
+
process.exit(1);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
process.on('SIGINT', () => void shutdown('SIGINT'));
|
|
558
|
+
process.on('SIGTERM', () => void shutdown('SIGTERM'));
|
|
559
|
+
}
|
|
560
|
+
async start() {
|
|
561
|
+
log('🎯 Starting Stdio-HTTP Proxy...');
|
|
562
|
+
const transport = new StdioServerTransport();
|
|
563
|
+
await this.server.connect(transport);
|
|
564
|
+
log('✅ Proxy connected via stdio');
|
|
565
|
+
log('🎉 Ready to proxy requests to HTTP server!');
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Main entry point
|
|
570
|
+
*/
|
|
571
|
+
async function main() {
|
|
572
|
+
console.error('╔══════════════════════════════════════════════════════════╗');
|
|
573
|
+
console.error('║ ║');
|
|
574
|
+
console.error('║ NotebookLM MCP Stdio-HTTP Proxy v1.3.6 ║');
|
|
575
|
+
console.error('║ ║');
|
|
576
|
+
console.error('║ Proxy stdio MCP requests to HTTP server ║');
|
|
577
|
+
console.error('║ ║');
|
|
578
|
+
console.error('╚══════════════════════════════════════════════════════════╝');
|
|
579
|
+
console.error('');
|
|
580
|
+
console.error(`Backend URL: ${HTTP_BASE_URL}`);
|
|
581
|
+
console.error('');
|
|
582
|
+
try {
|
|
583
|
+
const server = new StdioHttpProxyServer();
|
|
584
|
+
await server.start();
|
|
585
|
+
}
|
|
586
|
+
catch (error) {
|
|
587
|
+
console.error(`💥 Fatal error: ${error}`);
|
|
588
|
+
process.exit(1);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
main();
|
|
592
|
+
//# sourceMappingURL=stdio-http-proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio-http-proxy.js","sourceRoot":"","sources":["../src/stdio-http-proxy.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,kCAAkC,EAClC,yBAAyB,GAG1B,MAA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