• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cliffano / mcp-jenkins / 17005061373

16 Aug 2025 05:57AM UTC coverage: 60.215% (-2.0%) from 62.234%
17005061373

push

github

cliffano
Extract MCP tools and Nestor to CLI.

5 of 5 branches covered (100.0%)

Branch coverage included in aggregate %.

5 of 13 new or added lines in 2 files covered. (38.46%)

107 of 181 relevant lines covered (59.12%)

1.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

45.45
/lib/mcpJenkins.js
1
"use strict";
3✔
2
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3✔
3
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3✔
4

3✔
5
/**
3✔
6
 * McpJenkins is a Model Context Protocol (MCP) server that provides Jenkins management capabilities.
3✔
7
 */
3✔
8
class McpJenkins {
3✔
9

3✔
10
  /**
3✔
11
   * Initialise Nestor, MCP server, and load all MCP tools.
3✔
12
   */
3✔
13
  constructor(name, version, opts) {
3✔
14

×
15
    function _actionCb(resolve, reject, contentText) {
×
16
      return (err, result) => {
×
17
        if (err) {
×
18
          reject(err);
×
19
        } else {
×
20
          resolve({
×
21
            content: [{ type: 'text', text: contentText(result)}]
×
22
          });
×
23
        }
×
24
      };
×
25
    };
×
26

×
27
    this.server = new McpServer({
×
28
      name: name,
×
29
      version: version,
×
30
    });
×
31

×
NEW
32
    opts.tools.forEach(tool => {
×
33
      this.server.tool(
×
34
        tool.info.name,
×
35
        tool.info.description,
×
36
        tool.info.parameters,
×
NEW
37
        tool.handler(opts.nestor, _actionCb)
×
38
      );
×
39
    });
×
40
  }
×
41

3✔
42
  /**
3✔
43
   * Run the MCP server.
3✔
44
   */
3✔
45
  async run() {
3✔
46
    const transport = new StdioServerTransport();
×
47
    await this.server.connect(transport);
×
48
  }
×
49

3✔
50
}
3✔
51

3✔
52
export {
3✔
53
  McpJenkins as default
3✔
54
};
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc