@cfoundry/mcp 0.0.0-stage → 2026.1202.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 +118 -2
  3. package/dist/index.js +233 -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,119 @@
1
- # Temporary Holding Version
1
+ # Crewfoundry 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 **Crewfoundry** — 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 Crewfoundry platform
6
+ via GraphQL.
7
+
8
+ All module logic (auth, sandbox, the `crewfoundry` product surface, and the shared
9
+ platform modules) lives in `@burdenoff/mcp-libs`. This repository only:
10
+
11
+ 1. Builds the MCP context with Crewfoundry 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/crewfoundry/crewfoundry-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
+ "crewfoundry": {
32
+ "type": "stdio",
33
+ "command": "bun",
34
+ "args": ["run", "~/products/crewfoundry/crewfoundry-mcp/src/index.ts"],
35
+ "env": {
36
+ "CREWFOUNDRY_WORKSPACE_ENDPOINT": "http://localhost:4003/workspaces/graphql",
37
+ "CREWFOUNDRY_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 `crewfoundry_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 `crewfoundry_auth_complete`. Tokens are
50
+ persisted under `~/.config/crewfoundry-mcp/` (permissions `0o600`) and auto-refresh
51
+ before expiry.
52
+
53
+ ## Mounted Modules
54
+
55
+ The shell mounts the Crewfoundry product module plus the shared platform modules
56
+ from `@burdenoff/mcp-libs`:
57
+
58
+ `auth`, `crewfoundry`, `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 (`crewfoundry_*`).
64
+
65
+ ## Development
66
+
67
+ Toolchain: Bun 1.4.4 (`.bun-version`) and `@burdenoff/toolchain` (`boff`).
68
+
69
+ ```bash
70
+ bun install # Install dependencies (also installs the lefthook pre-push hook)
71
+ bun run dev # Dev server (stdio, hot reload via bun --watch)
72
+ bun run server:http # HTTP transport mode
73
+ bun run test # Wiring tests (bun test)
74
+ bun run type:check # Type check (bun check)
75
+ bun run lint # ESLint (toolchain node profile)
76
+ bun run format # Format src and tests (bun fmt, reads .prettierrc)
77
+ bun run sanity # Hash-stamped gate: format check, lint, type check, build, tests + coverage gate
78
+ bun run sanity:force # The same, ignoring the stamps
79
+ bun run build # Production build (bun build --target node -> dist/index.js)
80
+ bun run audit # bun audit --audit-level=high
81
+ ```
82
+
83
+ `bun run sanity` only re-runs the steps whose inputs changed; the pre-push hook
84
+ runs it, and CI runs it with `--force` on `main`.
85
+
86
+ Run as a binary after building:
87
+
88
+ ```bash
89
+ node dist/index.js # stdio transport
90
+ node dist/index.js --http --port 3030
91
+ ```
92
+
93
+ ## Environment Variables
94
+
95
+ Defaults point at PROD. Override per environment via `CREWFOUNDRY_*` env vars:
96
+
97
+ | Variable | Default | Description |
98
+ |----------|---------|-------------|
99
+ | `CREWFOUNDRY_WORKSPACE_ENDPOINT` | `https://graphqlworkspaces.burdenoff.com/workspaces/graphql` | Workspace gateway |
100
+ | `CREWFOUNDRY_GLOBAL_ENDPOINT` | `https://graphql.burdenoff.com/global/graphql` | Global gateway |
101
+ | `CREWFOUNDRY_API_KEY` | — | API key auth (skips device code) |
102
+ | `CREWFOUNDRY_ACCESS_TOKEN` | — | Pre-set access token |
103
+ | `CREWFOUNDRY_WORKSPACE_ID` | — | Pre-select workspace |
104
+ | `CREWFOUNDRY_ORGANIZATION_ID` | — | Pre-select organization |
105
+ | `LOG_LEVEL` | `info` | Logging level (error/warn/info/debug) |
106
+
107
+ See `@burdenoff/mcp-libs` (`src/core/config/store.ts`) for the full list.
108
+
109
+ ## Publishing
110
+
111
+ Publishing is **held** (pre-launch). Pushing to `main` runs only the green gate
112
+ (`ci.yml`: format, lint, type check, build, tests, the MCP stdio handshake smoke and
113
+ `bun audit`). Publishing `@cfoundry/mcp` to npmjs happens **only** via the
114
+ manual `release.yml` workflow: run it from the Actions tab (optionally as a dry run)
115
+ or push a CalVer tag (`2026.1107.1`).
116
+
117
+ ## License
118
+
119
+ Proprietary — Copyright Burdenoff Consultancy Services Pvt. Ltd.
package/dist/index.js ADDED
@@ -0,0 +1,233 @@
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 channelsModule from "@burdenoff/mcp-libs/modules/channels";
9
+ import conversationsModule from "@burdenoff/mcp-libs/modules/conversations";
10
+ import devportalModule from "@burdenoff/mcp-libs/modules/devportal";
11
+ import exportModule from "@burdenoff/mcp-libs/modules/export";
12
+ import filesModule from "@burdenoff/mcp-libs/modules/files";
13
+ import groupsModule from "@burdenoff/mcp-libs/modules/groups";
14
+ import integrationsModule from "@burdenoff/mcp-libs/modules/integrations";
15
+ import crewfoundryModule from "@burdenoff/mcp-libs/modules/crewfoundry";
16
+ import notificationsModule from "@burdenoff/mcp-libs/modules/notifications";
17
+ import organizationsModule from "@burdenoff/mcp-libs/modules/organizations";
18
+ import productsModule from "@burdenoff/mcp-libs/modules/products";
19
+ import rbacModule from "@burdenoff/mcp-libs/modules/rbac";
20
+ import sandboxModule from "@burdenoff/mcp-libs/modules/sandbox";
21
+ import schedulerModule from "@burdenoff/mcp-libs/modules/scheduler";
22
+ import securityModule from "@burdenoff/mcp-libs/modules/security";
23
+ import storeModule from "@burdenoff/mcp-libs/modules/store";
24
+ import supportModule from "@burdenoff/mcp-libs/modules/support";
25
+ import tagsModule from "@burdenoff/mcp-libs/modules/tags";
26
+ import toursModule from "@burdenoff/mcp-libs/modules/tours";
27
+ import workspacesModule from "@burdenoff/mcp-libs/modules/workspaces";
28
+ // package.json
29
+ var package_default = {
30
+ name: "@cfoundry/mcp",
31
+ version: "2026.1202.1",
32
+ repository: {
33
+ type: "git",
34
+ url: "git+https://github.com/Algoshred/crewfoundry-mcp.git"
35
+ },
36
+ description: "Crewfoundry MCP Server — AI assistant tools for the Crewfoundry platform via GraphQL",
37
+ main: "dist/index.js",
38
+ type: "module",
39
+ scripts: {
40
+ build: "bun build src/index.ts --outdir dist --target node --packages external",
41
+ dev: "bun --watch src/index.ts",
42
+ start: "bun dist/index.js",
43
+ lint: "eslint .",
44
+ "lint:fix": "eslint . --fix",
45
+ format: "bun fmt src tests",
46
+ "format:check": "bun fmt --check src tests",
47
+ test: "bun test",
48
+ "test:coverage": "bun test --coverage",
49
+ clean: "rm -rf dist coverage junit.xml",
50
+ server: "bun src/index.ts",
51
+ "server:http": "bun src/index.ts --http",
52
+ sanity: "boff sanity",
53
+ prepare: "lefthook install || true",
54
+ "type:check": "boff gate -- bun check --no-pretty",
55
+ "sanity:force": "boff sanity --force",
56
+ audit: "bun audit --audit-level=high"
57
+ },
58
+ keywords: [
59
+ "mcp",
60
+ "model-context-protocol",
61
+ "typescript",
62
+ "crewfoundry",
63
+ "server",
64
+ "llm",
65
+ "ai",
66
+ "graphql"
67
+ ],
68
+ author: "AlgoShred Products",
69
+ license: "PROPRIETARY",
70
+ dependencies: {
71
+ "@burdenoff/mcp-libs": "^2026.1106.1",
72
+ "@modelcontextprotocol/sdk": "^1.32.2"
73
+ },
74
+ devDependencies: {
75
+ "@burdenoff/toolchain": "2026.1107.13",
76
+ "@types/bun": "^1.4.4",
77
+ eslint: "^9.39.5",
78
+ lefthook: "^2.2.2",
79
+ typescript: "6.0.3"
80
+ },
81
+ engines: {
82
+ node: ">=18.0.0",
83
+ bun: ">=1.4.4"
84
+ },
85
+ bin: {
86
+ "crewfoundry-mcp": "./dist/index.js"
87
+ },
88
+ files: [
89
+ "dist",
90
+ "README.md",
91
+ "LICENSE"
92
+ ],
93
+ publishConfig: {
94
+ access: "public",
95
+ registry: "https://registry.npmjs.org/"
96
+ },
97
+ overrides: {
98
+ lodash: ">=4.17.21",
99
+ "lodash-es": ">=4.17.21",
100
+ dompurify: ">=3.3.4",
101
+ "fast-xml-parser": ">=4.5.5",
102
+ "@xmldom/xmldom": ">=0.8.12",
103
+ swiper: ">=12.1.2",
104
+ "brace-expansion": ">=1.1.13",
105
+ "follow-redirects": ">=1.15.12",
106
+ "smol-toml": ">=1.6.1",
107
+ axios: ">=1.15.0",
108
+ flatted: ">=3.4.1",
109
+ yaml: ">=2.8.3",
110
+ picomatch: ">=2.3.2",
111
+ immutable: ">=3.8.3",
112
+ minimatch: ">=3.1.3",
113
+ hono: "^4.12.25",
114
+ "@hono/node-server": "1.19.10",
115
+ "express-rate-limit": "8.2.2",
116
+ "path-to-regexp": "8.4.0"
117
+ },
118
+ packageManager: "bun@1.4.4",
119
+ boff: {
120
+ type: "mcp",
121
+ sanity: {
122
+ formatPaths: [
123
+ "src",
124
+ "tests"
125
+ ]
126
+ },
127
+ coverage: {
128
+ global: 80,
129
+ diff: 80,
130
+ exclude: [
131
+ "src/index.ts"
132
+ ]
133
+ }
134
+ }
135
+ };
136
+
137
+ // src/product-defaults.ts
138
+ var productDefaults = {
139
+ configDirName: "crewfoundry-mcp",
140
+ oidcClientId: "burdenoff_mcp_crewfoundry",
141
+ oidcIssuerProd: "https://graphql.burdenoff.com/global",
142
+ workspaceEndpointDefault: "https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
143
+ globalEndpointDefault: "https://graphql.burdenoff.com/global/graphql",
144
+ httpPortDefault: 3000,
145
+ hostDefault: "127.0.0.1",
146
+ envPrefix: "CREWFOUNDRY"
147
+ };
148
+
149
+ // src/index.ts
150
+ var MODULES = [
151
+ authModule,
152
+ crewfoundryModule,
153
+ sandboxModule,
154
+ rbacModule,
155
+ organizationsModule,
156
+ toursModule,
157
+ workspacesModule,
158
+ groupsModule,
159
+ tagsModule,
160
+ filesModule,
161
+ conversationsModule,
162
+ securityModule,
163
+ integrationsModule,
164
+ channelsModule,
165
+ schedulerModule,
166
+ exportModule,
167
+ notificationsModule,
168
+ supportModule,
169
+ productsModule,
170
+ devportalModule,
171
+ billingModule,
172
+ storeModule
173
+ ];
174
+ async function main() {
175
+ const args = process.argv.slice(2);
176
+ let mode = "stdio";
177
+ if (args.includes("--http") || args.includes("--transport=http")) {
178
+ mode = "http";
179
+ } else if (args.includes("--stdio") || args.includes("--transport=stdio")) {
180
+ mode = "stdio";
181
+ }
182
+ const portIdx = args.indexOf("--port");
183
+ const portArg = portIdx >= 0 ? args[portIdx + 1] : undefined;
184
+ const ctx = buildContext({
185
+ productName: "crewfoundry",
186
+ productVersion: package_default.version,
187
+ serverName: "crewfoundry-mcp",
188
+ serverVersion: package_default.version,
189
+ defaults: productDefaults
190
+ });
191
+ const port = portArg ? parseInt(portArg, 10) : ctx.config.read().httpPort;
192
+ ctx.logger.info("Starting Crewfoundry MCP server", {
193
+ mode,
194
+ name: "crewfoundry-mcp",
195
+ version: package_default.version,
196
+ modules: MODULES.length,
197
+ env: ctx.env,
198
+ workspaceEndpoint: ctx.config.read().workspaceEndpoint,
199
+ globalEndpoint: ctx.config.read().globalEndpoint
200
+ });
201
+ const governance = {
202
+ enforceDestructiveConfirmation: true,
203
+ onToolCall: (event) => {
204
+ ctx.logger.info("mcp tool call", {
205
+ tool: event.name,
206
+ argsSha256: event.argsSha256,
207
+ status: event.status,
208
+ durationMs: event.durationMs,
209
+ ...event.error ? { error: event.error } : {}
210
+ });
211
+ }
212
+ };
213
+ if (mode === "http") {
214
+ await startHttpServer(ctx, () => createMcpServer(ctx, MODULES, {
215
+ name: "crewfoundry-mcp",
216
+ version: package_default.version,
217
+ ...governance
218
+ }).server, { port });
219
+ } else {
220
+ const { server } = createMcpServer(ctx, MODULES, {
221
+ name: "crewfoundry-mcp",
222
+ version: package_default.version,
223
+ ...governance
224
+ });
225
+ await startStdioServer(server, ctx);
226
+ }
227
+ }
228
+ process.on("SIGINT", () => process.exit(0));
229
+ process.on("SIGTERM", () => process.exit(0));
230
+ main().catch((error) => {
231
+ console.error("Fatal error in crewfoundry-mcp:", error);
232
+ process.exit(1);
233
+ });
package/package.json CHANGED
@@ -1,6 +1,107 @@
1
1
  {
2
2
  "name": "@cfoundry/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2026.1202.1",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/Algoshred/crewfoundry-mcp.git"
7
+ },
8
+ "description": "Crewfoundry MCP Server — AI assistant tools for the Crewfoundry 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
+ "crewfoundry",
35
+ "server",
36
+ "llm",
37
+ "ai",
38
+ "graphql"
39
+ ],
40
+ "author": "AlgoShred Products",
41
+ "license": "PROPRIETARY",
42
+ "dependencies": {
43
+ "@burdenoff/mcp-libs": "^2026.1106.1",
44
+ "@modelcontextprotocol/sdk": "^1.32.2"
45
+ },
46
+ "devDependencies": {
47
+ "@burdenoff/toolchain": "2026.1107.13",
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
+ "crewfoundry-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
+ }