@mushi-mushi/mcp 0.31.4 → 0.31.6

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
@@ -31,7 +31,7 @@ Restart the editor and ask *"what's broken in prod?"*. For Cursor and Claude, `s
31
31
  "mcpServers": {
32
32
  "mushi-mushi": {
33
33
  "command": "npx",
34
- "args": ["-y", "@mushi-mushi/mcp@0.31.4"],
34
+ "args": ["-y", "@mushi-mushi/mcp@0.31.6"],
35
35
  "env": {
36
36
  "MUSHI_API_KEY": "mushi_xxxxxxxxxxxxxxxxxxxx",
37
37
  "MUSHI_PROJECT_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
package/dist/clients.d.ts CHANGED
@@ -54,7 +54,7 @@ import { FeatureGroup } from './feature-groups.js';
54
54
  * editor launch. Synced to package.json by `scripts/sync-mcp-pin.mjs` — never
55
55
  * hand-edit the version.
56
56
  */
57
- declare const MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.4";
57
+ declare const MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.6";
58
58
  interface StdioConfig {
59
59
  command: string;
60
60
  args: string[];
package/dist/clients.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-SHA56ZRG.js";
9
9
 
10
10
  // src/clients.ts
11
- var MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.4";
11
+ var MCP_PIN_SPEC = "@mushi-mushi/mcp@0.31.6";
12
12
  var PIN_SPEC_RE = /^@mushi-mushi\/mcp@\d+\.\d+\.\d+$/;
13
13
  function pinOf(pinSpec) {
14
14
  return pinSpec && PIN_SPEC_RE.test(pinSpec) ? pinSpec : MCP_PIN_SPEC;
package/dist/index.js CHANGED
@@ -1673,7 +1673,7 @@ var MUSHI_DOCS_INDEX = [
1673
1673
  route: "/admin/ci",
1674
1674
  markdown: "admin/ci.md",
1675
1675
  keywords: ["admin", "ci", "runners"],
1676
- headings: ["Spend less on CI", "How it reads your runs", "Right now", "Test machine or your code", "Queue and wait", "Machines", "What would make fixes land sooner", "Your real bill"],
1676
+ headings: ["Spend less on CI", "How it reads your runs", "Right now", "All apps", "Why it failed", "Test machine or your code", "Queue and wait", "Machines"],
1677
1677
  excerpt: "The CI runners page in the Mushi Mushi console shows where tests run, how long they wait for a machine, and whether a red check was your code or the machine."
1678
1678
  },
1679
1679
  {
@@ -1853,7 +1853,7 @@ var MUSHI_DOCS_INDEX = [
1853
1853
  route: "/admin/health",
1854
1854
  markdown: "admin/health.md",
1855
1855
  keywords: ["admin", "health"],
1856
- headings: ["Time window", "LLM health summary", "Provider probes", "Cron job health", "Recent LLM calls log", "Recommended actions", "Related pages"],
1856
+ headings: ["Time window", "LLM health summary", "Provider probes", "Cron job health", "Stuck reports", "Recent LLM calls log", "Recommended actions", "Server doctor (operators only)"],
1857
1857
  excerpt: "The Mushi Mushi health page shows whether Mushi Mushi itself works (AI calls, background jobs, provider connections), so you catch a degraded integration early."
1858
1858
  },
1859
1859
  {
@@ -1916,7 +1916,7 @@ var MUSHI_DOCS_INDEX = [
1916
1916
  route: "/admin/judge",
1917
1917
  markdown: "admin/judge.md",
1918
1918
  keywords: ["admin", "judge", "triage", "grading"],
1919
- headings: ["Tabs", "Prompt promotion", "Drift alerts", "See also"],
1919
+ headings: ["Reviewing a disagreement", "Tabs", "Prompt promotion", "Drift alerts", "See also"],
1920
1920
  excerpt: "The Triage grading page in the Mushi Mushi console shows how often a second AI agrees with each diagnosis, week by week, and the worst recent disagreements."
1921
1921
  },
1922
1922
  {
@@ -1973,6 +1973,15 @@ var MUSHI_DOCS_INDEX = [
1973
1973
  headings: ["First run: two screens", "Name your project", "See your first diagnosis", "Full checklist", "After you create a project", "Generate an API key", "Test the connection", "Install the SDK"],
1974
1974
  excerpt: "Get your first bug report into Mushi Mushi with the console's Set up page, from naming your project to a report with a plain-English diagnosis."
1975
1975
  },
1976
+ {
1977
+ title: "Ops",
1978
+ url: docUrl("/admin/ops"),
1979
+ route: "/admin/ops",
1980
+ markdown: "admin/ops.md",
1981
+ keywords: ["admin", "ops"],
1982
+ headings: [],
1983
+ excerpt: "The Ops page in Mushi Mushi shows every app's payments, releases and alerts in one feed, which app is not reporting, and what is still open."
1984
+ },
1976
1985
  {
1977
1986
  title: "Overview (Home view)",
1978
1987
  url: docUrl("/admin/overview"),
@@ -2018,13 +2027,22 @@ var MUSHI_DOCS_INDEX = [
2018
2027
  headings: ["The 4-step workflow", "Summary tiles", "Steps", "Prompt table columns", "Actions per row", "Common tasks", "Fixing wrong component classification", "Investigating a bad judge score"],
2019
2028
  excerpt: "The AI prompts page in the Mushi Mushi console lets you edit and A/B compare the prompts behind each AI step before you promote a new version."
2020
2029
  },
2030
+ {
2031
+ title: "Providers & AI routes",
2032
+ url: docUrl("/admin/providers"),
2033
+ route: "/admin/providers",
2034
+ markdown: "admin/providers.md",
2035
+ keywords: ["admin", "providers", "ai", "routes"],
2036
+ headings: [],
2037
+ excerpt: "Operator-only page in the Mushi Mushi console showing each app's AI provider accounts, their health and spend, and the ordered model routes each app tries."
2038
+ },
2021
2039
  {
2022
2040
  title: "Scheduled tests",
2023
2041
  url: docUrl("/admin/qa-coverage"),
2024
2042
  route: "/admin/qa-coverage",
2025
2043
  markdown: "admin/qa-coverage.md",
2026
2044
  keywords: ["admin", "qa-coverage", "coverage", "scheduled", "tests"],
2027
- headings: ["Story lifecycle", "Execution providers", "Creating a story", "Story cards", "Story drawer", "Manual run", "Filters", "Related pages"],
2045
+ headings: ["The status line", "Story lifecycle", "Execution providers", "Creating a story", "Story cards", "Story drawer", "Manual run", "Filters"],
2028
2046
  excerpt: "Scheduled tests in the Mushi Mushi console turn plain-English user flows into browser tests on a schedule, so you find out when login or checkout breaks."
2029
2047
  },
2030
2048
  {
@@ -2087,7 +2105,7 @@ var MUSHI_DOCS_INDEX = [
2087
2105
  route: "/admin/reports",
2088
2106
  markdown: "admin/reports.md",
2089
2107
  keywords: ["admin", "reports", "bugs"],
2090
- headings: ["Diagnosis + Fix hero", "Compact diagnosis preview", "Merging a fix from report detail"],
2108
+ headings: ["Diagnosis + Fix hero", "Compact diagnosis preview", "Pipeline strip on report detail", "Merging a fix from report detail"],
2091
2109
  excerpt: "The Bugs page is the Mushi Mushi bug list. Filter by status, severity, category and component, and start with the recommended action at the top."
2092
2110
  },
2093
2111
  {
@@ -2286,7 +2304,7 @@ var MUSHI_DOCS_INDEX = [
2286
2304
  markdown: "cloud.md",
2287
2305
  keywords: ["cloud"],
2288
2306
  headings: ["Plans", "Sign-up flow", "Why metered on diagnoses", "Spend controls", "Self-hosting"],
2289
- excerpt: "Hosted Mushi Mushi. Bug reports, plain-English diagnoses, and fix dispatch without running servers. Free for one app with 100 diagnoses a month."
2307
+ excerpt: "Hosted Mushi Mushi. Bug reports, plain-English diagnoses, and fix dispatch without running servers. Free for three apps with 300 diagnoses a month."
2290
2308
  },
2291
2309
  {
2292
2310
  title: "Compare",
@@ -2340,7 +2358,7 @@ var MUSHI_DOCS_INDEX = [
2340
2358
  markdown: "compare/sentry-vs-mushi.md",
2341
2359
  keywords: ["compare", "sentry-vs-mushi", "sentry"],
2342
2360
  headings: ["What each one is", "Side by side", "Where they overlap, and where they do not", "Running Mushi Mushi alongside Sentry [#running-mushi-alongside-sentry]", "Pick Sentry if", "Pick Mushi Mushi if [#pick-mushi-if]", "Frequently asked questions"],
2343
- excerpt: "Sentry vs Mushi Mushi in 2026. What each captures, Sentry's free tier and Seer pricing next to Mushi Mushi's free plan (1 app, 100 diagnoses), and running both."
2361
+ excerpt: "Sentry vs Mushi Mushi in 2026. What each captures, Sentry's free tier and Seer pricing beside Mushi Mushi's free plan (3 apps, 300 diagnoses), and running both."
2344
2362
  },
2345
2363
  {
2346
2364
  title: "Concepts",
@@ -2603,6 +2621,15 @@ var MUSHI_DOCS_INDEX = [
2603
2621
  headings: ["Step-by-step", "Wire Cursor", "(Optional) Add the evolution-loop coding rules", "Restart Cursor", "Verify", "Available tools in Cursor", "Keep lessons current", "Connecting GitHub for auto-PR"],
2604
2622
  excerpt: "Wire Mushi Mushi into Cursor with one command. Get fix context, lessons and fix dispatch right from the editor."
2605
2623
  },
2624
+ {
2625
+ title: "Ops hub (payments, releases and alerts in your team's Slack)",
2626
+ url: docUrl("/integrations/ops-hub"),
2627
+ route: "/integrations/ops-hub",
2628
+ markdown: "integrations/ops-hub.md",
2629
+ keywords: ["integrations", "ops-hub", "ops", "hub", "payments", "releases", "alerts", "team", "slack"],
2630
+ headings: ["What you get", "Slack bot", "Create a Slack app", "Point Slack at Mushi Mushi", "Save the token and the signing secret", "Pick the channels", "Connect an app", "Create the app's ops key"],
2631
+ excerpt: "Every app sends payments, releases and alerts to Mushi Mushi with one server key; your team's own Slack bot posts them, threads follow-ups and answers commands."
2632
+ },
2606
2633
  {
2607
2634
  title: "Voice intake",
2608
2635
  url: docUrl("/integrations/voice-intake"),
@@ -2619,7 +2646,7 @@ var MUSHI_DOCS_INDEX = [
2619
2646
  markdown: "ja.md",
2620
2647
  keywords: ["ja"],
2621
2648
  headings: ["\u307E\u305A\u7121\u6599\u3067\u8A66\u3059\uFF1A\u516C\u958B\u4E2D\u306E\u30B5\u30A4\u30C8\u3092\u30C1\u30A7\u30C3\u30AF", "\u3067\u304D\u308B\u3053\u3068", "\u5831\u544A\u30DC\u30BF\u30F3\u306F\u65E5\u672C\u8A9E\u3067\u8868\u793A\u3055\u308C\u307E\u3059", "\u59CB\u3081\u65B9\uFF1ALovable\u30FBBolt \u306E\u5834\u5408", "\u59CB\u3081\u65B9\uFF1ACursor\u30FBClaude Code \u306E\u5834\u5408", "\u904B\u55B6\u8005\u60C5\u5831", "\u82F1\u8A9E\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8"],
2622
- excerpt: "Mushi Mushi \u306F\u3001\u30A2\u30D7\u30EA\u306B\u300C\u554F\u984C\u3092\u5831\u544A\u300D\u30DC\u30BF\u30F3\u3092\u8FFD\u52A0\u3057\u3001\u5C4A\u3044\u305F\u4E0D\u5177\u5408\u306E\u539F\u56E0\u3068\u76F4\u3057\u65B9\u3092 AI \u304C\u8AAC\u660E\u3059\u308B\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9\u306E\u30C4\u30FC\u30EB\u3067\u3059\u3002\u7121\u6599\u30D7\u30E9\u30F3\u306F\u30A2\u30D7\u30EA 1 \u672C\u30FB\u6708 100 \u4EF6\u306E\u8A3A\u65AD\u307E\u3067\u3002"
2649
+ excerpt: "Mushi Mushi \u306F\u3001\u30A2\u30D7\u30EA\u306B\u300C\u554F\u984C\u3092\u5831\u544A\u300D\u30DC\u30BF\u30F3\u3092\u8FFD\u52A0\u3057\u3001\u5C4A\u3044\u305F\u4E0D\u5177\u5408\u306E\u539F\u56E0\u3068\u76F4\u3057\u65B9\u3092 AI \u304C\u8AAC\u660E\u3059\u308B\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9\u306E\u30C4\u30FC\u30EB\u3067\u3059\u3002\u7121\u6599\u30D7\u30E9\u30F3\u306F\u30A2\u30D7\u30EA 3 \u672C\u30FB\u6708 300 \u4EF6\u306E\u8A3A\u65AD\u307E\u3067\u3002"
2623
2650
  },
2624
2651
  {
2625
2652
  title: "Launch Week",
@@ -3015,7 +3042,7 @@ var MUSHI_DOCS_INDEX = [
3015
3042
  markdown: "pricing.md",
3016
3043
  keywords: ["pricing", "free", "builder", "studio", "self-host"],
3017
3044
  headings: ["All plans", "What counts as a diagnosis", "Pricing estimator", "Example bills", "Why apps, not reports?", "Why diagnoses, not events", "Your own AI key and the self-host path", "Compared to Sentry + Seer"],
3018
- excerpt: "Mushi Mushi pricing. Free for one app and 100 AI bug diagnoses a month. Builder $29/mo for 3 apps, Studio $79/mo for 10. Free to self-host."
3045
+ excerpt: "Mushi Mushi pricing. Free for three apps and 300 AI bug diagnoses a month. Builder $29/mo for 1,000 diagnoses, Studio $79/mo for 10 apps. Free to self-host."
3019
3046
  },
3020
3047
  {
3021
3048
  title: "Quickstart: install, first report, first fix",
@@ -3044,6 +3071,15 @@ var MUSHI_DOCS_INDEX = [
3044
3071
  headings: ["Get your project ID and API key", "Install and register"],
3045
3072
  excerpt: "Free, open-source bug report widget for Angular 17+: one provideMushi() call registers the service and error handler, so errors and reports reach your queue."
3046
3073
  },
3074
+ {
3075
+ title: "Ask Bolt why it broke",
3076
+ url: docUrl("/quickstart/bolt-mcp"),
3077
+ route: "/quickstart/bolt-mcp",
3078
+ markdown: "quickstart/bolt-mcp.md",
3079
+ keywords: ["quickstart", "bolt-mcp", "bolt", "mcp", "ask", "broke"],
3080
+ headings: ["Open your connectors", "Add Mushi Mushi as a custom MCP server", "Sign in and approve", "Turn it on in your project", "Ask Bolt", "Which tools Bolt gets", "If it does not connect"],
3081
+ excerpt: "Add Mushi Mushi to Bolt as a custom MCP connector, sign in once, and ask Bolt what users reported. Bolt reads the plain-English diagnosis and fixes the bug."
3082
+ },
3047
3083
  {
3048
3084
  title: "Bug report widget for Capacitor and Ionic",
3049
3085
  url: docUrl("/quickstart/capacitor"),
@@ -3071,6 +3107,15 @@ var MUSHI_DOCS_INDEX = [
3071
3107
  headings: ["Get your project ID and API key", "Install", "Initialize", "Open the widget or submit a report"],
3072
3108
  excerpt: "Free, open-source bug report widget for Flutter (preview): shake-to-report, a Material bottom sheet and an offline queue. A git dependency, not on pub.dev yet."
3073
3109
  },
3110
+ {
3111
+ title: "HTTP API: file a bug report with one curl",
3112
+ url: docUrl("/quickstart/http-api"),
3113
+ route: "/quickstart/http-api",
3114
+ markdown: "quickstart/http-api.md",
3115
+ keywords: ["quickstart", "http-api", "http", "api", "file", "bug", "report", "one", "curl"],
3116
+ headings: ["Get your project ID and key", "Send a report", "Check it", "The fields", "Keys and scopes", "Rate limits", "More than one report", "OpenAPI spec"],
3117
+ excerpt: "Send a bug report to Mushi Mushi with one HTTP call, no SDK. How to get a key, the scopes, the rate limits, and the OpenAPI 3.1 spec for code generators."
3118
+ },
3074
3119
  {
3075
3120
  title: "Incident loop: from bug report to fix prompt",
3076
3121
  url: docUrl("/quickstart/incident-loop"),
@@ -3143,6 +3188,15 @@ var MUSHI_DOCS_INDEX = [
3143
3188
  headings: ["Get your project ID and API key", "1. Install", "2. Mount the provider", "Optional native modules", "3. Verify"],
3144
3189
  excerpt: "Free, open-source bug report widget for React Native and Expo: shake to report, a floating bug button, then a plain-English diagnosis of each report."
3145
3190
  },
3191
+ {
3192
+ title: "Mushi Mushi in Replit",
3193
+ url: docUrl("/quickstart/replit"),
3194
+ route: "/quickstart/replit",
3195
+ markdown: "quickstart/replit.md",
3196
+ keywords: ["quickstart", "replit"],
3197
+ headings: ["Add the report button", "Connect Replit Agent", "Add the server", "Sign in and approve", "Ask Agent", "If it does not connect"],
3198
+ excerpt: "Add the Mushi Mushi report button to a Replit app with one prompt, then connect Replit Agent over MCP so it reads the plain-English diagnosis and fixes the bug."
3199
+ },
3146
3200
  {
3147
3201
  title: "Bug report widget for Svelte and SvelteKit",
3148
3202
  url: docUrl("/quickstart/svelte"),
@@ -3558,40 +3612,49 @@ var MUSHI_DOCS_INDEX = [
3558
3612
  excerpt: "Mushi Mushi's SOC 2 readiness, not certification. Nightly evidence for access, retention, DSAR and availability controls, retention per project, DSAR tracking."
3559
3613
  },
3560
3614
  {
3561
- title: "Self-hosting",
3615
+ title: "Self-hosting quickstart",
3562
3616
  url: docUrl("/self-hosting"),
3563
3617
  route: "/self-hosting",
3564
3618
  markdown: "self-hosting/index.md",
3565
- keywords: ["self-hosting", "self", "hosting"],
3566
- headings: ["What you'll deploy", "Fastest path \u2014 Docker Compose", "Managed-Supabase path"],
3567
- excerpt: "Run the whole Mushi Mushi stack yourself with Docker Compose. Your own keys, AGPLv3 server, MIT SDKs, no usage limits."
3619
+ keywords: ["self-hosting", "self", "hosting", "quickstart"],
3620
+ headings: ["Before you start", "Clone the repo", "Deploy the server", "Serve the console", "Sign up", "Sign the CLI in and run the doctor", "Get your first diagnosis", "Next"],
3621
+ excerpt: "Run Mushi Mushi on your own Supabase project, from zero to the first diagnosis, with one command. Every feature on, no usage limits."
3568
3622
  },
3569
3623
  {
3570
- title: "Admin SPA deploy",
3624
+ title: "Host the console",
3571
3625
  url: docUrl("/self-hosting/admin-spa"),
3572
3626
  route: "/self-hosting/admin-spa",
3573
3627
  markdown: "self-hosting/admin-spa.md",
3574
- keywords: ["self-hosting", "self", "hosting", "admin-spa", "admin", "spa", "deploy"],
3575
- headings: ["Build", "Deploy options", "SPA routing", "First-run setup"],
3576
- excerpt: "Build and deploy the Mushi Mushi admin console yourself. A static Vite and React app that talks to your Supabase project, and the env vars it needs."
3628
+ keywords: ["self-hosting", "self", "hosting", "admin-spa", "admin", "spa", "host", "console"],
3629
+ headings: ["Pick how you serve it", "Static build", "Docker image", "After it is up"],
3630
+ excerpt: "Serve the Mushi Mushi console yourself: a static build, a Docker image or Compose. Build it with your backend address, or connect it on first open."
3577
3631
  },
3578
3632
  {
3579
- title: "Self-host in minutes (Docker Compose)",
3633
+ title: "Docker Compose",
3580
3634
  url: docUrl("/self-hosting/docker-compose"),
3581
3635
  route: "/self-hosting/docker-compose",
3582
3636
  markdown: "self-hosting/docker-compose.md",
3583
- keywords: ["self-hosting", "self", "hosting", "docker-compose", "docker", "compose", "self-host", "minutes"],
3584
- headings: ["One command", "Clone and configure", "Bring the stack up", "Open the console", "What's running", "Production notes", "Managed Supabase instead"],
3585
- excerpt: "Self-host the whole Mushi Mushi stack with one Docker Compose file. Postgres, auth, storage, edge functions, the admin console and a Caddy reverse proxy."
3637
+ keywords: ["self-hosting", "self", "hosting", "docker-compose", "docker", "compose"],
3638
+ headings: ["Generate the secrets", "Start the stack", "Sign up and sign the CLI in", "What's running", "Upgrade", "Not included", "Production notes"],
3639
+ excerpt: "Run the whole Mushi Mushi stack in Docker Compose with no Supabase account. Postgres, auth, storage, every edge function, the console and Caddy, on one machine."
3586
3640
  },
3587
3641
  {
3588
- title: "Edge Functions deploy",
3642
+ title: "Edge functions",
3589
3643
  url: docUrl("/self-hosting/edge-functions"),
3590
3644
  route: "/self-hosting/edge-functions",
3591
3645
  markdown: "self-hosting/edge-functions.md",
3592
- keywords: ["self-hosting", "self", "hosting", "edge-functions", "edge", "functions", "deploy"],
3593
- headings: ["Minimal required (ingest + classify)", "Checking what is deployed", "Common optional functions", "Function inventory (core pipeline)", "Required secrets", "JWT verification"],
3594
- excerpt: "Deploy the Mushi Mushi Supabase Edge Functions for a self-hosted install. The minimal ingest and classification set, the full list, and the secrets they need."
3646
+ keywords: ["self-hosting", "self", "hosting", "edge-functions", "edge", "functions"],
3647
+ headings: ["Redeploy one function", "Check what is deployed", "Function inventory (core pipeline)", "JWT verification"],
3648
+ excerpt: "What the Mushi Mushi Supabase Edge Functions do, how they authenticate, and how to redeploy one. selfhost up deploys all of them."
3649
+ },
3650
+ {
3651
+ title: "Environment variables",
3652
+ url: docUrl("/self-hosting/environment"),
3653
+ route: "/self-hosting/environment",
3654
+ markdown: "self-hosting/environment.md",
3655
+ keywords: ["self-hosting", "self", "hosting", "environment", "variables"],
3656
+ headings: ["Set by the platform", "Function secrets", "Core (selfhost up sets these)", "AI keys (optional; one turns on the plain-English diagnosis and fix\u2026", "Operator notices and Slack routing (optional)", "Discord triage feed (optional)", "Code index (optional)", "Public diagram pages (optional)"],
3657
+ excerpt: "Every environment variable a self-hosted Mushi Mushi reads, where to set it, and whether it is required. Generated from the .env.example templates."
3595
3658
  },
3596
3659
  {
3597
3660
  title: "Langfuse + Sentry",
@@ -3603,13 +3666,22 @@ var MUSHI_DOCS_INDEX = [
3603
3666
  excerpt: "Wire Langfuse LLM tracing and Sentry error tracking into a self-hosted Mushi Mushi server. The Edge Function secrets and what each trace records."
3604
3667
  },
3605
3668
  {
3606
- title: "Supabase setup",
3669
+ title: "Operate and upgrade",
3670
+ url: docUrl("/self-hosting/operate"),
3671
+ route: "/self-hosting/operate",
3672
+ markdown: "self-hosting/operate.md",
3673
+ keywords: ["self-hosting", "self", "hosting", "operate", "upgrade"],
3674
+ headings: ["Check health", "Upgrade", "Headless bootstrap (MUSHIINIT)", "Who counts as the operator", "Extra cron jobs", "Integrations", "Security notes", "Multi-region (Helm, not yet proven end to end)"],
3675
+ excerpt: "Keep a self-hosted Mushi Mushi healthy. The doctor, upgrades, headless bootstrap, extra cron jobs, integrations, security notes and multi-region."
3676
+ },
3677
+ {
3678
+ title: "Supabase by hand",
3607
3679
  url: docUrl("/self-hosting/supabase"),
3608
3680
  route: "/self-hosting/supabase",
3609
3681
  markdown: "self-hosting/supabase.md",
3610
- keywords: ["self-hosting", "self", "hosting", "supabase", "setup"],
3611
- headings: ["Required extensions", "Required custom functions", "RLS pattern", "Seed data", "Verifying the setup"],
3612
- excerpt: "Set up a Supabase project for self-hosted Mushi Mushi. Link the CLI, push every migration, and check the Postgres extensions the server needs."
3682
+ keywords: ["self-hosting", "self", "hosting", "supabase", "hand"],
3683
+ headings: ["1. Link and push the migrations", "2. Set the function secrets", "3. Point cron at your project", "4. Deploy the functions", "5. Check it", "Row-level security"],
3684
+ excerpt: "Set up Supabase for self-hosted Mushi Mushi by hand: link, push migrations, set secrets, point cron at your project, deploy the functions."
3613
3685
  },
3614
3686
  {
3615
3687
  title: "Use cases & comparisons",
@@ -3785,6 +3857,63 @@ function wrapUntrustedJson(value, role) {
3785
3857
  return wrapUntrusted(serialised, role);
3786
3858
  }
3787
3859
 
3860
+ // src/key-scopes.ts
3861
+ async function fetchKeyScopes(opts) {
3862
+ const doFetch = opts.fetch ?? fetch;
3863
+ try {
3864
+ const res = await doFetch(`${opts.apiEndpoint.replace(/\/+$/, "")}/v1/sync/whoami`, {
3865
+ headers: {
3866
+ "X-Mushi-Api-Key": opts.apiKey,
3867
+ ...opts.projectId ? { "X-Mushi-Project-Id": opts.projectId } : {}
3868
+ },
3869
+ signal: AbortSignal.timeout(opts.timeoutMs ?? 5e3)
3870
+ });
3871
+ if (!res.ok) return null;
3872
+ const body = await res.json();
3873
+ const scopes = body?.data?.scopes;
3874
+ if (!Array.isArray(scopes)) return null;
3875
+ return scopes.filter((s) => typeof s === "string");
3876
+ } catch {
3877
+ return null;
3878
+ }
3879
+ }
3880
+ function decideScopes(keyScopes, configured) {
3881
+ if (keyScopes === null) return { kind: "serve", scopes: configured };
3882
+ const granted = /* @__PURE__ */ new Set();
3883
+ if (keyScopes.includes("mcp:write")) {
3884
+ granted.add("mcp:read");
3885
+ granted.add("mcp:write");
3886
+ } else if (keyScopes.includes("mcp:read")) {
3887
+ granted.add("mcp:read");
3888
+ }
3889
+ if (granted.size === 0) return { kind: "sdk-key", keyScopes };
3890
+ return { kind: "serve", scopes: configured.filter((s) => granted.has(s)) };
3891
+ }
3892
+ function mcpKeyLoginCommand(projectId) {
3893
+ return `npx mushi-mushi login${projectId ? ` --project-id ${projectId}` : ""}`;
3894
+ }
3895
+ function sdkKeyNextAction(consoleUrl, ctx = {}) {
3896
+ const command = mcpKeyLoginCommand(ctx.projectId);
3897
+ const then = ctx.keySource === "env" ? "then remove MUSHI_API_KEY from this server's env block (the server then uses the saved key) and restart it." : "then restart this server.";
3898
+ return `Run \`${command}\` (approve in the browser; it saves a key that can read reports), ${then} Or mint an MCP key in the console (${consoleUrl}/mcp \u2192 "Mint mcp:read key") and put it in MUSHI_API_KEY.`;
3899
+ }
3900
+ function sdkKeyReport(keyScopes, consoleUrl, ctx = {}) {
3901
+ const held = keyScopes.length > 0 ? keyScopes.join(", ") : "none";
3902
+ const then = ctx.keySource === "env" ? " then remove MUSHI_API_KEY from this server's env block and restart it." : " then restart this server.";
3903
+ return [
3904
+ "",
3905
+ `[mushi-mcp] This API key has scopes: ${held}. It can send bug reports (the SDK key) but not read them,`,
3906
+ " so the MCP tools would all be refused. Serving setup mode.",
3907
+ " Fix (one command, approve in the browser):",
3908
+ "",
3909
+ ` ${mcpKeyLoginCommand(ctx.projectId)}`,
3910
+ "",
3911
+ then,
3912
+ ` Or mint an MCP key in the console (${consoleUrl}/mcp \u2192 "Mint mcp:read key") and put it in MUSHI_API_KEY.`,
3913
+ ""
3914
+ ].join("\n");
3915
+ }
3916
+
3788
3917
  // src/arg-aliases.ts
