@qase/mcp-server 1.0.0-beta.1

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 (107) hide show
  1. package/CHANGELOG.md +165 -0
  2. package/README.md +450 -0
  3. package/build/client/index.d.ts +23 -0
  4. package/build/client/index.d.ts.map +1 -0
  5. package/build/client/index.js +55 -0
  6. package/build/client/index.js.map +1 -0
  7. package/build/index.d.ts +32 -0
  8. package/build/index.d.ts.map +1 -0
  9. package/build/index.js +125 -0
  10. package/build/index.js.map +1 -0
  11. package/build/operations/attachments.d.ts +8 -0
  12. package/build/operations/attachments.d.ts.map +1 -0
  13. package/build/operations/attachments.js +123 -0
  14. package/build/operations/attachments.js.map +1 -0
  15. package/build/operations/authors.d.ts +8 -0
  16. package/build/operations/authors.d.ts.map +1 -0
  17. package/build/operations/authors.js +68 -0
  18. package/build/operations/authors.js.map +1 -0
  19. package/build/operations/cases.d.ts +8 -0
  20. package/build/operations/cases.d.ts.map +1 -0
  21. package/build/operations/cases.js +278 -0
  22. package/build/operations/cases.js.map +1 -0
  23. package/build/operations/configurations.d.ts +8 -0
  24. package/build/operations/configurations.d.ts.map +1 -0
  25. package/build/operations/configurations.js +102 -0
  26. package/build/operations/configurations.js.map +1 -0
  27. package/build/operations/custom-fields.d.ts +8 -0
  28. package/build/operations/custom-fields.d.ts.map +1 -0
  29. package/build/operations/custom-fields.js +167 -0
  30. package/build/operations/custom-fields.js.map +1 -0
  31. package/build/operations/defects.d.ts +8 -0
  32. package/build/operations/defects.d.ts.map +1 -0
  33. package/build/operations/defects.js +219 -0
  34. package/build/operations/defects.js.map +1 -0
  35. package/build/operations/environments.d.ts +8 -0
  36. package/build/operations/environments.d.ts.map +1 -0
  37. package/build/operations/environments.js +149 -0
  38. package/build/operations/environments.js.map +1 -0
  39. package/build/operations/milestones.d.ts +8 -0
  40. package/build/operations/milestones.d.ts.map +1 -0
  41. package/build/operations/milestones.js +150 -0
  42. package/build/operations/milestones.js.map +1 -0
  43. package/build/operations/plans.d.ts +8 -0
  44. package/build/operations/plans.d.ts.map +1 -0
  45. package/build/operations/plans.js +153 -0
  46. package/build/operations/plans.js.map +1 -0
  47. package/build/operations/projects.d.ts +8 -0
  48. package/build/operations/projects.d.ts.map +1 -0
  49. package/build/operations/projects.js +186 -0
  50. package/build/operations/projects.js.map +1 -0
  51. package/build/operations/results.d.ts +8 -0
  52. package/build/operations/results.d.ts.map +1 -0
  53. package/build/operations/results.js +208 -0
  54. package/build/operations/results.js.map +1 -0
  55. package/build/operations/runs.d.ts +8 -0
  56. package/build/operations/runs.d.ts.map +1 -0
  57. package/build/operations/runs.js +211 -0
  58. package/build/operations/runs.js.map +1 -0
  59. package/build/operations/search.d.ts +8 -0
  60. package/build/operations/search.d.ts.map +1 -0
  61. package/build/operations/search.js +138 -0
  62. package/build/operations/search.js.map +1 -0
  63. package/build/operations/shared-parameters.d.ts +8 -0
  64. package/build/operations/shared-parameters.d.ts.map +1 -0
  65. package/build/operations/shared-parameters.js +139 -0
  66. package/build/operations/shared-parameters.js.map +1 -0
  67. package/build/operations/shared-steps.d.ts +8 -0
  68. package/build/operations/shared-steps.d.ts.map +1 -0
  69. package/build/operations/shared-steps.js +155 -0
  70. package/build/operations/shared-steps.js.map +1 -0
  71. package/build/operations/suites.d.ts +8 -0
  72. package/build/operations/suites.d.ts.map +1 -0
  73. package/build/operations/suites.js +164 -0
  74. package/build/operations/suites.js.map +1 -0
  75. package/build/operations/system-fields.d.ts +8 -0
  76. package/build/operations/system-fields.d.ts.map +1 -0
  77. package/build/operations/system-fields.js +40 -0
  78. package/build/operations/system-fields.js.map +1 -0
  79. package/build/operations/users.d.ts +8 -0
  80. package/build/operations/users.d.ts.map +1 -0
  81. package/build/operations/users.js +68 -0
  82. package/build/operations/users.js.map +1 -0
  83. package/build/types/index.d.ts +49 -0
  84. package/build/types/index.d.ts.map +1 -0
  85. package/build/types/index.js +13 -0
  86. package/build/types/index.js.map +1 -0
  87. package/build/utils/errors.d.ts +73 -0
  88. package/build/utils/errors.d.ts.map +1 -0
  89. package/build/utils/errors.js +136 -0
  90. package/build/utils/errors.js.map +1 -0
  91. package/build/utils/qql-helpers.d.ts +59 -0
  92. package/build/utils/qql-helpers.d.ts.map +1 -0
  93. package/build/utils/qql-helpers.js +85 -0
  94. package/build/utils/qql-helpers.js.map +1 -0
  95. package/build/utils/registry.d.ts +97 -0
  96. package/build/utils/registry.d.ts.map +1 -0
  97. package/build/utils/registry.js +132 -0
  98. package/build/utils/registry.js.map +1 -0
  99. package/build/utils/test-helpers.d.ts +32 -0
  100. package/build/utils/test-helpers.d.ts.map +1 -0
  101. package/build/utils/test-helpers.js +81 -0
  102. package/build/utils/test-helpers.js.map +1 -0
  103. package/build/utils/validation.d.ts +107 -0
  104. package/build/utils/validation.d.ts.map +1 -0
  105. package/build/utils/validation.js +104 -0
  106. package/build/utils/validation.js.map +1 -0
  107. package/package.json +84 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,165 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-10-08
