@mushi-mushi/mcp 0.18.4 → 0.19.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/dist/index.js +37 -7
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
5
|
import { createRequire } from "module";
|
|
6
|
+
import { readFileSync } from "fs";
|
|
7
|
+
import { join } from "path";
|
|
8
|
+
import { homedir } from "os";
|
|
6
9
|
import { createLogger as createLogger2, DEFAULT_API_ENDPOINT } from "@mushi-mushi/core";
|
|
7
10
|
|
|
8
11
|
// src/catalog.ts
|
|
@@ -3105,9 +3108,26 @@ console.warn = _writeStderr;
|
|
|
3105
3108
|
var require2 = createRequire(import.meta.url);
|
|
3106
3109
|
var VERSION = require2("../package.json").version;
|
|
3107
3110
|
var log = createLogger2({ scope: "mushi:mcp", level: "info", destination: "stderr" });
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
+
function readCliConfig() {
|
|
3112
|
+
try {
|
|
3113
|
+
const xdg = process.env.XDG_CONFIG_HOME;
|
|
3114
|
+
const appData = process.env.APPDATA;
|
|
3115
|
+
const base = xdg && xdg.length > 0 ? xdg : process.platform === "win32" && appData && appData.length > 0 ? appData : join(homedir(), ".config");
|
|
3116
|
+
const raw = readFileSync(join(base, "mushi", "config.json"), "utf8");
|
|
3117
|
+
const parsed = JSON.parse(raw);
|
|
3118
|
+
return {
|
|
3119
|
+
apiKey: typeof parsed.apiKey === "string" ? parsed.apiKey : void 0,
|
|
3120
|
+
projectId: typeof parsed.projectId === "string" ? parsed.projectId : void 0,
|
|
3121
|
+
endpoint: typeof parsed.endpoint === "string" ? parsed.endpoint : void 0
|
|
3122
|
+
};
|
|
3123
|
+
} catch {
|
|
3124
|
+
return {};
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
var CLI_CONFIG = readCliConfig();
|
|
3128
|
+
var API_ENDPOINT = process.env.MUSHI_API_ENDPOINT?.trim() || CLI_CONFIG.endpoint?.trim() || DEFAULT_API_ENDPOINT;
|
|
3129
|
+
var API_KEY = process.env.MUSHI_API_KEY?.trim() || CLI_CONFIG.apiKey || "";
|
|
3130
|
+
var PROJECT_ID = process.env.MUSHI_PROJECT_ID?.trim() || CLI_CONFIG.projectId || "";
|
|
3111
3131
|
var SCOPES_RAW = process.env.MUSHI_SCOPES ?? "";
|
|
3112
3132
|
var parsedScopes = SCOPES_RAW ? SCOPES_RAW.split(",").map((s) => s.trim()).filter((s) => s === "mcp:read" || s === "mcp:write") : ALL_SCOPES;
|
|
3113
3133
|
var SCOPES = SCOPES_RAW && parsedScopes.length === 0 ? ALL_SCOPES : parsedScopes;
|
|
@@ -3122,13 +3142,23 @@ if (MCP_SENTRY_DSN) {
|
|
|
3122
3142
|
}
|
|
3123
3143
|
async function main() {
|
|
3124
3144
|
if (!API_KEY) {
|
|
3125
|
-
log.fatal(
|
|
3145
|
+
log.fatal(
|
|
3146
|
+
"No API key found \u2014 set MUSHI_API_KEY, or run `mushi login` so the CLI config can supply it."
|
|
3147
|
+
);
|
|
3126
3148
|
process.exit(1);
|
|
3127
3149
|
}
|
|
3150
|
+
if (!process.env.MUSHI_API_KEY && CLI_CONFIG.apiKey) {
|
|
3151
|
+
log.info("[mushi-mcp] Using API key from the CLI config (~/.config/mushi/config.json)");
|
|
3152
|
+
}
|
|
3153
|
+
log.info(`[mushi-mcp] Endpoint: ${API_ENDPOINT}`);
|
|
3128
3154
|
if (!process.env.MUSHI_API_ENDPOINT?.trim()) {
|
|
3129
|
-
|
|
3130
|
-
`[mushi-mcp]
|
|
3131
|
-
|
|
3155
|
+
if (CLI_CONFIG.endpoint?.trim()) {
|
|
3156
|
+
log.info(`[mushi-mcp] Using endpoint from CLI config: ${API_ENDPOINT}`);
|
|
3157
|
+
} else {
|
|
3158
|
+
log.warn(
|
|
3159
|
+
`[mushi-mcp] MUSHI_API_ENDPOINT not set \u2014 using the hosted Mushi Cloud endpoint (${DEFAULT_API_ENDPOINT}). Self-hosted deployments must set MUSHI_API_ENDPOINT to their Supabase edge function URL, e.g. https://xyz.supabase.co/functions/v1/api`
|
|
3160
|
+
);
|
|
3161
|
+
}
|
|
3132
3162
|
}
|
|
3133
3163
|
const mode = PROJECT_ID ? "single-project" : "account";
|
|
3134
3164
|
if (!PROJECT_ID) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/mcp",
|
|
3
3
|
"mcpName": "io.github.kensaurus/mushi-mushi",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "MCP server for Mushi Mushi — triage user-felt bugs, pull evidence (screenshots, console logs, network requests), check blast radius, and dispatch fix PRs, all from your AI coding agent",
|
|
7
7
|
"type": "module",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
49
49
|
"@sentry/node": "^10.57.0",
|
|
50
50
|
"zod": "^4.4.3",
|
|
51
|
-
"@mushi-mushi/core": "^1.
|
|
51
|
+
"@mushi-mushi/core": "^1.23.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/node": "^22.
|
|
55
|
-
"eslint": "^10.
|
|
54
|
+
"@types/node": "^22.20.0",
|
|
55
|
+
"eslint": "^10.6.0",
|
|
56
56
|
"tsup": "^8.5.1",
|
|
57
57
|
"typescript": "^6.0.3",
|
|
58
|
-
"vitest": "^4.1.
|
|
58
|
+
"vitest": "^4.1.9",
|
|
59
59
|
"@mushi-mushi/eslint-config": "0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|