substack-notes-mcp 1.1.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 +72 -0
- package/bin/cli.mjs +49 -0
- package/package.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Substack Notes MCP
|
|
2
|
+
|
|
3
|
+
Create, schedule, and manage your Substack notes from any AI assistant — Claude Desktop, Claude Code, or Cursor.
|
|
4
|
+
|
|
5
|
+
Built by [Jenny Ouyang](https://buildtolaunch.substack.com).
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
### 1. Get your API token
|
|
10
|
+
|
|
11
|
+
Go to [quickviralnotes.com/settings](https://quickviralnotes.com/settings) and generate an MCP API token.
|
|
12
|
+
|
|
13
|
+
### 2. Connect your AI assistant
|
|
14
|
+
|
|
15
|
+
**Claude Desktop** — add to your `claude_desktop_config.json`:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"substack-notes": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "substack-notes-mcp", "--token", "YOUR_TOKEN"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Claude Code** — run:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
claude mcp add substack-notes -- npx -y substack-notes-mcp --token YOUR_TOKEN
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Cursor** — add to your MCP settings:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"substack-notes": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "substack-notes-mcp", "--token", "YOUR_TOKEN"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or connect directly via Streamable HTTP:
|
|
48
|
+
|
|
49
|
+
- **URL:** `https://qvn-mcp.vercel.app/mcp`
|
|
50
|
+
- **Header:** `Authorization: Bearer YOUR_TOKEN`
|
|
51
|
+
|
|
52
|
+
## Available Tools
|
|
53
|
+
|
|
54
|
+
| Tool | Description |
|
|
55
|
+
|------|-------------|
|
|
56
|
+
| `get_notes_dashboard` | View published and planned notes with category distributions |
|
|
57
|
+
| `get_published_notes` | List your recently published notes |
|
|
58
|
+
| `get_planned_notes` | View planned notes and open scheduling slots |
|
|
59
|
+
| `get_unscheduled_notes` | Get notes ready to be scheduled |
|
|
60
|
+
| `create_note` | Create a new note with HTML content and category |
|
|
61
|
+
| `schedule_note` | Set or update the planned date for a note |
|
|
62
|
+
| `unschedule_note` | Remove the planned date from a note |
|
|
63
|
+
| `mark_note_published` | Mark a note as published with optional Substack URL |
|
|
64
|
+
|
|
65
|
+
## Requirements
|
|
66
|
+
|
|
67
|
+
- Node.js 18+
|
|
68
|
+
- A Quick Viral Notes account with an active subscription
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Substack Notes MCP — thin CLI that proxies STDIO to the remote MCP server.
|
|
5
|
+
*
|
|
6
|
+
* Usage (Claude Desktop / Claude Code config):
|
|
7
|
+
* npx substack-notes-mcp --token YOUR_TOKEN
|
|
8
|
+
*
|
|
9
|
+
* This spawns mcp-remote which bridges STDIO ↔ Streamable HTTP,
|
|
10
|
+
* so local MCP clients can talk to the Vercel-hosted server.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { spawn } from 'child_process';
|
|
14
|
+
import { createRequire } from 'module';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
import { dirname, join } from 'path';
|
|
17
|
+
|
|
18
|
+
const MCP_SERVER_URL = 'https://qvn-mcp.vercel.app/mcp';
|
|
19
|
+
|
|
20
|
+
function getToken() {
|
|
21
|
+
const tokenIdx = process.argv.indexOf('--token');
|
|
22
|
+
if (tokenIdx === -1 || !process.argv[tokenIdx + 1]) {
|
|
23
|
+
console.error('Error: --token is required.');
|
|
24
|
+
console.error('Usage: npx substack-notes-mcp --token YOUR_QVN_TOKEN');
|
|
25
|
+
console.error('Generate a token at https://quickviralnotes.com/settings');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
return process.argv[tokenIdx + 1];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const token = getToken();
|
|
32
|
+
|
|
33
|
+
const require = createRequire(import.meta.url);
|
|
34
|
+
const mcpRemotePath = require.resolve('mcp-remote/dist/proxy.js');
|
|
35
|
+
|
|
36
|
+
const child = spawn(
|
|
37
|
+
process.execPath,
|
|
38
|
+
[
|
|
39
|
+
mcpRemotePath,
|
|
40
|
+
MCP_SERVER_URL,
|
|
41
|
+
'--header',
|
|
42
|
+
`Authorization: Bearer ${token}`,
|
|
43
|
+
'--transport',
|
|
44
|
+
'http-only',
|
|
45
|
+
],
|
|
46
|
+
{ stdio: 'inherit' }
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
child.on('exit', (code) => process.exit(code ?? 0));
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "substack-notes-mcp",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "MCP server for Substack Notes — create, schedule, and manage your notes from any AI assistant.",
|
|
5
|
+
"author": "Jenny Ouyang",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://buildtolaunch.substack.com",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/jenny-ouyang/qvn-mcp"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"substack",
|
|
15
|
+
"notes",
|
|
16
|
+
"scheduling",
|
|
17
|
+
"ai",
|
|
18
|
+
"claude",
|
|
19
|
+
"cursor",
|
|
20
|
+
"model-context-protocol"
|
|
21
|
+
],
|
|
22
|
+
"bin": {
|
|
23
|
+
"substack-notes-mcp": "./bin/cli.mjs"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"bin/",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"mcp-remote": "^0.1.38"
|
|
31
|
+
}
|
|
32
|
+
}
|