@postbye/mcp 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +105 -2
- package/bin/postbye-mcp.js +29 -0
- package/package.json +29 -4
- package/src/proxy.js +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Postbye Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
|
1
|
-
|
|
1
|
+
Postbye (postbye.com) cancels subscriptions for you by mailing a formal cancellation letter, tracked until it is delivered.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @postbye/mcp
|
|
4
|
+
|
|
5
|
+
A small stdio proxy that connects local MCP clients (Claude Desktop, Cursor, VS Code and others) to Postbye's public, read-only MCP server at <https://postbye.com/mcp>. No API key and no account are needed.
|
|
6
|
+
|
|
7
|
+
The server exposes four tools:
|
|
8
|
+
|
|
9
|
+
| Tool | What it does |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `search_companies` | Find a company by name among the subscriptions and memberships Postbye has a cancellation guide for. Returns the slug, category and how the company takes cancellations. |
|
|
12
|
+
| `get_cancellation_guide` | How one company takes cancellations: notice period, traps to check first, billing-partner notes, sources, verification date and mailing address(es). |
|
|
13
|
+
| `get_cancellation_letter` | A plain-text cancellation letter for one company plus where to send it. Nothing is stored. |
|
|
14
|
+
| `list_categories` | The guide categories (streaming, gyms, phone and internet, insurance and more) with guide counts. |
|
|
15
|
+
|
|
16
|
+
More details: <https://postbye.com/mcp-server>
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
Run it without installing anything:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx -y @postbye/mcp
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or install it globally:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g @postbye/mcp
|
|
30
|
+
postbye-mcp
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Requires Node.js 18 or newer.
|
|
34
|
+
|
|
35
|
+
## Claude Desktop
|
|
36
|
+
|
|
37
|
+
Add this to `claude_desktop_config.json` (Settings, Developer, Edit Config), then restart Claude Desktop:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"mcpServers": {
|
|
42
|
+
"postbye": {
|
|
43
|
+
"command": "npx",
|
|
44
|
+
"args": ["-y", "@postbye/mcp"]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Cursor
|
|
51
|
+
|
|
52
|
+
Add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project):
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"postbye": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": ["-y", "@postbye/mcp"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## VS Code
|
|
66
|
+
|
|
67
|
+
Add this to `.vscode/mcp.json` in your workspace (or run "MCP: Open User Configuration"):
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"servers": {
|
|
72
|
+
"postbye": {
|
|
73
|
+
"type": "stdio",
|
|
74
|
+
"command": "npx",
|
|
75
|
+
"args": ["-y", "@postbye/mcp"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Remote clients
|
|
82
|
+
|
|
83
|
+
Clients that speak Streamable HTTP can skip this package and connect straight to `https://postbye.com/mcp`.
|
|
84
|
+
|
|
85
|
+
## Configuration
|
|
86
|
+
|
|
87
|
+
| Variable | Default | Purpose |
|
|
88
|
+
| --- | --- | --- |
|
|
89
|
+
| `POSTBYE_MCP_URL` | `https://postbye.com/mcp` | Override the upstream MCP endpoint. |
|
|
90
|
+
|
|
91
|
+
## Development
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npm install
|
|
95
|
+
npm test # live smoke test: tools/list must return the 4 tools
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Links
|
|
99
|
+
|
|
100
|
+
- Homepage and docs: <https://postbye.com/mcp-server>
|
|
101
|
+
- Repository: <https://github.com/postbye-team/postbye-mcp>
|
|
102
|
+
- Support: support@postbye.com
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT. Author: Postbye Team.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { createProxy, VERSION } from "../src/proxy.js";
|
|
4
|
+
|
|
5
|
+
if (process.argv.includes("--version") || process.argv.includes("-v")) {
|
|
6
|
+
console.log(VERSION);
|
|
7
|
+
process.exit(0);
|
|
8
|
+
}
|
|
9
|
+
if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
10
|
+
console.log(
|
|
11
|
+
"postbye-mcp: stdio MCP proxy for https://postbye.com/mcp (set POSTBYE_MCP_URL to override).\nDocs: https://postbye.com/mcp-server",
|
|
12
|
+
);
|
|
13
|
+
process.exit(0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
const { server, client } = await createProxy();
|
|
18
|
+
await server.connect(new StdioServerTransport());
|
|
19
|
+
const shutdown = async () => {
|
|
20
|
+
await Promise.allSettled([server.close(), client.close()]);
|
|
21
|
+
process.exit(0);
|
|
22
|
+
};
|
|
23
|
+
process.on("SIGINT", shutdown);
|
|
24
|
+
process.on("SIGTERM", shutdown);
|
|
25
|
+
process.stdin.on("close", shutdown);
|
|
26
|
+
} catch (err) {
|
|
27
|
+
console.error(`postbye-mcp: could not reach the Postbye MCP server: ${err?.message ?? err}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postbye/mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Stdio MCP proxy for the Postbye cancellation-guide server: search companies, get cancellation guides and ready-to-send cancellation letters from Claude Desktop, Cursor or VS Code.",
|
|
5
|
+
"keywords": ["mcp", "model-context-protocol", "postbye", "cancel-subscription", "cancellation-letter", "claude", "cursor"],
|
|
6
|
+
"homepage": "https://postbye.com/mcp-server",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/postbye-team/postbye-mcp.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/postbye-team/postbye-mcp/issues",
|
|
13
|
+
"email": "support@postbye.com"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "Postbye Team <support@postbye.com>",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"bin": {
|
|
19
|
+
"postbye-mcp": "bin/postbye-mcp.js"
|
|
20
|
+
},
|
|
21
|
+
"main": "src/proxy.js",
|
|
22
|
+
"files": ["bin", "src", "README.md", "LICENSE"],
|
|
23
|
+
"engines": { "node": ">=18" },
|
|
24
|
+
"publishConfig": { "access": "public" },
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "node --test test/smoke.test.js"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.32.2"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/proxy.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
|
+
import {
|
|
5
|
+
CallToolRequestSchema,
|
|
6
|
+
ListToolsRequestSchema,
|
|
7
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_URL = "https://postbye.com/mcp";
|
|
10
|
+
export const VERSION = "1.0.0";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Connect to the remote Postbye MCP server and return a stdio-ready Server that
|
|
14
|
+
* forwards tools/list and tools/call to it.
|
|
15
|
+
*/
|
|
16
|
+
export async function createProxy(url = process.env.POSTBYE_MCP_URL || DEFAULT_URL) {
|
|
17
|
+
const client = new Client({ name: "postbye-mcp", version: VERSION });
|
|
18
|
+
try {
|
|
19
|
+
await client.connect(new StreamableHTTPClientTransport(new URL(url)));
|
|
20
|
+
} catch {
|
|
21
|
+
// one retry for a transient network error
|
|
22
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
23
|
+
await client.connect(new StreamableHTTPClientTransport(new URL(url)));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const server = new Server(
|
|
27
|
+
{ name: "postbye", version: VERSION },
|
|
28
|
+
{
|
|
29
|
+
capabilities: { tools: {} },
|
|
30
|
+
instructions: client.getInstructions(),
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => client.listTools());
|
|
35
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) =>
|
|
36
|
+
client.callTool(request.params),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return { server, client };
|
|
40
|
+
}
|