3789
3918
  function snakeAliasOf(name) {
3790
3919
  return name.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);
@@ -8498,7 +8627,7 @@ function createSetupModeServer(config) {
8498
8627
  features: "all",
8499
8628
  ...config.fetch ? { fetch: config.fetch } : {},
8500
8629
  ...config.timeoutMs ? { timeoutMs: config.timeoutMs } : {},
8501
- instructions: config.reason === "sdk-key" ? "Mushi is running in setup mode: the configured API key is an SDK key (report:write). It can send bug reports but not read them, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Call diagnose_setup for how to mint an MCP key (mcp:read), then restart the MCP server." : "Mushi is running in setup mode: no API key is configured, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Call diagnose_setup for the exact steps to connect (run `npx mushi-mushi` or `mushi login`, or put MUSHI_API_KEY in this server's env block), then restart the MCP server."
8630
+ instructions: config.reason === "sdk-key" ? "Mushi is running in setup mode: the configured API key is an SDK key (report:write). It can send bug reports but not read them, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Fix: " + sdkKeyNextAction(MUSHI_CONSOLE_URL, config.sdkKeyFix) : "Mushi is running in setup mode: no API key is configured, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Call diagnose_setup for the exact steps to connect (run `npx mushi-mushi` or `mushi login`, or put MUSHI_API_KEY in this server's env block), then restart the MCP server."
8502
8631
  });
8503
8632
  const internals = server;
8504
8633
  for (const [name, tool] of Object.entries(internals._registeredTools)) {
@@ -8514,7 +8643,7 @@ function createSetupModeServer(config) {
8514
8643
  const spec = TOOL_CATALOG.find((t) => t.name === "diagnose_setup");
8515
8644
  if (!spec) throw new Error("[mushi-mcp] diagnose_setup is missing from TOOL_CATALOG");
8516
8645
  const sdkKey = config.reason === "sdk-key";
8517
- const nextAction = sdkKey ? `Mint an MCP key in the console (${MUSHI_CONSOLE_URL}/mcp \u2192 "Mint mcp:read key") or run \`mushi login\`, put it in MUSHI_API_KEY for this server, then restart it.` : "Run `npx mushi-mushi` in your project (signs you in and writes the key) or `mushi login`, then restart this MCP server.";
8646
+ const nextAction = sdkKey ? sdkKeyNextAction(MUSHI_CONSOLE_URL, config.sdkKeyFix) : "Run `npx mushi-mushi` in your project (signs you in and writes the key) or `mushi login`, then restart this MCP server.";
8518
8647
  server.registerTool(
8519
8648
  "diagnose_setup",
8520
8649
  {
@@ -8558,50 +8687,6 @@ function createSetupModeServer(config) {
8558
8687
  return server;
8559
8688
  }
8560
8689
 
8561
- // src/key-scopes.ts
8562
- async function fetchKeyScopes(opts) {
8563
- const doFetch = opts.fetch ?? fetch;
8564
- try {
8565
- const res = await doFetch(`${opts.apiEndpoint.replace(/\/+$/, "")}/v1/sync/whoami`, {
8566
- headers: {
8567
- "X-Mushi-Api-Key": opts.apiKey,
8568
- ...opts.projectId ? { "X-Mushi-Project-Id": opts.projectId } : {}
8569
- },
8570
- signal: AbortSignal.timeout(opts.timeoutMs ?? 5e3)
8571
- });
8572
- if (!res.ok) return null;
8573
- const body = await res.json();
8574
- const scopes = body?.data?.scopes;
8575
- if (!Array.isArray(scopes)) return null;
8576
- return scopes.filter((s) => typeof s === "string");
8577
- } catch {
8578
- return null;
8579
- }
8580
- }
8581
- function decideScopes(keyScopes, configured) {
8582
- if (keyScopes === null) return { kind: "serve", scopes: configured };
8583
- const granted = /* @__PURE__ */ new Set();
8584
- if (keyScopes.includes("mcp:write")) {
8585
- granted.add("mcp:read");
8586
- granted.add("mcp:write");
8587
- } else if (keyScopes.includes("mcp:read")) {
8588
- granted.add("mcp:read");
8589
- }
8590
- if (granted.size === 0) return { kind: "sdk-key", keyScopes };
8591
- return { kind: "serve", scopes: configured.filter((s) => granted.has(s)) };
8592
- }
8593
- function sdkKeyReport(keyScopes, consoleUrl) {
8594
- const held = keyScopes.length > 0 ? keyScopes.join(", ") : "none";
8595
- return [
8596
- "",
8597
- `[mushi-mcp] This API key has scopes: ${held}. It can send bug reports (the SDK key) but not read them,`,
8598
- " so the MCP tools would all be refused. Serving setup mode.",
8599
- ` Fix: mint an MCP key in the console (${consoleUrl}/mcp \u2192 "Mint mcp:read key"),`,
8600
- " or run `mushi login`, then put it in MUSHI_API_KEY for this server and restart it.",
8601
- ""
8602
- ].join("\n");
8603
- }
8604
-
8605
8690
  // src/inventory-poll.ts
8606
8691
  function startInventoryPoll(options) {
8607
8692
  const doFetch = options.fetch ?? globalThis.fetch;
@@ -8653,6 +8738,39 @@ function startInventoryPoll(options) {
8653
8738
  return { stop, settled: () => inFlight };
8654
8739
  }
8655
8740
 
8741
+ // src/stdio-args.ts
8742
+ function stdioArgsAction(argv) {
8743
+ if (argv.includes("-h") || argv.includes("--help")) return "help";
8744
+ if (argv.includes("-v") || argv.includes("--version")) return "version";
8745
+ return "serve";
8746
+ }
8747
+ function stdioUsage(version) {
8748
+ return `@mushi-mushi/mcp ${version} \u2014 Mushi Mushi MCP server (stdio)
8749
+
8750
+ Your editor starts this server; you normally do not run it by hand.
8751
+
8752
+ Set it up:
8753
+ npx mushi-mushi setup --ide cursor or --ide claude, continue, zed
8754
+
8755
+ Run it yourself (for an MCP client that takes a command):
8756
+ npx -y @mushi-mushi/mcp
8757
+
8758
+ Environment:
8759
+ MUSHI_API_KEY an MCP key (mcp:read or mcp:write). Not the SDK key (report:write).
8760
+ Unset: the key saved by \`npx mushi-mushi login\` is used.
8761
+ MUSHI_PROJECT_ID the project UUID. Unset: the saved project, or account mode.
8762
+ MUSHI_API_ENDPOINT only for self-hosting, e.g. https://xyz.supabase.co/functions/v1/api
8763
+ MUSHI_FEATURES tool groups to show, e.g. triage,qa,codebase, or all
8764
+ MUSHI_SCOPES limit the tools to these scopes, e.g. mcp:read
8765
+
8766
+ Flags:
8767
+ -h, --help show this help and exit
8768
+ -v, --version print the version and exit
8769
+
8770
+ Docs: https://kensaur.us/mushi-mushi/docs/sdks/mcp
8771
+ `;
8772
+ }
8773
+
8656
8774
  // src/optional-sentry.ts
8657
8775
  async function initOptionalSentry(env, deps) {
8658
8776
  const dsn = env.MUSHI_MCP_SENTRY_DSN?.trim();
@@ -8776,6 +8894,14 @@ function missingApiKeyReport({ env, cli, resolved }) {
8776
8894
  installStdoutGuard();
8777
8895
  var require2 = createRequire(import.meta.url);
8778
8896
  var VERSION = require2("../package.json").version;
8897
+ var ARGS_ACTION = stdioArgsAction(process.argv.slice(2));
8898
+ if (ARGS_ACTION !== "serve") {
8899
+ await new Promise((resolve) => {
8900
+ process.stdout.write(ARGS_ACTION === "help" ? stdioUsage(VERSION) : `${VERSION}
8901
+ `, () => resolve());
8902
+ });
8903
+ process.exit(0);
8904
+ }
8779
8905
  var log = createLogger2({ scope: "mushi:mcp", level: "info", destination: "stderr" });
8780
8906
  function resolveCliConfigPath() {
8781
8907
  const xdg = process.env.XDG_CONFIG_HOME;
@@ -8866,12 +8992,13 @@ async function main() {
8866
8992
  const keyScopes = await fetchKeyScopes({ apiEndpoint: API_ENDPOINT, apiKey: API_KEY, projectId: PROJECT_ID || void 0 });
8867
8993
  const decision = decideScopes(keyScopes, SCOPES);
8868
8994
  if (decision.kind === "sdk-key") {
8869
- const report = sdkKeyReport(decision.keyScopes, MUSHI_CONSOLE_URL);
8995
+ const sdkKeyFix = { projectId: PROJECT_ID || void 0, keySource: CREDENTIALS.apiKeySource };
8996
+ const report = sdkKeyReport(decision.keyScopes, MUSHI_CONSOLE_URL, sdkKeyFix);
8870
8997
  process.stderr.write(report);
8871
8998
  log.warn("The API key has no MCP scope (mcp:read / mcp:write) \u2014 serving setup mode.", {
8872
8999
  keyScopes: decision.keyScopes.join(",")
8873
9000
  });
8874
- serveUntilClosed(serveStdio(() => createSetupModeServer({ version: VERSION, missingKeyReport: report, reason: "sdk-key" }), {
9001
+ serveUntilClosed(serveStdio(() => createSetupModeServer({ version: VERSION, missingKeyReport: report, reason: "sdk-key", sdkKeyFix }), {
8875
9002
  onerror: (err) => log.error("stdio transport error", { err: String(err) })
8876
9003
  }));
8877
9004
  return;
package/dist/server.d.ts CHANGED
@@ -2,6 +2,25 @@ import { McpServer } from '@modelcontextprotocol/server';
2
2
  import { McpScope } from './catalog.js';
3
3
  import { FeatureFilter } from './feature-groups.js';
4
4
 
5
+ /**
6
+ * Which tools the configured key can actually use.
7
+ *
8
+ * Two fix agents on 2026-10-09 got INSUFFICIENT_SCOPE from search_reports and
9
+ * get_report_detail: their MUSHI_API_KEY was an SDK key (report:write), which
10
+ * can send reports but not read them. Every tool was listed anyway, and
11
+ * diagnose_setup itself needs mcp:read, so nothing said what was wrong. At
12
+ * start-up the stdio server now asks /v1/sync/whoami for the key's scopes:
13
+ * with no MCP scope it serves setup mode and explains the fix; with only
14
+ * mcp:read it hides the write tools. Any failure keeps today's behaviour.
15
+ */
16
+
17
+ /** Where the SDK key came from, and the project it is for, so the fix can be one exact command. */
18
+ interface SdkKeyFixContext {
19
+ projectId?: string;
20
+ /** `env`: MUSHI_API_KEY in this server's env block. `cli-config`: the key saved by the CLI. */
21
+ keySource?: 'env' | 'cli-config' | '';
22
+ }
23
+
5
24
  /**
6
25
  * FILE: packages/mcp/src/server.ts
7
26
  * PURPOSE: Testable MCP server factory. Exports `createMushiServer()` which
@@ -72,6 +91,8 @@ interface SetupModeServerConfig {
72
91
  * key without mcp:read or mcp:write, such as the report:write SDK key.
73
92
  */
74
93
  reason?: 'missing-key' | 'sdk-key';
94
+ /** For `sdk-key`: the project and key source, so the fix is one exact command. */
95
+ sdkKeyFix?: SdkKeyFixContext;
75
96
  fetch?: typeof fetch;
76
97
  timeoutMs?: number;
77
98
  }
package/dist/server.js CHANGED
@@ -104,7 +104,7 @@ var MUSHI_DOCS_INDEX = [
104
104
  route: "/admin/ci",
105
105
  markdown: "admin/ci.md",
106
106
  keywords: ["admin", "ci", "runners"],
107
- headings: ["Spend less on CI", "How it reads your runs", "Right now", "Test machine or your code", "Queue and wait", "Machines", "What would make fixes land sooner", "Your real bill"],
107
+ headings: ["Spend less on CI", "How it reads your runs", "Right now", "All apps", "Why it failed", "Test machine or your code", "Queue and wait", "Machines"],
108
108
  excerpt: "The CI runners page in the Mushi Mushi console shows where tests run, how long they wait for a machine, and whether a red check was your code or the machine."
109
109
  },
110
110
  {
@@ -284,7 +284,7 @@ var MUSHI_DOCS_INDEX = [
284
284
  route: "/admin/health",
285
285
  markdown: "admin/health.md",
286
286
  keywords: ["admin", "health"],
287
- headings: ["Time window", "LLM health summary", "Provider probes", "Cron job health", "Recent LLM calls log", "Recommended actions", "Related pages"],
287
+ headings: ["Time window", "LLM health summary", "Provider probes", "Cron job health", "Stuck reports", "Recent LLM calls log", "Recommended actions", "Server doctor (operators only)"],
288
288
  excerpt: "The Mushi Mushi health page shows whether Mushi Mushi itself works (AI calls, background jobs, provider connections), so you catch a degraded integration early."
289
289
  },
290
290
  {
@@ -347,7 +347,7 @@ var MUSHI_DOCS_INDEX = [
347
347
  route: "/admin/judge",
348
348
  markdown: "admin/judge.md",
349
349
  keywords: ["admin", "judge", "triage", "grading"],
350
- headings: ["Tabs", "Prompt promotion", "Drift alerts", "See also"],
350
+ headings: ["Reviewing a disagreement", "Tabs", "Prompt promotion", "Drift alerts", "See also"],
351
351
  excerpt: "The Triage grading page in the Mushi Mushi console shows how often a second AI agrees with each diagnosis, week by week, and the worst recent disagreements."
352
352
  },
353
353
  {
@@ -404,6 +404,15 @@ var MUSHI_DOCS_INDEX = [
404
404
  headings: ["First run: two screens", "Name your project", "See your first diagnosis", "Full checklist", "After you create a project", "Generate an API key", "Test the connection", "Install the SDK"],
405
405
  excerpt: "Get your first bug report into Mushi Mushi with the console's Set up page, from naming your project to a report with a plain-English diagnosis."
406
406
  },
407
+ {
408
+ title: "Ops",
409
+ url: docUrl("/admin/ops"),
410
+ route: "/admin/ops",
411
+ markdown: "admin/ops.md",
412
+ keywords: ["admin", "ops"],
413
+ headings: [],
414
+ excerpt: "The Ops page in Mushi Mushi shows every app's payments, releases and alerts in one feed, which app is not reporting, and what is still open."
415
+ },
407
416
  {
408
417
  title: "Overview (Home view)",
409
418
  url: docUrl("/admin/overview"),
@@ -449,13 +458,22 @@ var MUSHI_DOCS_INDEX = [
449
458
  headings: ["The 4-step workflow", "Summary tiles", "Steps", "Prompt table columns", "Actions per row", "Common tasks", "Fixing wrong component classification", "Investigating a bad judge score"],
450
459
  excerpt: "The AI prompts page in the Mushi Mushi console lets you edit and A/B compare the prompts behind each AI step before you promote a new version."
451
460
  },
461
+ {
462
+ title: "Providers & AI routes",
463
+ url: docUrl("/admin/providers"),
464
+ route: "/admin/providers",
465
+ markdown: "admin/providers.md",
466
+ keywords: ["admin", "providers", "ai", "routes"],
467
+ headings: [],
468
+ excerpt: "Operator-only page in the Mushi Mushi console showing each app's AI provider accounts, their health and spend, and the ordered model routes each app tries."
469
+ },
452
470
  {
453
471
  title: "Scheduled tests",
454
472
  url: docUrl("/admin/qa-coverage"),
455
473
  route: "/admin/qa-coverage",
456
474
  markdown: "admin/qa-coverage.md",
457
475
  keywords: ["admin", "qa-coverage", "coverage", "scheduled", "tests"],
458
- headings: ["Story lifecycle", "Execution providers", "Creating a story", "Story cards", "Story drawer", "Manual run", "Filters", "Related pages"],
476
+ headings: ["The status line", "Story lifecycle", "Execution providers", "Creating a story", "Story cards", "Story drawer", "Manual run", "Filters"],
459
477
  excerpt: "Scheduled tests in the Mushi Mushi console turn plain-English user flows into browser tests on a schedule, so you find out when login or checkout breaks."
460
478
  },
461
479
  {
@@ -518,7 +536,7 @@ var MUSHI_DOCS_INDEX = [
518
536
  route: "/admin/reports",
519
537
  markdown: "admin/reports.md",
520
538
  keywords: ["admin", "reports", "bugs"],
521
- headings: ["Diagnosis + Fix hero", "Compact diagnosis preview", "Merging a fix from report detail"],
539
+ headings: ["Diagnosis + Fix hero", "Compact diagnosis preview", "Pipeline strip on report detail", "Merging a fix from report detail"],
522
540
  excerpt: "The Bugs page is the Mushi Mushi bug list. Filter by status, severity, category and component, and start with the recommended action at the top."
523
541
  },
524
542
  {
@@ -717,7 +735,7 @@ var MUSHI_DOCS_INDEX = [
717
735
  markdown: "cloud.md",
718
736
  keywords: ["cloud"],
719
737
  headings: ["Plans", "Sign-up flow", "Why metered on diagnoses", "Spend controls", "Self-hosting"],
720
- excerpt: "Hosted Mushi Mushi. Bug reports, plain-English diagnoses, and fix dispatch without running servers. Free for one app with 100 diagnoses a month."
738
+ excerpt: "Hosted Mushi Mushi. Bug reports, plain-English diagnoses, and fix dispatch without running servers. Free for three apps with 300 diagnoses a month."
721
739
  },
722
740
  {
723
741
  title: "Compare",
@@ -771,7 +789,7 @@ var MUSHI_DOCS_INDEX = [
771
789
  markdown: "compare/sentry-vs-mushi.md",
772
790
  keywords: ["compare", "sentry-vs-mushi", "sentry"],
773
791
  headings: ["What each one is", "Side by side", "Where they overlap, and where they do not", "Running Mushi Mushi alongside Sentry [#running-mushi-alongside-sentry]", "Pick Sentry if", "Pick Mushi Mushi if [#pick-mushi-if]", "Frequently asked questions"],
774
- excerpt: "Sentry vs Mushi Mushi in 2026. What each captures, Sentry's free tier and Seer pricing next to Mushi Mushi's free plan (1 app, 100 diagnoses), and running both."
792
+ excerpt: "Sentry vs Mushi Mushi in 2026. What each captures, Sentry's free tier and Seer pricing beside Mushi Mushi's free plan (3 apps, 300 diagnoses), and running both."
775
793
  },
776
794
  {
777
795
  title: "Concepts",
@@ -1034,6 +1052,15 @@ var MUSHI_DOCS_INDEX = [
1034
1052
  headings: ["Step-by-step", "Wire Cursor", "(Optional) Add the evolution-loop coding rules", "Restart Cursor", "Verify", "Available tools in Cursor", "Keep lessons current", "Connecting GitHub for auto-PR"],
1035
1053
  excerpt: "Wire Mushi Mushi into Cursor with one command. Get fix context, lessons and fix dispatch right from the editor."
1036
1054
  },
1055
+ {
1056
+ title: "Ops hub (payments, releases and alerts in your team's Slack)",
1057
+ url: docUrl("/integrations/ops-hub"),
1058
+ route: "/integrations/ops-hub",
1059
+ markdown: "integrations/ops-hub.md",
1060
+ keywords: ["integrations", "ops-hub", "ops", "hub", "payments", "releases", "alerts", "team", "slack"],
1061
+ headings: ["What you get", "Slack bot", "Create a Slack app", "Point Slack at Mushi Mushi", "Save the token and the signing secret", "Pick the channels", "Connect an app", "Create the app's ops key"],
1062
+ excerpt: "Every app sends payments, releases and alerts to Mushi Mushi with one server key; your team's own Slack bot posts them, threads follow-ups and answers commands."
1063
+ },
1037
1064
  {
1038
1065
  title: "Voice intake",
1039
1066
  url: docUrl("/integrations/voice-intake"),
@@ -1050,7 +1077,7 @@ var MUSHI_DOCS_INDEX = [
1050
1077
  markdown: "ja.md",
1051
1078
  keywords: ["ja"],
1052
1079
  headings: ["\u307E\u305A\u7121\u6599\u3067\u8A66\u3059\uFF1A\u516C\u958B\u4E2D\u306E\u30B5\u30A4\u30C8\u3092\u30C1\u30A7\u30C3\u30AF", "\u3067\u304D\u308B\u3053\u3068", "\u5831\u544A\u30DC\u30BF\u30F3\u306F\u65E5\u672C\u8A9E\u3067\u8868\u793A\u3055\u308C\u307E\u3059", "\u59CB\u3081\u65B9\uFF1ALovable\u30FBBolt \u306E\u5834\u5408", "\u59CB\u3081\u65B9\uFF1ACursor\u30FBClaude Code \u306E\u5834\u5408", "\u904B\u55B6\u8005\u60C5\u5831", "\u82F1\u8A9E\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8"],
1053
- excerpt: "Mushi Mushi \u306F\u3001\u30A2\u30D7\u30EA\u306B\u300C\u554F\u984C\u3092\u5831\u544A\u300D\u30DC\u30BF\u30F3\u3092\u8FFD\u52A0\u3057\u3001\u5C4A\u3044\u305F\u4E0D\u5177\u5408\u306E\u539F\u56E0\u3068\u76F4\u3057\u65B9\u3092 AI \u304C\u8AAC\u660E\u3059\u308B\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9\u306E\u30C4\u30FC\u30EB\u3067\u3059\u3002\u7121\u6599\u30D7\u30E9\u30F3\u306F\u30A2\u30D7\u30EA 1 \u672C\u30FB\u6708 100 \u4EF6\u306E\u8A3A\u65AD\u307E\u3067\u3002"
1080
+ excerpt: "Mushi Mushi \u306F\u3001\u30A2\u30D7\u30EA\u306B\u300C\u554F\u984C\u3092\u5831\u544A\u300D\u30DC\u30BF\u30F3\u3092\u8FFD\u52A0\u3057\u3001\u5C4A\u3044\u305F\u4E0D\u5177\u5408\u306E\u539F\u56E0\u3068\u76F4\u3057\u65B9\u3092 AI \u304C\u8AAC\u660E\u3059\u308B\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9\u306E\u30C4\u30FC\u30EB\u3067\u3059\u3002\u7121\u6599\u30D7\u30E9\u30F3\u306F\u30A2\u30D7\u30EA 3 \u672C\u30FB\u6708 300 \u4EF6\u306E\u8A3A\u65AD\u307E\u3067\u3002"
1054
1081
  },
1055
1082
  {
1056
1083
  title: "Launch Week",
@@ -1446,7 +1473,7 @@ var MUSHI_DOCS_INDEX = [
1446
1473
  markdown: "pricing.md",
1447
1474
  keywords: ["pricing", "free", "builder", "studio", "self-host"],
1448
1475
  headings: ["All plans", "What counts as a diagnosis", "Pricing estimator", "Example bills", "Why apps, not reports?", "Why diagnoses, not events", "Your own AI key and the self-host path", "Compared to Sentry + Seer"],
1449
- excerpt: "Mushi Mushi pricing. Free for one app and 100 AI bug diagnoses a month. Builder $29/mo for 3 apps, Studio $79/mo for 10. Free to self-host."
1476
+ excerpt: "Mushi Mushi pricing. Free for three apps and 300 AI bug diagnoses a month. Builder $29/mo for 1,000 diagnoses, Studio $79/mo for 10 apps. Free to self-host."
1450
1477
  },
1451
1478
  {
1452
1479
  title: "Quickstart: install, first report, first fix",
@@ -1475,6 +1502,15 @@ var MUSHI_DOCS_INDEX = [
1475
1502
  headings: ["Get your project ID and API key", "Install and register"],
1476
1503
  excerpt: "Free, open-source bug report widget for Angular 17+: one provideMushi() call registers the service and error handler, so errors and reports reach your queue."
1477
1504
  },
1505
+ {
1506
+ title: "Ask Bolt why it broke",
1507
+ url: docUrl("/quickstart/bolt-mcp"),
1508
+ route: "/quickstart/bolt-mcp",
1509
+ markdown: "quickstart/bolt-mcp.md",
1510
+ keywords: ["quickstart", "bolt-mcp", "bolt", "mcp", "ask", "broke"],
1511
+ headings: ["Open your connectors", "Add Mushi Mushi as a custom MCP server", "Sign in and approve", "Turn it on in your project", "Ask Bolt", "Which tools Bolt gets", "If it does not connect"],
1512
+ excerpt: "Add Mushi Mushi to Bolt as a custom MCP connector, sign in once, and ask Bolt what users reported. Bolt reads the plain-English diagnosis and fixes the bug."
1513
+ },
1478
1514
  {
1479
1515
  title: "Bug report widget for Capacitor and Ionic",
1480
1516
  url: docUrl("/quickstart/capacitor"),
@@ -1502,6 +1538,15 @@ var MUSHI_DOCS_INDEX = [
1502
1538
  headings: ["Get your project ID and API key", "Install", "Initialize", "Open the widget or submit a report"],
1503
1539
  excerpt: "Free, open-source bug report widget for Flutter (preview): shake-to-report, a Material bottom sheet and an offline queue. A git dependency, not on pub.dev yet."
1504
1540
  },
1541
+ {
1542
+ title: "HTTP API: file a bug report with one curl",
1543
+ url: docUrl("/quickstart/http-api"),
1544
+ route: "/quickstart/http-api",
1545
+ markdown: "quickstart/http-api.md",
1546
+ keywords: ["quickstart", "http-api", "http", "api", "file", "bug", "report", "one", "curl"],
1547
+ headings: ["Get your project ID and key", "Send a report", "Check it", "The fields", "Keys and scopes", "Rate limits", "More than one report", "OpenAPI spec"],
1548
+ excerpt: "Send a bug report to Mushi Mushi with one HTTP call, no SDK. How to get a key, the scopes, the rate limits, and the OpenAPI 3.1 spec for code generators."
1549
+ },
1505
1550
  {
1506
1551
  title: "Incident loop: from bug report to fix prompt",
1507
1552
  url: docUrl("/quickstart/incident-loop"),
@@ -1574,6 +1619,15 @@ var MUSHI_DOCS_INDEX = [
1574
1619
  headings: ["Get your project ID and API key", "1. Install", "2. Mount the provider", "Optional native modules", "3. Verify"],
1575
1620
  excerpt: "Free, open-source bug report widget for React Native and Expo: shake to report, a floating bug button, then a plain-English diagnosis of each report."
1576
1621
  },
1622
+ {
1623
+ title: "Mushi Mushi in Replit",
1624
+ url: docUrl("/quickstart/replit"),
1625
+ route: "/quickstart/replit",
1626
+ markdown: "quickstart/replit.md",
1627
+ keywords: ["quickstart", "replit"],
1628
+ headings: ["Add the report button", "Connect Replit Agent", "Add the server", "Sign in and approve", "Ask Agent", "If it does not connect"],
1629
+ excerpt: "Add the Mushi Mushi report button to a Replit app with one prompt, then connect Replit Agent over MCP so it reads the plain-English diagnosis and fixes the bug."
1630
+ },
1577
1631
  {
1578
1632
  title: "Bug report widget for Svelte and SvelteKit",
1579
1633
  url: docUrl("/quickstart/svelte"),
@@ -1989,40 +2043,49 @@ var MUSHI_DOCS_INDEX = [
1989
2043
  excerpt: "Mushi Mushi's SOC 2 readiness, not certification. Nightly evidence for access, retention, DSAR and availability controls, retention per project, DSAR tracking."
1990
2044
  },
1991
2045
  {
1992
- title: "Self-hosting",
2046
+ title: "Self-hosting quickstart",
1993
2047
  url: docUrl("/self-hosting"),
1994
2048
  route: "/self-hosting",
1995
2049
  markdown: "self-hosting/index.md",
1996
- keywords: ["self-hosting", "self", "hosting"],
1997
- headings: ["What you'll deploy", "Fastest path \u2014 Docker Compose", "Managed-Supabase path"],
1998
- excerpt: "Run the whole Mushi Mushi stack yourself with Docker Compose. Your own keys, AGPLv3 server, MIT SDKs, no usage limits."
2050
+ keywords: ["self-hosting", "self", "hosting", "quickstart"],
2051
+ headings: ["Before you start", "Clone the repo", "Deploy the server", "Serve the console", "Sign up", "Sign the CLI in and run the doctor", "Get your first diagnosis", "Next"],
2052
+ excerpt: "Run Mushi Mushi on your own Supabase project, from zero to the first diagnosis, with one command. Every feature on, no usage limits."
1999
2053
  },
2000
2054
  {
2001
- title: "Admin SPA deploy",
2055
+ title: "Host the console",
2002
2056
  url: docUrl("/self-hosting/admin-spa"),
2003
2057
  route: "/self-hosting/admin-spa",
2004
2058
  markdown: "self-hosting/admin-spa.md",
2005
- keywords: ["self-hosting", "self", "hosting", "admin-spa", "admin", "spa", "deploy"],
2006
- headings: ["Build", "Deploy options", "SPA routing", "First-run setup"],
2007
- excerpt: "Build and deploy the Mushi Mushi admin console yourself. A static Vite and React app that talks to your Supabase project, and the env vars it needs."
2059
+ keywords: ["self-hosting", "self", "hosting", "admin-spa", "admin", "spa", "host", "console"],
2060
+ headings: ["Pick how you serve it", "Static build", "Docker image", "After it is up"],
2061
+ excerpt: "Serve the Mushi Mushi console yourself: a static build, a Docker image or Compose. Build it with your backend address, or connect it on first open."
2008
2062
  },
2009
2063
  {
2010
- title: "Self-host in minutes (Docker Compose)",
2064
+ title: "Docker Compose",
2011
2065
  url: docUrl("/self-hosting/docker-compose"),
2012
2066
  route: "/self-hosting/docker-compose",
2013
2067
  markdown: "self-hosting/docker-compose.md",
2014
- keywords: ["self-hosting", "self", "hosting", "docker-compose", "docker", "compose", "self-host", "minutes"],
2015
- headings: ["One command", "Clone and configure", "Bring the stack up", "Open the console", "What's running", "Production notes", "Managed Supabase instead"],
2016
- excerpt: "Self-host the whole Mushi Mushi stack with one Docker Compose file. Postgres, auth, storage, edge functions, the admin console and a Caddy reverse proxy."
2068
+ keywords: ["self-hosting", "self", "hosting", "docker-compose", "docker", "compose"],
2069
+ headings: ["Generate the secrets", "Start the stack", "Sign up and sign the CLI in", "What's running", "Upgrade", "Not included", "Production notes"],
2070
+ excerpt: "Run the whole Mushi Mushi stack in Docker Compose with no Supabase account. Postgres, auth, storage, every edge function, the console and Caddy, on one machine."
2017
2071
  },
2018
2072
  {
2019
- title: "Edge Functions deploy",
2073
+ title: "Edge functions",
2020
2074
  url: docUrl("/self-hosting/edge-functions"),
2021
2075
  route: "/self-hosting/edge-functions",
2022
2076
  markdown: "self-hosting/edge-functions.md",
2023
- keywords: ["self-hosting", "self", "hosting", "edge-functions", "edge", "functions", "deploy"],
2024
- headings: ["Minimal required (ingest + classify)", "Checking what is deployed", "Common optional functions", "Function inventory (core pipeline)", "Required secrets", "JWT verification"],
2025
- excerpt: "Deploy the Mushi Mushi Supabase Edge Functions for a self-hosted install. The minimal ingest and classification set, the full list, and the secrets they need."
2077
+ keywords: ["self-hosting", "self", "hosting", "edge-functions", "edge", "functions"],
2078
+ headings: ["Redeploy one function", "Check what is deployed", "Function inventory (core pipeline)", "JWT verification"],
2079
+ excerpt: "What the Mushi Mushi Supabase Edge Functions do, how they authenticate, and how to redeploy one. selfhost up deploys all of them."
2080
+ },
2081
+ {
2082
+ title: "Environment variables",
2083
+ url: docUrl("/self-hosting/environment"),
2084
+ route: "/self-hosting/environment",
2085
+ markdown: "self-hosting/environment.md",
2086
+ keywords: ["self-hosting", "self", "hosting", "environment", "variables"],
2087
+ headings: ["Set by the platform", "Function secrets", "Core (selfhost up sets these)", "AI keys (optional; one turns on the plain-English diagnosis and fix\u2026", "Operator notices and Slack routing (optional)", "Discord triage feed (optional)", "Code index (optional)", "Public diagram pages (optional)"],
2088
+ excerpt: "Every environment variable a self-hosted Mushi Mushi reads, where to set it, and whether it is required. Generated from the .env.example templates."
2026
2089
  },
2027
2090
  {
2028
2091
  title: "Langfuse + Sentry",
@@ -2034,13 +2097,22 @@ var MUSHI_DOCS_INDEX = [
2034
2097
  excerpt: "Wire Langfuse LLM tracing and Sentry error tracking into a self-hosted Mushi Mushi server. The Edge Function secrets and what each trace records."
2035
2098
  },
2036
2099
  {
2037
- title: "Supabase setup",
2100
+ title: "Operate and upgrade",
2101
+ url: docUrl("/self-hosting/operate"),
2102
+ route: "/self-hosting/operate",
2103
+ markdown: "self-hosting/operate.md",
2104
+ keywords: ["self-hosting", "self", "hosting", "operate", "upgrade"],
2105
+ headings: ["Check health", "Upgrade", "Headless bootstrap (MUSHIINIT)", "Who counts as the operator", "Extra cron jobs", "Integrations", "Security notes", "Multi-region (Helm, not yet proven end to end)"],
2106
+ excerpt: "Keep a self-hosted Mushi Mushi healthy. The doctor, upgrades, headless bootstrap, extra cron jobs, integrations, security notes and multi-region."
2107
+ },
2108
+ {
2109
+ title: "Supabase by hand",
2038
2110
  url: docUrl("/self-hosting/supabase"),
2039
2111
  route: "/self-hosting/supabase",
2040
2112
  markdown: "self-hosting/supabase.md",
2041
- keywords: ["self-hosting", "self", "hosting", "supabase", "setup"],
2042
- headings: ["Required extensions", "Required custom functions", "RLS pattern", "Seed data", "Verifying the setup"],
2043
- excerpt: "Set up a Supabase project for self-hosted Mushi Mushi. Link the CLI, push every migration, and check the Postgres extensions the server needs."
2113
+ keywords: ["self-hosting", "self", "hosting", "supabase", "hand"],
2114
+ headings: ["1. Link and push the migrations", "2. Set the function secrets", "3. Point cron at your project", "4. Deploy the functions", "5. Check it", "Row-level security"],
2115
+ excerpt: "Set up Supabase for self-hosted Mushi Mushi by hand: link, push migrations, set secrets, point cron at your project, deploy the functions."
2044
2116
  },
2045
2117
  {
2046
2118
  title: "Use cases & comparisons",
@@ -2282,6 +2354,16 @@ function safeStringify(value) {
2282
2354
  }
2283
2355
  }
2284
2356
 
2357
+ // src/key-scopes.ts
2358
+ function mcpKeyLoginCommand(projectId) {
2359
+ return `npx mushi-mushi login${projectId ? ` --project-id ${projectId}` : ""}`;
2360
+ }
2361
+ function sdkKeyNextAction(consoleUrl, ctx = {}) {
2362
+ const command = mcpKeyLoginCommand(ctx.projectId);
2363
+ const then = ctx.keySource === "env" ? "then remove MUSHI_API_KEY from this server's env block (the server then uses the saved key) and restart it." : "then restart this server.";
2364
+ return `Run \`${command}\` (approve in the browser; it saves a key that can read reports), ${then} Or mint an MCP key in the console (${consoleUrl}/mcp \u2192 "Mint mcp:read key") and put it in MUSHI_API_KEY.`;
2365
+ }
2366
+
2285
2367
  // src/arg-aliases.ts
2286
2368
  function snakeAliasOf(name) {
2287
2369
  return name.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);
@@ -6995,7 +7077,7 @@ function createSetupModeServer(config) {
6995
7077
  features: "all",
6996
7078
  ...config.fetch ? { fetch: config.fetch } : {},
6997
7079
  ...config.timeoutMs ? { timeoutMs: config.timeoutMs } : {},
6998
- instructions: config.reason === "sdk-key" ? "Mushi is running in setup mode: the configured API key is an SDK key (report:write). It can send bug reports but not read them, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Call diagnose_setup for how to mint an MCP key (mcp:read), then restart the MCP server." : "Mushi is running in setup mode: no API key is configured, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Call diagnose_setup for the exact steps to connect (run `npx mushi-mushi` or `mushi login`, or put MUSHI_API_KEY in this server's env block), then restart the MCP server."
7080
+ instructions: config.reason === "sdk-key" ? "Mushi is running in setup mode: the configured API key is an SDK key (report:write). It can send bug reports but not read them, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Fix: " + sdkKeyNextAction(MUSHI_CONSOLE_URL, config.sdkKeyFix) : "Mushi is running in setup mode: no API key is configured, so only search_mushi_docs, get_mushi_doc and diagnose_setup work. Call diagnose_setup for the exact steps to connect (run `npx mushi-mushi` or `mushi login`, or put MUSHI_API_KEY in this server's env block), then restart the MCP server."
6999
7081
  });
7000
7082
  const internals = server;
7001
7083
  for (const [name, tool] of Object.entries(internals._registeredTools)) {
@@ -7011,7 +7093,7 @@ function createSetupModeServer(config) {
7011
7093
  const spec = TOOL_CATALOG.find((t) => t.name === "diagnose_setup");
7012
7094
  if (!spec) throw new Error("[mushi-mcp] diagnose_setup is missing from TOOL_CATALOG");
7013
7095
  const sdkKey = config.reason === "sdk-key";
7014
- const nextAction = sdkKey ? `Mint an MCP key in the console (${MUSHI_CONSOLE_URL}/mcp \u2192 "Mint mcp:read key") or run \`mushi login\`, put it in MUSHI_API_KEY for this server, then restart it.` : "Run `npx mushi-mushi` in your project (signs you in and writes the key) or `mushi login`, then restart this MCP server.";
7096
+ const nextAction = sdkKey ? sdkKeyNextAction(MUSHI_CONSOLE_URL, config.sdkKeyFix) : "Run `npx mushi-mushi` in your project (signs you in and writes the key) or `mushi login`, then restart this MCP server.";
7015
7097
  server.registerTool(
7016
7098
  "diagnose_setup",
7017
7099
  {
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.31.4",
4
+ "version": "0.31.6",
5
5
  "license": "MIT",
6
6
  "description": "MCP server for Cursor, Claude Code and Copilot. One place to improve AI-built apps: fix bugs, smooth user journeys and clean up the code.",
7
7
  "type": "module",