@muggleai/mcp 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.
Files changed (94) hide show
  1. package/README.md +160 -0
  2. package/bin/muggle-mcp.js +2 -0
  3. package/dist/chunk-6DQWAMGJ.js +7626 -0
  4. package/dist/chunk-6DQWAMGJ.js.map +1 -0
  5. package/dist/cli/doctor.d.ts +8 -0
  6. package/dist/cli/doctor.d.ts.map +1 -0
  7. package/dist/cli/index.d.ts +9 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/login.d.ts +26 -0
  10. package/dist/cli/login.d.ts.map +1 -0
  11. package/dist/cli/main.d.ts +6 -0
  12. package/dist/cli/main.d.ts.map +1 -0
  13. package/dist/cli/serve.d.ts +20 -0
  14. package/dist/cli/serve.d.ts.map +1 -0
  15. package/dist/cli/setup.d.ts +16 -0
  16. package/dist/cli/setup.d.ts.map +1 -0
  17. package/dist/cli.js +305 -0
  18. package/dist/cli.js.map +1 -0
  19. package/dist/index.d.ts +35 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +36 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/local-qa/contracts/auth-schemas.d.ts +35 -0
  24. package/dist/local-qa/contracts/auth-schemas.d.ts.map +1 -0
  25. package/dist/local-qa/contracts/index.d.ts +7 -0
  26. package/dist/local-qa/contracts/index.d.ts.map +1 -0
  27. package/dist/local-qa/contracts/project-schemas.d.ts +1141 -0
  28. package/dist/local-qa/contracts/project-schemas.d.ts.map +1 -0
  29. package/dist/local-qa/contracts/session-schemas.d.ts +27 -0
  30. package/dist/local-qa/contracts/session-schemas.d.ts.map +1 -0
  31. package/dist/local-qa/index.d.ts +27 -0
  32. package/dist/local-qa/index.d.ts.map +1 -0
  33. package/dist/local-qa/services/auth-service.d.ts +79 -0
  34. package/dist/local-qa/services/auth-service.d.ts.map +1 -0
  35. package/dist/local-qa/services/execution-service.d.ts +55 -0
  36. package/dist/local-qa/services/execution-service.d.ts.map +1 -0
  37. package/dist/local-qa/services/index.d.ts +8 -0
  38. package/dist/local-qa/services/index.d.ts.map +1 -0
  39. package/dist/local-qa/services/project-storage-service.d.ts +262 -0
  40. package/dist/local-qa/services/project-storage-service.d.ts.map +1 -0
  41. package/dist/local-qa/services/storage-service.d.ts +166 -0
  42. package/dist/local-qa/services/storage-service.d.ts.map +1 -0
  43. package/dist/local-qa/tools/index.d.ts +5 -0
  44. package/dist/local-qa/tools/index.d.ts.map +1 -0
  45. package/dist/local-qa/tools/tool-registry.d.ts +18 -0
  46. package/dist/local-qa/tools/tool-registry.d.ts.map +1 -0
  47. package/dist/local-qa/types/auth-types.d.ts +97 -0
  48. package/dist/local-qa/types/auth-types.d.ts.map +1 -0
  49. package/dist/local-qa/types/config-types.d.ts +28 -0
  50. package/dist/local-qa/types/config-types.d.ts.map +1 -0
  51. package/dist/local-qa/types/enums.d.ts +141 -0
  52. package/dist/local-qa/types/enums.d.ts.map +1 -0
  53. package/dist/local-qa/types/index.d.ts +10 -0
  54. package/dist/local-qa/types/index.d.ts.map +1 -0
  55. package/dist/local-qa/types/project-types.d.ts +339 -0
  56. package/dist/local-qa/types/project-types.d.ts.map +1 -0
  57. package/dist/local-qa/types/storage-params.d.ts +544 -0
  58. package/dist/local-qa/types/storage-params.d.ts.map +1 -0
  59. package/dist/local-qa/types/tool-types.d.ts +38 -0
  60. package/dist/local-qa/types/tool-types.d.ts.map +1 -0
  61. package/dist/qa/contracts/index.d.ts +716 -0
  62. package/dist/qa/contracts/index.d.ts.map +1 -0
  63. package/dist/qa/index.d.ts +15 -0
  64. package/dist/qa/index.d.ts.map +1 -0
  65. package/dist/qa/tools/index.d.ts +5 -0
  66. package/dist/qa/tools/index.d.ts.map +1 -0
  67. package/dist/qa/tools/tool-registry.d.ts +22 -0
  68. package/dist/qa/tools/tool-registry.d.ts.map +1 -0
  69. package/dist/qa/types.d.ts +101 -0
  70. package/dist/qa/types.d.ts.map +1 -0
  71. package/dist/qa/upstream-client.d.ts +60 -0
  72. package/dist/qa/upstream-client.d.ts.map +1 -0
  73. package/dist/server/index.d.ts +6 -0
  74. package/dist/server/index.d.ts.map +1 -0
  75. package/dist/server/mcp-server.d.ts +34 -0
  76. package/dist/server/mcp-server.d.ts.map +1 -0
  77. package/dist/server/stdio-server.d.ts +11 -0
  78. package/dist/server/stdio-server.d.ts.map +1 -0
  79. package/dist/shared/auth.d.ts +75 -0
  80. package/dist/shared/auth.d.ts.map +1 -0
  81. package/dist/shared/config.d.ts +41 -0
  82. package/dist/shared/config.d.ts.map +1 -0
  83. package/dist/shared/credentials.d.ts +48 -0
  84. package/dist/shared/credentials.d.ts.map +1 -0
  85. package/dist/shared/index.d.ts +10 -0
  86. package/dist/shared/index.d.ts.map +1 -0
  87. package/dist/shared/logger.d.ts +21 -0
  88. package/dist/shared/logger.d.ts.map +1 -0
  89. package/dist/shared/open-browser.d.ts +27 -0
  90. package/dist/shared/open-browser.d.ts.map +1 -0
  91. package/dist/shared/types.d.ts +178 -0
  92. package/dist/shared/types.d.ts.map +1 -0
  93. package/package.json +75 -0
  94. package/scripts/postinstall.mjs +153 -0
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ # @muggleai/mcp
2
+
3
+ Unified MCP server for Muggle AI - combines Cloud QA and Local Testing tools into a single package.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @muggleai/mcp
9
+ ```
10
+
11
+ This automatically:
12
+ 1. Installs the package
13
+ 2. Downloads the Electron app binary (via postinstall)
14
+ 3. Sets up CLI commands
15
+
16
+ ## Quick Start
17
+
18
+ ### 1. Add to your MCP client
19
+
20
+ **Cursor (`~/.cursor/mcp.json`):**
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "muggle": {
26
+ "command": "muggle-mcp",
27
+ "args": ["serve"]
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ ### 2. Start using MCP tools
34
+
35
+ Ask your AI assistant to test your application! Authentication happens automatically when needed.
36
+
37
+ ## CLI Commands
38
+
39
+ ```bash
40
+ # Server (main command - starts MCP server for AI clients)
41
+ muggle-mcp serve # Start server with all tools (default)
42
+ muggle-mcp serve --qa # Cloud QA tools only
43
+ muggle-mcp serve --local # Local testing tools only
44
+
45
+ # Setup & Diagnostics
46
+ muggle-mcp setup # Download/update Electron app
47
+ muggle-mcp setup --force # Force re-download
48
+ muggle-mcp doctor # Diagnose installation issues
49
+
50
+ # Authentication (optional - auth happens automatically)
51
+ muggle-mcp login # Manually trigger login
52
+ muggle-mcp logout # Clear credentials
53
+ muggle-mcp status # Show auth status
54
+
55
+ # Info
56
+ muggle-mcp --version # Show version
57
+ muggle-mcp --help # Show help
58
+ ```
59
+
60
+ ## Authentication
61
+
62
+ Authentication happens automatically when you first use a tool that requires it:
63
+
64
+ 1. A browser window opens with a verification code
65
+ 2. You log in with your Muggle AI account
66
+ 3. The tool call continues with your credentials
67
+
68
+ Your credentials are stored in `~/.muggle-ai/credentials.json` and persist across sessions.
69
+
70
+ ## Available Tools
71
+
72
+ ### Cloud QA Tools
73
+
74
+ Tools that work with the Muggle AI cloud backend:
75
+
76
+ - `qa_project_create` - Create QA project
77
+ - `qa_project_list` - List projects
78
+ - `qa_use_case_create_from_prompts` - Create use cases
79
+ - `qa_test_case_generate_from_prompt` - Generate test cases
80
+ - `qa_workflow_start_*` - Start various workflows
81
+ - And more...
82
+
83
+ ### Local QA Tools
84
+
85
+ Tools that work with local testing:
86
+
87
+ - `muggle_project_create` - Create local project
88
+ - `muggle_test_case_save` - Save test case locally
89
+ - `muggle_execute_test_generation` - Generate test script
90
+ - `muggle_execute_replay` - Replay test script
91
+ - `muggle_cloud_pull_project` - Pull from cloud
92
+ - `muggle_publish_project` - Publish to cloud
93
+ - And more...
94
+
95
+ ## Data Directory
96
+
97
+ All Muggle AI data is stored in `~/.muggle-ai/`:
98
+
99
+ ```
100
+ ~/.muggle-ai/
101
+ ├── credentials.json # Auth credentials (auto-generated)
102
+ ├── projects/ # Local test projects
103
+ ├── sessions/ # Test execution sessions
104
+ └── electron-app/ # Downloaded Electron app
105
+ └── 1.0.0/
106
+ └── MuggleAI.exe
107
+ ```
108
+
109
+ ## Requirements
110
+
111
+ - Node.js 22 or higher
112
+ - For local testing: Electron app (downloaded automatically)
113
+
114
+ ## Development
115
+
116
+ ### Building
117
+
118
+ ```bash
119
+ npm install
120
+ npm run build
121
+ ```
122
+
123
+ ### Testing
124
+
125
+ ```bash
126
+ npm test # Run tests once
127
+ npm run test:watch # Watch mode
128
+ ```
129
+
130
+ ### Linting
131
+
132
+ ```bash
133
+ npm run lint # Auto-fix issues
134
+ npm run lint:check # Check only
135
+ ```
136
+
137
+ ## CI/CD Workflows
138
+
139
+ | Workflow | Trigger | Description |
140
+ | :------- | :------ | :---------- |
141
+ | `ci.yml` | Push/PR to main | Lint, test, build on multiple platforms/versions |
142
+ | `publish-mcp.yml` | Tag `v*` | Publish package to npm |
143
+ | `release-electron-app.yml` | Tag `electron-app@*` | Build and release Electron binaries |
144
+
145
+ ### Publishing a new version
146
+
147
+ 1. Update version in `package.json`
148
+ 2. Commit and push
149
+ 3. Create a git tag: `git tag v1.0.1 && git push --tags`
150
+ 4. The `publish-mcp.yml` workflow publishes to npm automatically
151
+
152
+ ### Releasing Electron app
153
+
154
+ 1. Update `muggleConfig.electronAppVersion` in `package.json`
155
+ 2. Run the `release-electron-app.yml` workflow manually
156
+ 3. Or create a tag: `git tag electron-app@1.0.1 && git push --tags`
157
+
158
+ ## License
159
+
160
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../dist/cli.js";