@subscriberbot/mcp 0.0.0-stage → 2026.1203.1

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 (4) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +107 -2
  3. package/dist/index.js +217 -0
  4. package/package.json +105 -4
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.
2
+
3
+ All rights reserved.
4
+
5
+ This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
9
+ For licensing inquiries, please contact: legal@algoshred.com
package/README.md CHANGED
@@ -1,3 +1,108 @@
1
- # Temporary Holding Version
1
+ # SubscriberBot MCP Server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Model Context Protocol (MCP) server for **SubscriberBot** — a thin shell over
4
+ [`@burdenoff/mcp-libs`](https://www.npmjs.com/package/@burdenoff/mcp-libs) that
5
+ exposes AI-assistant tools, resources, and prompts for the SubscriberBot platform
6
+ via GraphQL.
7
+
8
+ All module logic (auth, sandbox, the `subscriberbot` product surface, and the shared
9
+ platform modules) lives in `@burdenoff/mcp-libs`. This repository only:
10
+
11
+ 1. Builds the MCP context with SubscriberBot product defaults.
12
+ 2. Selects which modules to mount.
13
+ 3. Selects the transport (stdio by default, `--http` opt-in) and port.
14
+
15
+ ## Quick Start
16
+
17
+ ### 1. Install Dependencies
18
+
19
+ ```bash
20
+ cd ~/products/subscriberbot/subscriberbot-mcp
21
+ bun install
22
+ ```
23
+
24
+ ### 2. Configure in Claude Code
25
+
26
+ Add to your project's `.mcp.json` (or `~/.claude/settings.json` under `mcpServers`):
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "subscriberbot": {
32
+ "type": "stdio",
33
+ "command": "bun",
34
+ "args": ["run", "~/products/subscriberbot/subscriberbot-mcp/src/index.ts"],
35
+ "env": {
36
+ "SUBSCRIBERBOT_WORKSPACE_ENDPOINT": "http://localhost:4003/workspaces/graphql",
37
+ "SUBSCRIBERBOT_GLOBAL_ENDPOINT": "http://localhost:4000/global/graphql",
38
+ "LOG_LEVEL": "error"
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ### 3. Authenticate
46
+
47
+ On first use, ask Claude to call `subscriberbot_auth_login` — it returns a
48
+ verification URL and user code. Open the URL, enter the code, complete the login
49
+ in the browser, then ask Claude to call `subscriberbot_auth_complete`. Tokens are
50
+ persisted under `~/.config/subscriberbot-mcp/` (permissions `0o600`) and auto-refresh
51
+ before expiry.
52
+
53
+ ## Mounted Modules
54
+
55
+ The shell mounts the SubscriberBot product module plus the shared platform modules
56
+ from `@burdenoff/mcp-libs`:
57
+
58
+ `auth`, `subscriberbot`, `sandbox`, `rbac`, `organizations`, `tours`, `workspaces`,
59
+ `groups`, `tags`, `files`, `conversations`, `security`, `integrations`,
60
+ `channels`, `scheduler`, `export`, `notifications`, `support`, `products`,
61
+ `devportal`, `billing`, `store`.
62
+
63
+ Tool / resource / prompt names are product-prefixed (`subscriberbot_*`).
64
+
65
+ ## Development
66
+
67
+ ```bash
68
+ bun install # Install dependencies
69
+ bun run dev # Dev server (stdio, hot reload)
70
+ bun run server:http # HTTP transport mode
71
+ bun run test # Run wiring tests (vitest)
72
+ bun run sanity # typecheck + lint + format + build
73
+ bun run build # Production build
74
+ ```
75
+
76
+ Run as a binary after building:
77
+
78
+ ```bash
79
+ node dist/index.js # stdio transport
80
+ node dist/index.js --http --port 3030
81
+ ```
82
+
83
+ ## Environment Variables
84
+
85
+ Defaults point at PROD. Override per environment via `SUBSCRIBERBOT_*` env vars:
86
+
87
+ | Variable | Default | Description |
88
+ | ---------------------------------- | ------------------------------------------------------------ | ------------------------------------- |
89
+ | `SUBSCRIBERBOT_WORKSPACE_ENDPOINT` | `https://graphqlworkspaces.burdenoff.com/workspaces/graphql` | Workspace gateway |
90
+ | `SUBSCRIBERBOT_GLOBAL_ENDPOINT` | `https://graphql.burdenoff.com/global/graphql` | Global gateway |
91
+ | `SUBSCRIBERBOT_API_KEY` | — | API key auth (skips device code) |
92
+ | `SUBSCRIBERBOT_ACCESS_TOKEN` | — | Pre-set access token |
93
+ | `SUBSCRIBERBOT_WORKSPACE_ID` | — | Pre-select workspace |
94
+ | `SUBSCRIBERBOT_ORGANIZATION_ID` | — | Pre-select organization |
95
+ | `LOG_LEVEL` | `info` | Logging level (error/warn/info/debug) |
96
+
97
+ See `@burdenoff/mcp-libs` (`src/core/config/store.ts`) for the full list.
98
+
99
+ ## Publishing
100
+
101
+ Publishing is **held** (pre-launch). Pushing to `main` runs only the green gate
102
+ (lint, typecheck, test, build). Publishing `@subscriberbot/mcp` to npmjs happens
103
+ **only** via the manual `release.yml` workflow (`workflow_dispatch` or a `v*`
104
+ tag).
105
+
106
+ ## License
107
+
108
+ Proprietary — Copyright Burdenoff Consultancy Services Pvt. Ltd.
package/dist/index.js ADDED
@@ -0,0 +1,217 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { buildContext, createMcpServer } from "@burdenoff/mcp-libs/core";
5
+ import { startHttpServer, startStdioServer } from "@burdenoff/mcp-libs/transports";
6
+ import authModule from "@burdenoff/mcp-libs/modules/auth";
7
+ import billingModule from "@burdenoff/mcp-libs/modules/billing";
8
+ import conversationsModule from "@burdenoff/mcp-libs/modules/conversations";
9
+ import devportalModule from "@burdenoff/mcp-libs/modules/devportal";
10
+ import exportModule from "@burdenoff/mcp-libs/modules/export";
11
+ import filesModule from "@burdenoff/mcp-libs/modules/files";
12
+ import groupsModule from "@burdenoff/mcp-libs/modules/groups";
13
+ import integrationsModule from "@burdenoff/mcp-libs/modules/integrations";
14
+ import subscriberbotModule from "@burdenoff/mcp-libs/modules/subscriberbot";
15
+ import notificationsModule from "@burdenoff/mcp-libs/modules/notifications";
16
+ import organizationsModule from "@burdenoff/mcp-libs/modules/organizations";
17
+ import productsModule from "@burdenoff/mcp-libs/modules/products";
18
+ import rbacModule from "@burdenoff/mcp-libs/modules/rbac";
19
+ import sandboxModule from "@burdenoff/mcp-libs/modules/sandbox";
20
+ import schedulerModule from "@burdenoff/mcp-libs/modules/scheduler";
21
+ import securityModule from "@burdenoff/mcp-libs/modules/security";
22
+ import storeModule from "@burdenoff/mcp-libs/modules/store";
23
+ import supportModule from "@burdenoff/mcp-libs/modules/support";
24
+ import tagsModule from "@burdenoff/mcp-libs/modules/tags";
25
+ import toursModule from "@burdenoff/mcp-libs/modules/tours";
26
+ import workspacesModule from "@burdenoff/mcp-libs/modules/workspaces";
27
+ // package.json
28
+ var package_default = {
29
+ name: "@subscriberbot/mcp",
30
+ version: "2026.1203.1",
31
+ repository: {
32
+ type: "git",
33
+ url: "git+https://github.com/Algoshred/subscriberbot-mcp.git"
34
+ },
35
+ description: "SubscriberBot MCP Server — AI assistant tools for the SubscriberBot platform via GraphQL",
36
+ main: "dist/index.js",
37
+ type: "module",
38
+ scripts: {
39
+ build: "bun build src/index.ts --outdir dist --target node --packages external",
40
+ dev: "bun --watch src/index.ts",
41
+ start: "bun dist/index.js",
42
+ lint: "eslint .",
43
+ "lint:fix": "eslint . --fix",
44
+ format: "bun fmt src tests",
45
+ "format:check": "bun fmt --check src tests",
46
+ test: "bun test",
47
+ "test:coverage": "bun test --coverage",
48
+ clean: "rm -rf dist coverage junit.xml",
49
+ server: "bun src/index.ts",
50
+ "server:http": "bun src/index.ts --http",
51
+ sanity: "boff sanity",
52
+ prepare: "lefthook install || true",
53
+ "type:check": "boff gate -- bun check --no-pretty",
54
+ "sanity:force": "boff sanity --force",
55
+ audit: "bun audit --audit-level=high"
56
+ },
57
+ keywords: [
58
+ "mcp",
59
+ "model-context-protocol",
60
+ "typescript",
61
+ "subscriberbot",
62
+ "server",
63
+ "llm",
64
+ "ai",
65
+ "graphql"
66
+ ],
67
+ author: "AlgoShred Products",
68
+ license: "PROPRIETARY",
69
+ dependencies: {
70
+ "@modelcontextprotocol/sdk": "^1.32.2",
71
+ "@burdenoff/mcp-libs": "^2026.1107.5"
72
+ },
73
+ devDependencies: {
74
+ "@burdenoff/toolchain": "2026.1107.14",
75
+ "@types/bun": "^1.4.4",
76
+ eslint: "^9.39.5",
77
+ lefthook: "^2.2.2",
78
+ typescript: "6.0.3"
79
+ },
80
+ engines: {
81
+ node: ">=18.0.0",
82
+ bun: ">=1.4.4"
83
+ },
84
+ bin: {
85
+ "subscriberbot-mcp": "./dist/index.js"
86
+ },
87
+ files: [
88
+ "dist",
89
+ "README.md",
90
+ "LICENSE"
91
+ ],
92
+ publishConfig: {
93
+ access: "public",
94
+ registry: "https://registry.npmjs.org/"
95
+ },
96
+ overrides: {
97
+ lodash: ">=4.17.21",
98
+ "lodash-es": ">=4.17.21",
99
+ dompurify: ">=3.3.4",
100
+ "fast-xml-parser": ">=4.5.5",
101
+ "@xmldom/xmldom": ">=0.8.12",
102
+ swiper: ">=12.1.2",
103
+ "brace-expansion": ">=1.1.13",
104
+ "follow-redirects": ">=1.15.12",
105
+ "smol-toml": ">=1.6.1",
106
+ axios: ">=1.15.0",
107
+ flatted: ">=3.4.1",
108
+ yaml: ">=2.8.3",
109
+ picomatch: ">=2.3.2",
110
+ immutable: ">=3.8.3",
111
+ minimatch: ">=3.1.3",
112
+ hono: "^4.12.25",
113
+ "@hono/node-server": "1.19.10",
114
+ "express-rate-limit": "8.2.2",
115
+ "path-to-regexp": "8.4.0"
116
+ },
117
+ packageManager: "bun@1.4.4",
118
+ boff: {
119
+ type: "mcp",
120
+ sanity: {
121
+ formatPaths: [
122
+ "src",
123
+ "tests"
124
+ ]
125
+ },
126
+ coverage: {
127
+ global: 80,
128
+ diff: 80,
129
+ exclude: [
130
+ "src/index.ts"
131
+ ]
132
+ }
133
+ }
134
+ };
135
+
136
+ // src/product-defaults.ts
137
+ var productDefaults = {
138
+ configDirName: "subscriberbot-mcp",
139
+ oidcClientId: "burdenoff_mcp_subscriberbot",
140
+ oidcIssuerProd: "https://graphql.burdenoff.com/global",
141
+ workspaceEndpointDefault: "https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
142
+ globalEndpointDefault: "https://graphql.burdenoff.com/global/graphql",
143
+ httpPortDefault: 3000,
144
+ hostDefault: "127.0.0.1",
145
+ envPrefix: "SUBSCRIBERBOT"
146
+ };
147
+
148
+ // src/index.ts
149
+ var MODULES = [
150
+ authModule,
151
+ subscriberbotModule,
152
+ sandboxModule,
153
+ rbacModule,
154
+ organizationsModule,
155
+ toursModule,
156
+ workspacesModule,
157
+ groupsModule,
158
+ tagsModule,
159
+ filesModule,
160
+ conversationsModule,
161
+ securityModule,
162
+ integrationsModule,
163
+ schedulerModule,
164
+ exportModule,
165
+ notificationsModule,
166
+ supportModule,
167
+ productsModule,
168
+ devportalModule,
169
+ billingModule,
170
+ storeModule
171
+ ];
172
+ async function main() {
173
+ const args = process.argv.slice(2);
174
+ let mode = "stdio";
175
+ if (args.includes("--http") || args.includes("--transport=http")) {
176
+ mode = "http";
177
+ } else if (args.includes("--stdio") || args.includes("--transport=stdio")) {
178
+ mode = "stdio";
179
+ }
180
+ const portIdx = args.indexOf("--port");
181
+ const portArg = portIdx >= 0 ? args[portIdx + 1] : undefined;
182
+ const ctx = buildContext({
183
+ productName: "subscriberbot",
184
+ productVersion: package_default.version,
185
+ serverName: "subscriberbot-mcp",
186
+ serverVersion: package_default.version,
187
+ defaults: productDefaults
188
+ });
189
+ const port = portArg ? parseInt(portArg, 10) : ctx.config.read().httpPort;
190
+ ctx.logger.info("Starting SubscriberBot MCP server", {
191
+ mode,
192
+ name: "subscriberbot-mcp",
193
+ version: package_default.version,
194
+ modules: MODULES.length,
195
+ env: ctx.env,
196
+ workspaceEndpoint: ctx.config.read().workspaceEndpoint,
197
+ globalEndpoint: ctx.config.read().globalEndpoint
198
+ });
199
+ if (mode === "http") {
200
+ await startHttpServer(ctx, () => createMcpServer(ctx, MODULES, {
201
+ name: "subscriberbot-mcp",
202
+ version: package_default.version
203
+ }).server, { port });
204
+ } else {
205
+ const { server } = createMcpServer(ctx, MODULES, {
206
+ name: "subscriberbot-mcp",
207
+ version: package_default.version
208
+ });
209
+ await startStdioServer(server, ctx);
210
+ }
211
+ }
212
+ process.on("SIGINT", () => process.exit(0));
213
+ process.on("SIGTERM", () => process.exit(0));
214
+ main().catch((error) => {
215
+ console.error("Fatal error in subscriberbot-mcp:", error);
216
+ process.exit(1);
217
+ });
package/package.json CHANGED
@@ -1,6 +1,107 @@
1
1
  {
2
2
  "name": "@subscriberbot/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2026.1203.1",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/Algoshred/subscriberbot-mcp.git"
7
+ },
8
+ "description": "SubscriberBot MCP Server — AI assistant tools for the SubscriberBot platform via GraphQL",
9
+ "main": "dist/index.js",
10
+ "type": "module",
11
+ "scripts": {
12
+ "build": "bun build src/index.ts --outdir dist --target node --packages external",
13
+ "dev": "bun --watch src/index.ts",
14
+ "start": "bun dist/index.js",
15
+ "lint": "eslint .",
16
+ "lint:fix": "eslint . --fix",
17
+ "format": "bun fmt src tests",
18
+ "format:check": "bun fmt --check src tests",
19
+ "test": "bun test",
20
+ "test:coverage": "bun test --coverage",
21
+ "clean": "rm -rf dist coverage junit.xml",
22
+ "server": "bun src/index.ts",
23
+ "server:http": "bun src/index.ts --http",
24
+ "sanity": "boff sanity",
25
+ "prepare": "lefthook install || true",
26
+ "type:check": "boff gate -- bun check --no-pretty",
27
+ "sanity:force": "boff sanity --force",
28
+ "audit": "bun audit --audit-level=high"
29
+ },
30
+ "keywords": [
31
+ "mcp",
32
+ "model-context-protocol",
33
+ "typescript",
34
+ "subscriberbot",
35
+ "server",
36
+ "llm",
37
+ "ai",
38
+ "graphql"
39
+ ],
40
+ "author": "AlgoShred Products",
41
+ "license": "PROPRIETARY",
42
+ "dependencies": {
43
+ "@modelcontextprotocol/sdk": "^1.32.2",
44
+ "@burdenoff/mcp-libs": "^2026.1107.5"
45
+ },
46
+ "devDependencies": {
47
+ "@burdenoff/toolchain": "2026.1107.14",
48
+ "@types/bun": "^1.4.4",
49
+ "eslint": "^9.39.5",
50
+ "lefthook": "^2.2.2",
51
+ "typescript": "6.0.3"
52
+ },
53
+ "engines": {
54
+ "node": ">=18.0.0",
55
+ "bun": ">=1.4.4"
56
+ },
57
+ "bin": {
58
+ "subscriberbot-mcp": "./dist/index.js"
59
+ },
60
+ "files": [
61
+ "dist",
62
+ "README.md",
63
+ "LICENSE"
64
+ ],
65
+ "publishConfig": {
66
+ "access": "public",
67
+ "registry": "https://registry.npmjs.org/"
68
+ },
69
+ "overrides": {
70
+ "lodash": ">=4.17.21",
71
+ "lodash-es": ">=4.17.21",
72
+ "dompurify": ">=3.3.4",
73
+ "fast-xml-parser": ">=4.5.5",
74
+ "@xmldom/xmldom": ">=0.8.12",
75
+ "swiper": ">=12.1.2",
76
+ "brace-expansion": ">=1.1.13",
77
+ "follow-redirects": ">=1.15.12",
78
+ "smol-toml": ">=1.6.1",
79
+ "axios": ">=1.15.0",
80
+ "flatted": ">=3.4.1",
81
+ "yaml": ">=2.8.3",
82
+ "picomatch": ">=2.3.2",
83
+ "immutable": ">=3.8.3",
84
+ "minimatch": ">=3.1.3",
85
+ "hono": "^4.12.25",
86
+ "@hono/node-server": "1.19.10",
87
+ "express-rate-limit": "8.2.2",
88
+ "path-to-regexp": "8.4.0"
89
+ },
90
+ "packageManager": "bun@1.4.4",
91
+ "boff": {
92
+ "type": "mcp",
93
+ "sanity": {
94
+ "formatPaths": [
95
+ "src",
96
+ "tests"
97
+ ]
98
+ },
99
+ "coverage": {
100
+ "global": 80,
101
+ "diff": 80,
102
+ "exclude": [
103
+ "src/index.ts"
104
+ ]
105
+ }
106
+ }
107
+ }