@bun913/mcp-testrail 0.19.0 → 0.19.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.
package/README.md CHANGED
@@ -43,10 +43,8 @@ You can connect this MCP server by setting like the below. This method uses `npx
43
43
  ## Troubleshooting
44
44
 
45
45
  - **`spawn node ENOENT` errors**: Ensure that Node.js is properly installed and in your PATH.
46
- - **Connection issues**: Verify that the server is running and the URL is correctly configured in your MCP client.
47
- - **Authentication issues**: Check your TestRail API credentials in the `.env` file.
48
- - **SSE connection errors**: If you see `SSE error: TypeError: fetch failed: connect ECONNREFUSED`, make sure the server is running on the specified port.
49
- - **Your conversation is too long**: Pleae use `limit` and `offset` parameter for test cases
46
+ - **Authentication issues**: Check your TestRail API credentials.
47
+ - **Your conversation is too long**: Use `limit` and `offset` parameters for test cases and sections to paginate results.
50
48
 
51
49
  ## Contributing
52
50
 
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
- "version": "0.19.0",
9
+ "version": "0.19.1",
10
10
  "type": "module",
11
11
  "main": "dist/index.js",
12
12
  "types": "dist/index.d.ts",
@@ -15,20 +15,15 @@
15
15
  "README.md"
16
16
  ],
17
17
  "scripts": {
18
- "start": "node dist/sse.js",
19
18
  "start:stdio": "node dist/stdio.js",
20
19
  "format": "biome format --write ./src",
21
20
  "test": "vitest ./test --reporter=verbose --coverage",
22
21
  "test:ci": "vitest run ./test --silent --coverage --reporter=verbose",
23
- "start:fastmcp": "fastmcp dev src/index.ts",
24
22
  "build": "tsc",
25
23
  "prepublishOnly": "npm run build",
26
- "debug": "node scripts/debug.js",
27
24
  "playwright-cli": "playwright-cli"
28
25
  },
29
26
  "devDependencies": {
30
- "@modelcontextprotocol/inspector": "^0.17.2",
31
- "@types/express": "^5.0.1",
32
27
  "@types/node": "^22.13.14",
33
28
  "@vitest/coverage-v8": "^3.0.9",
34
29
  "typescript": "~5.7.2",
@@ -40,7 +35,6 @@
40
35
  "@modelcontextprotocol/sdk": "^1.27.1",
41
36
  "axios": "^1.13.5",
42
37
  "dotenv": "^16.4.5",
43
- "fastmcp": "^3.34.0",
44
38
  "form-data": "^4.0.0",
45
39
  "zod": "^3.24.2"
46
40
  },
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/index.js DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- // TestRail MCP Serverのエントリーポイント
3
- import { startServer } from "./server/server.js";
4
- // サーバー起動
5
- startServer();
6
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,gCAAgC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,SAAS;AACT,WAAW,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- import "dotenv/config";
2
- export declare const startServer: () => Promise<void>;
@@ -1,70 +0,0 @@
1
- import express from "express";
2
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
4
- import "dotenv/config";
5
- import { TestRailClient } from "../client/api/index.js";
6
- import { registerAllTools } from "./api/index.js";
7
- // Validate TestRail configuration
8
- if (!process.env.TESTRAIL_URL ||
9
- !process.env.TESTRAIL_USERNAME ||
10
- !process.env.TESTRAIL_API_KEY) {
11
- throw new Error("TESTRAIL_URL, TESTRAIL_USERNAME, and TESTRAIL_API_KEY must be set");
12
- }
13
- // Correct URL format: https://example.testrail.com/index.php?/
14
- const url = process.env.TESTRAIL_URL;
15
- const baseURL = url.endsWith("/index.php?/")
16
- ? url
17
- : url.endsWith("/")
18
- ? `${url}index.php?/`
19
- : `${url}/index.php?/`;
20
- // TestRail client configuration
21
- const testRailConfig = {
22
- baseURL: baseURL,
23
- auth: {
24
- username: process.env.TESTRAIL_USERNAME,
25
- password: process.env.TESTRAIL_API_KEY,
26
- },
27
- };
28
- // Initialize TestRail client
29
- const testRailClient = new TestRailClient(testRailConfig);
30
- // Create McpServer
31
- const server = new McpServer({
32
- name: "TestRail MCP Server",
33
- version: "1.0.0",
34
- });
35
- // Map for transport management
36
- const transports = {};
37
- // Server startup function
38
- export const startServer = async () => {
39
- console.log("Starting TestRail MCP Server...");
40
- // Create Express app
41
- const app = express();
42
- // Register all API tools
43
- registerAllTools(server, testRailClient);
44
- // SSE endpoint configuration
45
- app.get("/sse", async (_, res) => {
46
- const transport = new SSEServerTransport("/messages", res);
47
- transports[transport.sessionId] = transport;
48
- res.on("close", () => {
49
- delete transports[transport.sessionId];
50
- });
51
- await server.connect(transport);
52
- });
53
- // Message handling endpoint configuration
54
- app.post("/messages", async (req, res) => {
55
- const sessionId = req.query.sessionId;
56
- const transport = transports[sessionId];
57
- if (transport) {
58
- await transport.handlePostMessage(req, res);
59
- }
60
- else {
61
- res.status(400).send("No transport found for the session ID");
62
- }
63
- });
64
- // Start the server
65
- app.listen(8080, () => {
66
- console.log("Server started successfully.");
67
- console.log("Server is running on SSE at http://localhost:8080/sse");
68
- });
69
- };
70
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAwB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,kCAAkC;AAClC,IACC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY;IACzB,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB;IA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S,GAAG,IAAI,kBAAkB,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QAC3D,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;QAE5C,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACpB,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,0CAA0C;IAC1C,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACxC,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,SAAmB,CAAC;QAChD,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;QAExC,IAAI,SAAS,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QAC/D,CAAC;IACF,CAAC,CAAC,CAAC;IAEH,mBAAmB;IACnB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;QACrB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
package/dist/sse.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/sse.js DELETED
@@ -1,5 +0,0 @@
1
- // TestRail MCP ServerのSSEエントリーポイント
2
- import { startServer } from "./server/server.js";
3
- // SSEサーバー起動
4
- startServer();
5
- //# sourceMappingURL=sse.js.map
package/dist/sse.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"sse.js","sourceRoot":"","sources":["../src/sse.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,YAAY;AACZ,WAAW,EAAE,CAAC"}