9
+
10
+ ### Added
11
+
12
+ #### Core Infrastructure
13
+ - Initial release of Qase MCP Server
14
+ - Full TypeScript implementation with strict type checking
15
+ - Comprehensive error handling with user-friendly messages
16
+ - Input validation using Zod schemas
17
+ - Tool registry system for MCP protocol integration
18
+ - Support for custom enterprise domains via `QASE_API_DOMAIN`
19
+ - Singleton API client with authentication management
20
+
21
+ #### Entity Operations (83 tools total)
22
+
23
+ **Projects Management** (6 tools)
24
+ - List, get, create, and delete projects
25
+ - Grant and revoke project access
26
+
27
+ **Test Cases** (8 tools)
28
+ - Full CRUD operations for test cases
29
+ - Bulk creation support
30
+ - External issue integration (Jira, GitHub, etc.)
31
+ - Support for test steps, attachments, and custom fields
32
+
33
+ **Test Suites** (5 tools)
34
+ - Hierarchical suite organization
35
+ - Full CRUD operations
36
+
37
+ **Test Runs** (7 tools)
38
+ - Create and manage test runs
39
+ - Complete runs and track progress
40
+ - Public link sharing support
41
+
42
+ **Test Results** (6 tools)
43
+ - Record test execution results
44
+ - Bulk result creation for performance
45
+ - Step-by-step execution tracking
46
+ - Attachment and stacktrace support
47
+
48
+ **Test Plans** (5 tools)
49
+ - Define and manage test plans
50
+ - Link test cases to plans
51
+
52
+ **Defects** (7 tools)
53
+ - Full defect lifecycle management
54
+ - Severity and status tracking
55
+ - Resolution workflow
56
+
57
+ **Milestones** (5 tools)
58
+ - Sprint and release organization
59
+ - Due date tracking
60
+
61
+ **Environments** (5 tools)
62
+ - Test environment configuration
63
+ - Link runs to environments
64
+
65
+ **Shared Steps** (5 tools)
66
+ - Reusable test step definitions
67
+ - Cross-case step sharing
68
+
69
+ **Shared Parameters** (5 tools)
70
+ - Data-driven testing support
71
+ - Reusable test data parameters
72
+
73
+ **Attachments** (4 tools)
74
+ - File upload and management
75
+ - Base64 encoding support
76
+
77
+ **Authors** (2 tools)
78
+ - Author information retrieval
79
+
80
+ **Custom Fields** (5 tools)
81
+ - Custom metadata definitions
82
+ - Support for multiple field types
83
+
84
+ **System Fields** (1 tool)
85
+ - System field configuration viewing
86
+
87
+ **Configurations** (3 tools)
88
+ - Browser, OS, device configurations
89
+ - Configuration group management
90
+
91
+ **Users** (2 tools)
92
+ - User information retrieval
93
+
94
+ #### QQL (Qase Query Language) Support
95
+ - `qql_search` tool for powerful cross-project queries
96
+ - `qql_help` tool with comprehensive syntax documentation
97
+ - QQL query builder utility for programmatic query construction
98
+ - Pre-built query examples for common scenarios:
99
+ - Recent failures
100
+ - Blocker defects
101
+ - Flaky tests
102
+ - Non-automated tests
103
+ - Active runs
104
+ - Tests by author/milestone
105
+
106
+ #### Testing & Quality
107
+ - 72 unit tests with Jest
108
+ - 82.48% code coverage
109
+ - Comprehensive test coverage for:
110
+ - API client configuration
111
+ - Error handling
112
+ - Input validation
113
+ - Tool registry
114
+ - QQL helpers
115
+ - Mock utilities for testing
116
+
117
+ #### Development Tools
118
+ - ESLint configuration with TypeScript support
119
+ - Prettier code formatting
120
+ - MCP Inspector integration for debugging
121
+ - Comprehensive build system
122
+ - Test coverage reporting
123
+
124
+ #### Documentation
125
+ - Comprehensive README with installation guides
126
+ - Integration instructions for:
127
+ - Claude Desktop
128
+ - Cursor
129
+ - Claude Code
130
+ - Usage examples and best practices
131
+ - QQL query examples
132
+ - Troubleshooting guide
133
+ - API reference for all 83 tools
134
+
135
+ ### Technical Details
136
+
137
+ - **Language**: TypeScript 5.3+
138
+ - **Target**: ES2022
139
+ - **Package Manager**: NPM
140
+ - **Dependencies**:
141
+ - `qaseio`: ^2.4.1 (Official Qase API client)
142
+ - `@modelcontextprotocol/sdk`: ^1.0.4 (MCP protocol)
143
+ - `zod`: ^3.24.1 (Runtime validation)
144
+ - `neverthrow`: ^8.3.0 (Functional error handling)
145
+ - `zod-to-json-schema`: ^3.24.1 (Schema conversion)
146
+ - **Dev Dependencies**:
147
+ - `jest`: ^29.7.0 (Testing)
148
+ - `ts-jest`: ^29.2.5 (TypeScript testing)
149
+ - `eslint`: ^9.18.0 (Linting)
150
+ - `prettier`: ^3.4.2 (Formatting)
151
+
152
+ ### Supported Platforms
153
+
154
+ - Node.js 18+
155
+ - macOS, Windows, Linux
156
+ - Compatible with all MCP clients
157
+
158
+ ### Known Limitations
159
+
160
+ - QQL search requires Business or Enterprise Qase subscription
161
+ - Some API client properties require `any` type casting due to library limitations
162
+ - Results are identified by hash, not numeric ID
163
+ - Custom fields accessed via bracket notation in QQL: `cf["Field Name"]`
164
+
165
+ [1.0.0]: https://github.com/qase-tms/qase-mcp-server/releases/tag/v1.0.0
package/README.md ADDED
@@ -0,0 +1,450 @@
1
+ # Qase MCP Server
2
+
3
+ Official Model Context Protocol (MCP) server for [Qase Test Management Platform](https://qase.io).
4
+
5
+ [![npm version](https://badge.fury.io/js/%40qase%2Fmcp-server.svg)](https://www.npmjs.com/package/@qase/mcp-server)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Overview
9
+
10
+ The Qase MCP Server provides seamless integration between AI assistants (Claude, Cursor, etc.) and the Qase Test Management Platform. It enables AI assistants to interact with your test cases, test runs, defects, and other Qase entities through a standardized protocol.
11
+
12
+ ### Features
13
+
14
+ - ✅ **Complete Qase API Coverage** - Access all Qase entities and operations
15
+ - ✅ **QQL Support** - Powerful Qase Query Language for advanced searches
16
+ - ✅ **Type-Safe** - Full TypeScript implementation with comprehensive validation
17
+ - ✅ **Custom Domains** - Support for enterprise custom domains
18
+
19
+ ### Supported Entities
20
+
21
+ The server provides tools for managing:
22
+
23
+ - **Projects** - Create and manage test projects
24
+ - **Test Cases** - Create, update, and organize test cases
25
+ - **Test Suites** - Organize tests into hierarchical suites
26
+ - **Test Runs** - Execute test runs and track progress
27
+ - **Test Results** - Record and analyze test execution results
28
+ - **Test Plans** - Define and manage test plans
29
+ - **Defects** - Track and manage bugs
30
+ - **Milestones** - Organize work by sprints/releases
31
+ - **Environments** - Manage test environments
32
+ - **Shared Steps** - Create reusable test steps
33
+ - **Shared Parameters** - Define reusable test data
34
+ - **Attachments** - Upload and manage files
35
+ - **Custom Fields** - Define custom metadata
36
+ - **Configurations** - Manage test configurations
37
+ - **Users** - User management operations
38
+ - **QQL Search** - Advanced cross-project queries
39
+
40
+ ## Installation
41
+
42
+ ### Prerequisites
43
+
44
+ - Node.js 18+
45
+ - Qase account with API token ([Get your token](https://app.qase.io/user/api/token))
46
+
47
+ ### Option 1: Install from NPM (Recommended)
48
+
49
+ ```bash
50
+ npm install -g @qase/qase-mcp-server
51
+ ```
52
+
53
+ ### Option 2: Install from Source (Development)
54
+
55
+ ```bash
56
+ # Clone the repository
57
+ git clone https://github.com/qase-tms/qase-mcp-server.git
58
+ cd qase-mcp-server
59
+
60
+ # Install dependencies
61
+ npm install
62
+
63
+ # Build the server
64
+ npm run build
65
+ ```
66
+
67
+ ## Configuration
68
+
69
+ ### Environment Variables
70
+
71
+ Create a `.env` file or set environment variables:
72
+
73
+ ```bash
74
+ # Required: Your Qase API token
75
+ QASE_API_TOKEN=your_api_token_here
76
+
77
+ # Optional: Custom API domain for enterprise customers
78
+ QASE_API_DOMAIN=api.qase.io
79
+ ```
80
+
81
+ Get your API token from: https://app.qase.io/user/api/token
82
+
83
+ ### Custom Domains (Enterprise)
84
+
85
+ If you're using Qase Enterprise with a custom domain:
86
+
87
+ ```bash
88
+ QASE_API_DOMAIN=api.yourcompany.qase.io
89
+ ```
90
+
91
+ ## Integration
92
+
93
+ ### Claude Desktop
94
+
95
+ Add to your Claude Desktop configuration file:
96
+
97
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
98
+ **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
99
+
100
+ ```json
101
+ {
102
+ "mcpServers": {
103
+ "qase": {
104
+ "command": "npx",
105
+ "args": ["-y", "@qase/mcp-server"],
106
+ "env": {
107
+ "QASE_API_TOKEN": "your_api_token_here"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ Or, if installed from source:
115
+
116
+ ```json
117
+ {
118
+ "mcpServers": {
119
+ "qase": {
120
+ "command": "node",
121
+ "args": ["/absolute/path/to/qase-mcp-server/build/index.js"],
122
+ "env": {
123
+ "QASE_API_TOKEN": "your_api_token_here"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ ### Cursor
131
+
132
+ 1. Open Cursor Settings
133
+ 2. Navigate to MCP settings
134
+ 3. Add the Qase MCP server:
135
+
136
+ ```json
137
+ {
138
+ "mcpServers": {
139
+ "qase": {
140
+ "command": "npx",
141
+ "args": ["-y", "@qase/mcp-server"],
142
+ "env": {
143
+ "QASE_API_TOKEN": "your_api_token_here"
144
+ }
145
+ }
146
+ }
147
+ }
148
+ ```
149
+
150
+ ### Claude Code
151
+
152
+ In Claude Code, the server can be configured similarly to Claude Desktop.
153
+
154
+ Add to your MCP configuration:
155
+
156
+ ```json
157
+ {
158
+ "mcpServers": {
159
+ "qase": {
160
+ "command": "npx",
161
+ "args": ["-y", "@qase/mcp-server"],
162
+ "env": {
163
+ "QASE_API_TOKEN": "your_api_token_here"
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ ## Usage Examples
171
+
172
+ ### Basic Operations
173
+
174
+ #### List All Projects
175
+
176
+ ```
177
+ Can you list all my Qase projects?
178
+ ```
179
+
180
+ #### Create a Test Case
181
+
182
+ ```
183
+ Create a test case in project DEMO titled "Login with valid credentials" with steps for entering username, password, and clicking login
184
+ ```
185
+
186
+ #### Search with QQL
187
+
188
+ ```
189
+ Find all failed test results from the last 7 days in project DEMO
190
+ ```
191
+
192
+ ### Advanced QQL Queries
193
+
194
+ #### Find Flaky Tests
195
+
196
+ ```
197
+ Search for all flaky test cases in project DEMO that are not automated
198
+ ```
199
+
200
+ The server will execute:
201
+ ```
202
+ entity = "case" and project = "DEMO" and isFlaky = true and automation = "Not automated"
203
+ ```
204
+
205
+ #### Find Open Blocker Defects
206
+
207
+ ```
208
+ Show me all open blocker defects in project DEMO
209
+ ```
210
+
211
+ #### Find Tests by Author
212
+
213
+ ```
214
+ Find all test cases created by john@example.com in the last month
215
+ ```
216
+
217
+ ### Working with Test Runs
218
+
219
+ #### Create and Execute a Test Run
220
+
221
+ ```
222
+ Create a test run in project DEMO called "Sprint 24 Regression" including all test cases from the "Authentication" suite, then add a passed result for case ID 123
223
+ ```
224
+
225
+ ## Available Tools
226
+
227
+ ### Projects (6 tools)
228
+ - `list_projects` - Get all projects
229
+ - `get_project` - Get project details
230
+ - `create_project` - Create new project
231
+ - `delete_project` - Delete project
232
+ - `grant_project_access` - Grant user/group access
233
+ - `revoke_project_access` - Revoke access
234
+
235
+ ### Test Cases (8 tools)
236
+ - `list_cases` - List all test cases
237
+ - `get_case` - Get test case details
238
+ - `create_case` - Create new test case
239
+ - `update_case` - Update test case
240
+ - `delete_case` - Delete test case
241
+ - `bulk_create_cases` - Create multiple cases
242
+ - `attach_external_issue` - Link external issue (Jira, etc.)
243
+ - `detach_external_issue` - Unlink external issue
244
+
245
+ ### Test Runs (7 tools)
246
+ - `list_runs` - List test runs
247
+ - `get_run` - Get run details
248
+ - `create_run` - Create new run
249
+ - `delete_run` - Delete run
250
+ - `complete_run` - Mark run as complete
251
+ - `get_run_public_link` - Get public link
252
+ - `delete_run_public_link` - Remove public link
253
+
254
+ ### Test Results (6 tools)
255
+ - `list_results` - List test results
256
+ - `get_result` - Get result details
257
+ - `create_result` - Create test result
258
+ - `create_results_bulk` - Create multiple results
259
+ - `update_result` - Update result
260
+ - `delete_result` - Delete result
261
+
262
+ ### Test Plans (5 tools)
263
+ - `list_plans` - List test plans
264
+ - `get_plan` - Get plan details
265
+ - `create_plan` - Create test plan
266
+ - `update_plan` - Update test plan
267
+ - `delete_plan` - Delete test plan
268
+
269
+ ### Suites (5 tools)
270
+ - `list_suites` - List suites
271
+ - `get_suite` - Get suite details
272
+ - `create_suite` - Create suite
273
+ - `update_suite` - Update suite
274
+ - `delete_suite` - Delete suite
275
+
276
+ ### Defects (7 tools)
277
+ - `list_defects` - List defects
278
+ - `get_defect` - Get defect details
279
+ - `create_defect` - Create defect
280
+ - `update_defect` - Update defect
281
+ - `delete_defect` - Delete defect
282
+ - `resolve_defect` - Mark as resolved
283
+ - `update_defect_status` - Update status
284
+
285
+ ### Milestones (5 tools)
286
+ - `list_milestones` - List milestones
287
+ - `get_milestone` - Get milestone details
288
+ - `create_milestone` - Create milestone
289
+ - `update_milestone` - Update milestone
290
+ - `delete_milestone` - Delete milestone
291
+
292
+ ### Environments (5 tools)
293
+ - `list_environments` - List environments
294
+ - `get_environment` - Get environment details
295
+ - `create_environment` - Create environment
296
+ - `update_environment` - Update environment
297
+ - `delete_environment` - Delete environment
298
+
299
+ ### Shared Steps (5 tools)
300
+ - `list_shared_steps` - List shared steps
301
+ - `get_shared_step` - Get shared step details
302
+ - `create_shared_step` - Create shared step
303
+ - `update_shared_step` - Update shared step
304
+ - `delete_shared_step` - Delete shared step
305
+
306
+ ### Shared Parameters (5 tools)
307
+ - `list_shared_parameters` - List parameters
308
+ - `get_shared_parameter` - Get parameter details
309
+ - `create_shared_parameter` - Create parameter
310
+ - `update_shared_parameter` - Update parameter
311
+ - `delete_shared_parameter` - Delete parameter
312
+
313
+ ### Supporting Entities
314
+ - **Attachments** (4 tools) - File management
315
+ - **Authors** (2 tools) - Author information
316
+ - **Custom Fields** (5 tools) - Custom field management
317
+ - **System Fields** (1 tool) - System field info
318
+ - **Configurations** (3 tools) - Configuration management
319
+ - **Users** (2 tools) - User management
320
+
321
+ ### QQL Search (2 tools)
322
+ - `qql_search` - Execute QQL query
323
+ - `qql_help` - Get QQL syntax help
324
+
325
+ **Total: 83 tools available**
326
+
327
+ ## Development
328
+
329
+ ### Building from Source
330
+
331
+ ```bash
332
+ npm run build
333
+ ```
334
+
335
+ ### Running Tests
336
+
337
+ ```bash
338
+ # Run all tests
339
+ npm test
340
+
341
+ # Run with coverage
342
+ npm run test:coverage
343
+
344
+ # Watch mode
345
+ npm run test:watch
346
+ ```
347
+
348
+ ### Linting
349
+
350
+ ```bash
351
+ # Check for issues
352
+ npm run lint
353
+
354
+ # Auto-fix issues
355
+ npm run lint -- --fix
356
+ ```
357
+
358
+ ### Debugging
359
+
360
+ Use the MCP Inspector for interactive debugging:
361
+
362
+ ```bash
363
+ npm run inspector
364
+ ```
365
+
366
+ Set your API token when prompted, then interact with tools in the inspector UI.
367
+
368
+ ## Troubleshooting
369
+
370
+ ### Authentication Errors
371
+
372
+ **Error**: `Authentication failed: Please check your QASE_API_TOKEN`
373
+
374
+ **Solution**:
375
+ 1. Verify your API token is correct: https://app.qase.io/user/api/token
376
+ 2. Ensure the token is set in your environment or config file
377
+ 3. Check for extra spaces or quotes in the token value
378
+
379
+ ### Connection Errors
380
+
381
+ **Error**: `Network error` or `ECONNREFUSED`
382
+
383
+ **Solution**:
384
+ 1. Check your internet connection
385
+ 2. Verify the API domain is correct (especially for enterprise customers)
386
+ 3. Check if Qase is accessible: https://api.qase.io/v1/
387
+
388
+ ### Custom Domain Issues
389
+
390
+ **Error**: `Invalid domain` or connection errors with custom domain
391
+
392
+ **Solution**:
393
+ 1. Ensure `QASE_API_DOMAIN` is set to just the domain (e.g., `api.company.qase.io`)
394
+ 2. Don't include `https://` or `/v1` in the domain
395
+ 3. Verify with your Qase administrator
396
+
397
+ ### No Tools Showing in MCP Client
398
+
399
+ **Error**: MCP client shows "no tools, prompts or resources" or 0 tools available
400
+
401
+ **Solution**:
402
+ 1. Verify your MCP configuration has the correct command and arguments
403
+ 2. Check that `QASE_API_TOKEN` is set in the `env` section
404
+ 3. Restart your MCP client completely (close and reopen)
405
+ 4. Check the MCP client logs for connection errors
406
+ 5. Verify the server is built: `npm run build`
407
+
408
+ ### Tool Not Found
409
+
410
+ **Error**: `Unknown tool: tool_name`
411
+
412
+ **Solution**:
413
+ 1. Ensure you're using the latest version: `npm update -g @qase/mcp-server`
414
+ 2. Check the tool name spelling matches the documentation
415
+ 3. Restart your MCP client after updating
416
+
417
+ ## Contributing
418
+
419
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
420
+
421
+ ### Development Guidelines
422
+
423
+ - Follow TypeScript best practices
424
+ - Add unit tests for new features
425
+ - Update documentation for new tools
426
+ - Ensure all tests pass: `npm test`
427
+ - Ensure linting passes: `npm run lint`
428
+ - Maintain code coverage above 70%
429
+
430
+ ## License
431
+
432
+ MIT License - see [LICENSE](LICENSE) file for details
433
+
434
+ ## Links
435
+
436
+ - **Qase Platform**: https://qase.io
437
+ - **Qase Documentation**: https://help.qase.io
438
+ - **API Documentation**: https://developers.qase.io
439
+ - **MCP Protocol**: https://modelcontextprotocol.io
440
+ - **Issue Tracker**: https://github.com/qase-tms/qase-mcp-server/issues
441
+
442
+ ## Support
443
+
444
+ - **Documentation**: https://help.qase.io
445
+ - **Email**: support@qase.io
446
+ - **GitHub Issues**: https://github.com/qase-tms/qase-mcp-server/issues
447
+
448
+ ---
449
+
450
+ Made with ❤️ by [Qase](https://qase.io)
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Qase API Client Configuration
3
+ *
4
+ * Provides a singleton instance of the Qase API client with support for:
5
+ * - Token-based authentication
6
+ * - Custom enterprise domains
7
+ * - Environment-based configuration
8
+ */
9
+ import { QaseApi } from 'qaseio';
10
+ /**
11
+ * Get or create the Qase API client instance
12
+ *
13
+ * @returns Configured QaseApi instance
14
+ * @throws Error if QASE_API_TOKEN is not set
15
+ */
16
+ export declare function getApiClient(): QaseApi;
17
+ /**
18
+ * Reset the client instance (useful for testing)
19
+ * @internal
20
+ */
21
+ export declare function resetClientInstance(): void;
22
+ export type { QaseApi } from 'qaseio';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA4CjC;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAGD,YAAY,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Qase API Client Configuration
3
+ *
4
+ * Provides a singleton instance of the Qase API client with support for:
5
+ * - Token-based authentication
6
+ * - Custom enterprise domains
7
+ * - Environment-based configuration
8
+ */
9
+ import { QaseApi } from 'qaseio';
10
+ /**
11
+ * Get API client configuration from environment variables
12
+ */
13
+ function getConfig() {
14
+ const token = process.env.QASE_API_TOKEN;
15
+ if (!token) {
16
+ throw new Error('QASE_API_TOKEN environment variable is required. ' +
17
+ 'Get your token from: https://app.qase.io/user/api/token');
18
+ }
19
+ const domain = process.env.QASE_API_DOMAIN || 'api.qase.io';
20
+ // Validate domain format (should not include protocol or path)
21
+ if (domain.includes('://') || domain.includes('/')) {
22
+ throw new Error('QASE_API_DOMAIN should only contain the domain name (e.g., api.qase.io), ' +
23
+ 'not the full URL with protocol or path');
24
+ }
25
+ const host = `https://${domain}`;
26
+ return { token, domain, host };
27
+ }
28
+ /**
29
+ * Singleton API client instance
30
+ */
31
+ let clientInstance = null;
32
+ /**
33
+ * Get or create the Qase API client instance
34
+ *
35
+ * @returns Configured QaseApi instance
36
+ * @throws Error if QASE_API_TOKEN is not set
37
+ */
38
+ export function getApiClient() {
39
+ if (!clientInstance) {
40
+ const config = getConfig();
41
+ clientInstance = new QaseApi({
42
+ token: config.token,
43
+ host: config.host,
44
+ });
45
+ }
46
+ return clientInstance;
47
+ }
48
+ /**
49
+ * Reset the client instance (useful for testing)
50
+ * @internal
51
+ */
52
+ export function resetClientInstance() {
53
+ clientInstance = null;
54
+ }
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAWjC;;GAEG;AACH,SAAS,SAAS;IAChB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAEzC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,mDAAmD;YACjD,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,aAAa,CAAC;IAE5D,+DAA+D;IAC/D,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CACb,2EAA2E;YACzE,wCAAwC,CAC3C,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,MAAM,EAAE,CAAC;IAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,IAAI,cAAc,GAAmB,IAAI,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,cAAc,GAAG,IAAI,OAAO,CAAC;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,cAAc,GAAG,IAAI,CAAC;AACxB,CAAC"}