@mushi-mushi/mcp 0.1.0 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +77 -10
  2. package/dist/index.js +2 -1
  3. package/package.json +62 -61
package/README.md CHANGED
@@ -1,23 +1,90 @@
1
1
  # @mushi-mushi/mcp
2
2
 
3
- MCP (Model Context Protocol) server that exposes Mushi Mushi reports to coding agents.
3
+ [Model Context Protocol](https://spec.modelcontextprotocol.io/) server that exposes Mushi Mushi reports, fixes, and project state to coding agents (Claude Code, Cursor, Codex, Continue, Cline, Zed, Windsurf, and any other MCP-compatible client).
4
4
 
5
- ## Usage
5
+ > **What this is, and what it isn't**
6
+ >
7
+ > - **This package** is the MCP **server** — runs locally next to your editor, talks to the Mushi Mushi API, and presents bug reports as MCP tools/resources to your coding agent.
8
+ > - **`@mushi-mushi/agents`** ships the MCP **client adapter** — used by the autofix orchestrator when your project's `autofix_agent = 'mcp'`. See `packages/agents/src/adapters/mcp.ts`.
9
+ > - The `generic_mcp` adapter shipped before V5.3 was a misnomer (it spoke plain REST). It is now `RestFixWorkerAgent`; the old export is kept as a deprecated alias for one more minor.
10
+
11
+ ## Quick start
12
+
13
+ ### 1. With Claude Desktop
14
+
15
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "mushi-mushi": {
21
+ "command": "npx",
22
+ "args": ["-y", "@mushi-mushi/mcp@latest"],
23
+ "env": {
24
+ "MUSHI_API_KEY": "key_xxx",
25
+ "MUSHI_PROJECT_ID": "proj_xxx",
26
+ "MUSHI_API_ENDPOINT": "https://api.mushimushi.dev"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ Restart Claude Desktop. You should see a hammer icon in the chat input — click it to see the Mushi Mushi tools.
34
+
35
+ ### 2. With Cursor
36
+
37
+ In Cursor settings, open **MCP** → **Add new MCP server** and paste:
6
38
 
7
39
  ```bash
8
- MUSHI_API_KEY=key_xxx MUSHI_PROJECT_ID=proj_xxx npx @mushi-mushi/mcp
40
+ npx -y @mushi-mushi/mcp@latest
9
41
  ```
10
42
 
11
- ### Tools
43
+ Set the same three env vars (`MUSHI_API_KEY`, `MUSHI_PROJECT_ID`, optional `MUSHI_API_ENDPOINT`).
44
+
45
+ ### 3. From the command line
46
+
47
+ ```bash
48
+ MUSHI_API_KEY=key_xxx MUSHI_PROJECT_ID=proj_xxx npx -y @mushi-mushi/mcp@latest
49
+ ```
50
+
51
+ The server speaks stdio MCP transport by default — your client launches it as a subprocess.
52
+
53
+ ## Tools
54
+
55
+ | Tool | What it does |
56
+ |---|---|
57
+ | `get_recent_reports` | Fetch the N most recent reports, with optional `status` / `category` / `severity` filters |
58
+ | `get_report_detail` | Full payload for a single report — description, console logs, network requests, screenshot URL, classification result, fix history |
59
+ | `search_reports` | Keyword + semantic search across reports for the configured project |
60
+
61
+ > Need a tool that isn't here? Open an issue at [github.com/kensaurus/mushi-mushi/issues](https://github.com/kensaurus/mushi-mushi/issues) and tag it `mcp`.
62
+
63
+ ## Resources
64
+
65
+ | URI | Returns |
66
+ |---|---|
67
+ | `project://settings` | Project config (name, autofix settings, plugins enabled, ontology) |
68
+ | `project://stats` | Counts of new / classified / fixed reports + last 7-day trend |
69
+
70
+ ## Environment variables
71
+
72
+ | Variable | Required | Default | Notes |
73
+ |---|---|---|---|
74
+ | `MUSHI_API_KEY` | yes | — | Project API key. Get one from the admin console → Settings → API keys. |
75
+ | `MUSHI_PROJECT_ID` | yes | — | Found in the admin console URL or Settings page. |
76
+ | `MUSHI_API_ENDPOINT` | no | `https://api.mushimushi.dev` | Override only if you self-host. |
77
+
78
+ ## Security
12
79
 
13
- - `get_recent_reports` fetch latest reports with optional filters
14
- - `get_report_detail` full report with console/network logs
15
- - `search_reports` keyword and semantic search
80
+ - The server runs locally; your API key never leaves your machine except in calls to your configured `MUSHI_API_ENDPOINT`.
81
+ - Use a **scoped** API key with read-only or read-write scope — never paste a service-role key.
82
+ - The server logs to stderr; redirect to a file if you need an audit trail.
16
83
 
17
- ### Resources
84
+ ## See also
18
85
 
19
- - `project://settings`current project configuration
20
- - `project://stats`report counts and trends
86
+ - [V5.3 whitepaper §2.10](../../MushiMushi_Whitepaper_V5.md) the agentic fix architecture this server feeds into.
87
+ - [`@mushi-mushi/agents`](../agents/README.md)orchestrator that consumes MCP-exposed fix workers.
21
88
 
22
89
  ## License
23
90
 
package/dist/index.js CHANGED
@@ -10,10 +10,11 @@ var API_ENDPOINT = process.env.MUSHI_API_ENDPOINT ?? "https://api.mushimushi.dev
10
10
  var API_KEY = process.env.MUSHI_API_KEY ?? "";
11
11
  var PROJECT_ID = process.env.MUSHI_PROJECT_ID ?? "";
12
12
  async function apiCall(path, options) {
13
- const res = await fetch(`${API_ENDPOINT}/api${path}`, {
13
+ const res = await fetch(`${API_ENDPOINT}${path}`, {
14
14
  ...options,
15
15
  headers: {
16
16
  "Content-Type": "application/json",
17
+ "Authorization": `Bearer ${API_KEY}`,
17
18
  "X-Mushi-Api-Key": API_KEY,
18
19
  "X-Mushi-Project": PROJECT_ID,
19
20
  ...options?.headers ?? {}
package/package.json CHANGED
@@ -1,61 +1,62 @@
1
- {
2
- "name": "@mushi-mushi/mcp",
3
- "version": "0.1.0",
4
- "license": "MIT",
5
- "description": "MCP server exposing Mushi Mushi reports to coding agents",
6
- "type": "module",
7
- "exports": {
8
- ".": {
9
- "import": "./dist/index.js",
10
- "types": "./dist/index.d.ts"
11
- }
12
- },
13
- "main": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "bin": {
16
- "mushi-mcp": "./dist/index.js"
17
- },
18
- "files": [
19
- "dist",
20
- "README.md",
21
- "LICENSE"
22
- ],
23
- "scripts": {
24
- "build": "tsup",
25
- "dev": "tsup --watch",
26
- "lint": "eslint src/",
27
- "test": "echo 'no tests yet'",
28
- "typecheck": "tsc --noEmit"
29
- },
30
- "dependencies": {
31
- "@modelcontextprotocol/sdk": "^1.12.1",
32
- "@mushi-mushi/core": "workspace:*",
33
- "zod": "^3.24.0"
34
- },
35
- "devDependencies": {
36
- "@mushi-mushi/eslint-config": "workspace:*",
37
- "@types/node": "^22.0.0",
38
- "eslint": "^9.39.4",
39
- "tsup": "^8.4.0",
40
- "typescript": "^5.7.3"
41
- },
42
- "repository": {
43
- "type": "git",
44
- "url": "https://github.com/kensaurus/mushi-mushi.git",
45
- "directory": "packages/mcp"
46
- },
47
- "author": "Kenji Sakuramoto",
48
- "homepage": "https://github.com/kensaurus/mushi-mushi/tree/main/packages/mcp#readme",
49
- "bugs": {
50
- "url": "https://github.com/kensaurus/mushi-mushi/issues"
51
- },
52
- "publishConfig": {
53
- "access": "public"
54
- },
55
- "sideEffects": false,
56
- "keywords": [
57
- "mushi-mushi",
58
- "bug-reporting",
59
- "sdk"
60
- ]
61
- }
1
+ {
2
+ "name": "@mushi-mushi/mcp",
3
+ "version": "0.2.0",
4
+ "license": "MIT",
5
+ "description": "MCP server exposing Mushi Mushi reports to coding agents",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ }
12
+ },
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "bin": {
16
+ "mushi-mcp": "./dist/index.js"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "dependencies": {
24
+ "@modelcontextprotocol/sdk": "^1.12.1",
25
+ "zod": "^4.3.6",
26
+ "@mushi-mushi/core": "^0.2.0"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^22.0.0",
30
+ "eslint": "^10.2.0",
31
+ "tsup": "^8.4.0",
32
+ "typescript": "^6.0.2",
33
+ "vitest": "^4.1.4",
34
+ "@mushi-mushi/eslint-config": "0.0.0"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/kensaurus/mushi-mushi.git",
39
+ "directory": "packages/mcp"
40
+ },
41
+ "author": "Kenji Sakuramoto",
42
+ "homepage": "https://github.com/kensaurus/mushi-mushi/tree/main/packages/mcp#readme",
43
+ "bugs": {
44
+ "url": "https://github.com/kensaurus/mushi-mushi/issues"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "sideEffects": false,
50
+ "keywords": [
51
+ "mushi-mushi",
52
+ "bug-reporting",
53
+ "sdk"
54
+ ],
55
+ "scripts": {
56
+ "build": "tsup",
57
+ "dev": "tsup --watch",
58
+ "lint": "eslint src/",
59
+ "test": "vitest run",
60
+ "typecheck": "tsc --noEmit"
61
+ }
62
+ }