@debugbundle/mcp 0.1.9 → 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/README.md CHANGED
@@ -36,7 +36,7 @@ The server uses stdio transport and exposes the same DebugBundle incident, incid
36
36
 
37
37
  ## Authentication
38
38
 
39
- Local use reuses CLI auth state from `~/.debugbundle/auth.json` when available. Headless clients can pass `bearerToken` in tool arguments.
39
+ Local use reuses CLI auth state from `~/.debugbundle/auth.json` when available. Headless or marketplace-managed clients can set `DEBUGBUNDLE_MEMBER_TOKEN` in the MCP server environment. Individual tool calls can still pass `bearerToken` explicitly when needed.
40
40
 
41
41
  ## License
42
42
 
package/dist/main.cjs CHANGED
@@ -15665,7 +15665,8 @@ function createRetrievalApi(client) {
15665
15665
  BundleSchema,
15666
15666
  external_exports.object({
15667
15667
  status: external_exports.literal("failed"),
15668
- reason: external_exports.string()
15668
+ reason: external_exports.string(),
15669
+ related_incident_ids: external_exports.array(external_exports.string()).optional()
15669
15670
  }).strict()
15670
15671
  ])
15671
15672
  );
@@ -19911,6 +19912,7 @@ var import_ioredis3 = __toESM(require_built3(), 1);
19911
19912
 
19912
19913
  // ../../packages/storage/src/redis-queue.ts
19913
19914
  var import_ioredis4 = __toESM(require_built3(), 1);
19915
+ var DEFAULT_PROCESSING_TIMEOUT_MS = 5 * 60 * 1e3;
19914
19916
 
19915
19917
  // ../../packages/storage/src/schema-migrations.ts
19916
19918
  var import_node_crypto3 = require("node:crypto");
@@ -26397,6 +26399,15 @@ function createWeeklyReportMcpTools(api) {
26397
26399
 
26398
26400
  // src/default-tools.ts
26399
26401
  var DEFAULT_API_BASE_URL = "https://api.debugbundle.com";
26402
+ var MEMBER_TOKEN_ENV_VAR = "DEBUGBUNDLE_MEMBER_TOKEN";
26403
+ function readEnvMemberToken() {
26404
+ const rawToken = process.env[MEMBER_TOKEN_ENV_VAR];
26405
+ if (typeof rawToken !== "string") {
26406
+ return null;
26407
+ }
26408
+ const token = rawToken.trim();
26409
+ return token.length > 0 ? token : null;
26410
+ }
26400
26411
  async function readLocalAuthState() {
26401
26412
  try {
26402
26413
  return await readCliAuthState({});
@@ -26417,8 +26428,8 @@ function withDefaultBearerToken(tools, bearerToken) {
26417
26428
  }
26418
26429
  async function createDefaultMcpTools(input = {}) {
26419
26430
  const authState = await readLocalAuthState();
26420
- const baseUrl = input.apiBaseUrl ?? authState?.base_url ?? process.env["DEBUGBUNDLE_API_URL"] ?? DEFAULT_API_BASE_URL;
26421
- const defaultBearerToken = authState?.bearer_token ?? null;
26431
+ const baseUrl = input.apiBaseUrl ?? process.env["DEBUGBUNDLE_API_URL"] ?? authState?.base_url ?? DEFAULT_API_BASE_URL;
26432
+ const defaultBearerToken = readEnvMemberToken() ?? authState?.bearer_token ?? null;
26422
26433
  const httpClient = createCliHttpClient({ baseUrl });
26423
26434
  const retrievalApi = createRetrievalApi(httpClient);
26424
26435
  return withDefaultBearerToken(
@@ -27744,6 +27755,46 @@ var zodToJsonSchema = (schema, options) => {
27744
27755
  return combined;
27745
27756
  };
27746
27757
 
27758
+ // package.json
27759
+ var package_default = {
27760
+ name: "@debugbundle/mcp",
27761
+ mcpName: "com.debugbundle/mcp",
27762
+ version: "1.0.0",
27763
+ private: false,
27764
+ description: "Model Context Protocol server for DebugBundle",
27765
+ license: "AGPL-3.0-only",
27766
+ repository: {
27767
+ type: "git",
27768
+ url: "https://github.com/debugbundle/debugbundle",
27769
+ directory: "apps/mcp"
27770
+ },
27771
+ homepage: "https://debugbundle.com/docs/mcp",
27772
+ bugs: {
27773
+ url: "https://github.com/debugbundle/debugbundle/issues"
27774
+ },
27775
+ keywords: ["debugbundle", "debugging", "ai-agent", "mcp", "model-context-protocol"],
27776
+ engines: {
27777
+ node: ">=22 <27"
27778
+ },
27779
+ type: "module",
27780
+ scripts: {
27781
+ start: "tsx src/entrypoint.ts",
27782
+ build: "esbuild src/entrypoint.ts --bundle --platform=node --format=cjs --target=node22 --external:@node-rs/argon2 --outfile=dist/main.cjs",
27783
+ prepack: "npm run build"
27784
+ },
27785
+ bin: {
27786
+ "debugbundle-mcp": "bin/debugbundle-mcp.js"
27787
+ },
27788
+ files: ["bin", "dist", "README.md", "LICENSE", "server.json"],
27789
+ dependencies: {
27790
+ "@node-rs/argon2": "^2.0.2"
27791
+ },
27792
+ devDependencies: {
27793
+ esbuild: "^0.27.3",
27794
+ tsx: "^4.20.5"
27795
+ }
27796
+ };
27797
+
27747
27798
  // src/tool-catalog.ts
27748
27799
  var jsonObjectSchema = external_exports.record(external_exports.unknown());
27749
27800
  var optionalBearerTokenSchema = external_exports.string().optional();
@@ -28617,6 +28668,7 @@ var MCP_TOOL_CATALOG = [
28617
28668
  var MCP_TOOL_NAMES = MCP_TOOL_CATALOG.map((tool) => tool.name);
28618
28669
 
28619
28670
  // src/server.ts
28671
+ var MCP_SERVER_VERSION = package_default.version;
28620
28672
  function isRecord3(value) {
28621
28673
  return typeof value === "object" && value !== null && !Array.isArray(value);
28622
28674
  }
@@ -28692,7 +28744,7 @@ function createMcpServer(input) {
28692
28744
  },
28693
28745
  serverInfo: {
28694
28746
  name: "@debugbundle/mcp",
28695
- version: "0.1.2"
28747
+ version: MCP_SERVER_VERSION
28696
28748
  }
28697
28749
  }
28698
28750
  };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@debugbundle/mcp",
3
- "version": "0.1.9",
3
+ "mcpName": "com.debugbundle/mcp",
4
+ "version": "1.0.0",
4
5
  "private": false,
5
6
  "description": "Model Context Protocol server for DebugBundle",
6
7
  "license": "AGPL-3.0-only",
@@ -26,7 +27,7 @@
26
27
  "bin": {
27
28
  "debugbundle-mcp": "bin/debugbundle-mcp.js"
28
29
  },
29
- "files": ["bin", "dist", "README.md", "LICENSE"],
30
+ "files": ["bin", "dist", "README.md", "LICENSE", "server.json"],
30
31
  "dependencies": {
31
32
  "@node-rs/argon2": "^2.0.2"
32
33
  },
package/server.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "com.debugbundle/mcp",
4
+ "title": "DebugBundle",
5
+ "description": "Investigate DebugBundle incidents, bundles, reproductions, probes, alerts, webhooks, projects, members, billing, GitHub automation, and local setup from MCP clients.",
6
+ "repository": {
7
+ "url": "https://github.com/debugbundle/debugbundle",
8
+ "source": "github",
9
+ "subfolder": "apps/mcp"
10
+ },
11
+ "version": "1.0.0",
12
+ "packages": [
13
+ {
14
+ "registryType": "npm",
15
+ "registryBaseUrl": "https://registry.npmjs.org",
16
+ "identifier": "@debugbundle/mcp",
17
+ "version": "1.0.0",
18
+ "transport": {
19
+ "type": "stdio"
20
+ },
21
+ "environmentVariables": [
22
+ {
23
+ "name": "DEBUGBUNDLE_MEMBER_TOKEN",
24
+ "description": "Optional DebugBundle member token used by hosted API and MCP management tools when CLI auth state is unavailable.",
25
+ "format": "string",
26
+ "isRequired": false,
27
+ "isSecret": true
28
+ },
29
+ {
30
+ "name": "DEBUGBUNDLE_API_URL",
31
+ "description": "Optional DebugBundle API base URL for self-hosted, staging, or other non-default API environments.",
32
+ "format": "string",
33
+ "isRequired": false,
34
+ "isSecret": false
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }