mcp-lint 0.8.0 → 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 (106) hide show
  1. package/README.md +51 -11
  2. package/dist/audit/baseline.d.ts +3 -0
  3. package/dist/audit/baseline.js +18 -0
  4. package/dist/audit/baseline.js.map +1 -0
  5. package/dist/audit/format.d.ts +5 -0
  6. package/dist/audit/format.js +246 -0
  7. package/dist/audit/format.js.map +1 -0
  8. package/dist/audit/index.d.ts +7 -0
  9. package/dist/audit/index.js +5 -0
  10. package/dist/audit/index.js.map +1 -0
  11. package/dist/audit/report.d.ts +268 -0
  12. package/dist/audit/report.js +327 -0
  13. package/dist/audit/report.js.map +1 -0
  14. package/dist/audit/tokens.d.ts +53 -0
  15. package/dist/audit/tokens.js +131 -0
  16. package/dist/audit/tokens.js.map +1 -0
  17. package/dist/catalog/connect.d.ts +3 -0
  18. package/dist/catalog/connect.js +54 -0
  19. package/dist/catalog/connect.js.map +1 -0
  20. package/dist/catalog/list.d.ts +39 -0
  21. package/dist/catalog/list.js +58 -0
  22. package/dist/catalog/list.js.map +1 -0
  23. package/dist/cli/commands/catalog.d.ts +2 -0
  24. package/dist/cli/commands/catalog.js +76 -0
  25. package/dist/cli/commands/catalog.js.map +1 -0
  26. package/dist/cli/commands/check.js +8 -1
  27. package/dist/cli/commands/check.js.map +1 -1
  28. package/dist/cli/commands/compat.js +4 -2
  29. package/dist/cli/commands/compat.js.map +1 -1
  30. package/dist/cli/commands/fix.js +6 -5
  31. package/dist/cli/commands/fix.js.map +1 -1
  32. package/dist/cli/commands/recover.js +22 -8
  33. package/dist/cli/commands/recover.js.map +1 -1
  34. package/dist/cli/commands/report.d.ts +12 -0
  35. package/dist/cli/commands/report.js +94 -0
  36. package/dist/cli/commands/report.js.map +1 -0
  37. package/dist/core/compat-matrix.d.ts +1 -0
  38. package/dist/core/compat-matrix.js +2 -1
  39. package/dist/core/compat-matrix.js.map +1 -1
  40. package/dist/core/diagnostic.d.ts +3 -1
  41. package/dist/core/engine.d.ts +1 -0
  42. package/dist/core/engine.js +33 -17
  43. package/dist/core/engine.js.map +1 -1
  44. package/dist/core/fixer.js +4 -3
  45. package/dist/core/fixer.js.map +1 -1
  46. package/dist/core/quality-score.d.ts +19 -0
  47. package/dist/core/quality-score.js +52 -13
  48. package/dist/core/quality-score.js.map +1 -1
  49. package/dist/core/rule.d.ts +1 -0
  50. package/dist/discover/files.js +23 -3
  51. package/dist/discover/files.js.map +1 -1
  52. package/dist/index.js +6 -1
  53. package/dist/index.js.map +1 -1
  54. package/dist/installed/config.js +15 -0
  55. package/dist/installed/config.js.map +1 -1
  56. package/dist/installed/lint.d.ts +2 -1
  57. package/dist/installed/lint.js +15 -0
  58. package/dist/installed/lint.js.map +1 -1
  59. package/dist/loaders/map-tools.d.ts +1 -0
  60. package/dist/loaders/map-tools.js +2 -0
  61. package/dist/loaders/map-tools.js.map +1 -1
  62. package/dist/loaders/remote-loader.js +2 -1
  63. package/dist/loaders/remote-loader.js.map +1 -1
  64. package/dist/loaders/stdio-loader.js +2 -1
  65. package/dist/loaders/stdio-loader.js.map +1 -1
  66. package/dist/mcp-server.js +1 -1
  67. package/dist/mcp-server.js.map +1 -1
  68. package/dist/preflight/engine.js +27 -0
  69. package/dist/preflight/engine.js.map +1 -1
  70. package/dist/recover/index.d.ts +1 -1
  71. package/dist/recover/index.js +1 -1
  72. package/dist/recover/index.js.map +1 -1
  73. package/dist/recover/probe.d.ts +10 -10
  74. package/dist/recover/probe.js +22 -1
  75. package/dist/recover/probe.js.map +1 -1
  76. package/dist/recover/score.d.ts +2 -1
  77. package/dist/recover/score.js +14 -0
  78. package/dist/recover/score.js.map +1 -1
  79. package/dist/recover/types.d.ts +4 -0
  80. package/dist/recover/types.js.map +1 -1
  81. package/dist/rules/client-specific/claude.js +1 -0
  82. package/dist/rules/client-specific/claude.js.map +1 -1
  83. package/dist/rules/client-specific/cline.js +2 -0
  84. package/dist/rules/client-specific/cline.js.map +1 -1
  85. package/dist/rules/client-specific/cursor.js +9 -0
  86. package/dist/rules/client-specific/cursor.js.map +1 -1
  87. package/dist/rules/client-specific/openai.js +1 -0
  88. package/dist/rules/client-specific/openai.js.map +1 -1
  89. package/dist/rules/index.js +3 -1
  90. package/dist/rules/index.js.map +1 -1
  91. package/dist/rules/no-content-encoding.js +1 -0
  92. package/dist/rules/no-content-encoding.js.map +1 -1
  93. package/dist/rules/no-empty-enum.js +1 -0
  94. package/dist/rules/no-empty-enum.js.map +1 -1
  95. package/dist/rules/no-required-false.js +1 -0
  96. package/dist/rules/no-required-false.js.map +1 -1
  97. package/dist/rules/no-unsupported-formats.js +1 -0
  98. package/dist/rules/no-unsupported-formats.js.map +1 -1
  99. package/dist/rules/tool-name.d.ts +9 -1
  100. package/dist/rules/tool-name.js +67 -0
  101. package/dist/rules/tool-name.js.map +1 -1
  102. package/dist/version.d.ts +1 -0
  103. package/dist/version.js +2 -0
  104. package/dist/version.js.map +1 -0
  105. package/examples/github-action.yml +2 -1
  106. package/package.json +7 -1
package/README.md CHANGED
@@ -13,6 +13,8 @@ Proof page, with a live bench: [mcp-lint-alpha.vercel.app](https://mcp-lint-alph
13
13
 
14
14
  MCP servers expose tool schemas consumed by **Claude**, **Cursor**, **Gemini**, **VS Code Copilot**, **Windsurf**, **Cline**, **OpenAI Agents SDK**, and **Continue.dev**. Each client has different JSON Schema support and quirks — a schema that works in Claude may silently break in Cursor or OpenAI. `mcp-lint` catches these issues before your users do.
15
15
 
16
+ This repository is **1.0.0**. npm `latest` is 1.0.0. Design notes: [PRODUCT.md](PRODUCT.md), [ROADMAP.md](ROADMAP.md), [ARCHITECTURE.md](ARCHITECTURE.md), [SECURITY.md](SECURITY.md), [RELEASE.md](RELEASE.md). Those files describe the current code. They are not extra commands.
17
+
16
18
  ```
17
19
  $ npx mcp-lint check tools.json
18
20
 
@@ -184,6 +186,37 @@ mcp-lint check --server sse --url http://localhost:3000/sse
184
186
  | `1` | One or more errors found |
185
187
  | `2` | Invalid input or configuration error |
186
188
 
189
+ ### `mcp-lint report <file>`
190
+
191
+ Writes the versioned audit report for one tools file. `check --format json` still prints the diagnostic array. `report --format json` prints `MCPAuditReport`.
192
+
193
+ ```bash
194
+ mcp-lint report tools.json
195
+ mcp-lint report tools.json --format sarif --output results.sarif
196
+ mcp-lint report tools.json --format html --output report.html
197
+ mcp-lint report tools.json --format markdown
198
+ ```
199
+
200
+ Formats are `terminal`, `json`, `markdown`, `sarif`, and `html`. The HTML file has inline CSS and no script. Token totals are a local `chars / 4` estimate. Recovery, preflight, and live inspection stay marked as not run. When the run has no schema errors, the report says: "No schema errors in this run. Recovery, preflight, and live inspection were not measured."
201
+
202
+ ```bash
203
+ mcp-lint report tools.json --baseline audit.baseline.json
204
+ mcp-lint report tools.json --update-baseline audit.baseline.json
205
+ ```
206
+
207
+ `--baseline` exits 1 when the stable snapshot differs. The snapshot pins `generatedAt` and keeps `tool.version`. Pass either `--baseline` or `--update-baseline`, not both. Exit `1` when the report contains an error, or when the file cannot be read.
208
+
209
+ ### `mcp-lint catalog`
210
+
211
+ Lists resources and prompts from one live server. It does not read installed configs and it does not call a tool.
212
+
213
+ ```bash
214
+ mcp-lint catalog --server stdio -- node server.js
215
+ mcp-lint catalog --server http --url https://example.com/mcp --format json
216
+ ```
217
+
218
+ `--server` is `stdio`, `sse`, or `http`. Remote transports need `--url`. `--timeout`, `--max-items`, and `--max-bytes` bound each list. A method the server does not implement is `unsupported` and exits 0. Any other list failure exits 1. Usage errors exit 2. `--format` is `terminal` or `json`.
219
+
187
220
  ---
188
221
 
189
222
  ### `mcp-lint diff <before> <after>`
@@ -216,10 +249,10 @@ Looked-up files:
216
249
  |--------|------|
217
250
  | Cursor | `~/.cursor/mcp.json` and `./.cursor/mcp.json` |
218
251
  | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
219
- | Claude Code | `~/.claude.json`, `~/.claude/settings.json`, and `./.mcp.json` |
252
+ | Claude Code | `~/.claude.json`, `~/.claude/settings.json`, and `./.mcp.json`. `~/.claude.json` also contributes each `projects.<path>.mcpServers` entry. |
220
253
  | VS Code | `~/Library/Application Support/Code/User/mcp.json` and `./.vscode/mcp.json` |
221
254
 
222
- `--strict` also exits 1 when a configured server fails to start. Without it, a start failure is printed and the exit code follows the schema errors.
255
+ `--strict` also exits 1 when a configured server fails to start. Without it, a start failure is printed and the exit code follows the schema errors. If two started servers expose the same tool name, both reports include `tool-name/server-collision`.
223
256
 
224
257
  ---
225
258
 
@@ -237,7 +270,7 @@ mcp-lint diff tools.json tools.next.json
237
270
 
238
271
  ### `mcp-lint fix [input]`
239
272
 
240
- Auto-fixes issues that are safe to fix automatically (no semantic changes).
273
+ Writes fixes marked `safe`. `review` and `manual` fixes are printed by `--dry-run` and left in the file. mcp-lint does not invent titles, descriptions, or hints.
241
274
 
242
275
  ```bash
243
276
  mcp-lint fix tools.json # fixed output to stdout
@@ -280,6 +313,8 @@ mcp-lint init --force # overwrite existing
280
313
  | Rule | Severity | Fixable | Description |
281
314
  |------|----------|---------|-------------|
282
315
  | `tool-name/client-safe` | 🔴 error, 🟡 warning | ❌ | Names must match `^[A-Za-z0-9_-]{1,64}$`. A leading digit is a warning because Gemini rejects it. |
316
+ | `tool-name/duplicate` | 🔴 error | ❌ | The same name appears twice in one tools list. |
317
+ | `tool-name/server-collision` | 🔴 error | ❌ | The same name is exposed by two servers during `check --installed` or `--from`. |
283
318
 
284
319
  OpenAI and Azure use that pattern. A space, slash, or dot makes the tool disappear. See `examples/names/unsafe.json`.
285
320
 
@@ -393,7 +428,8 @@ jobs:
393
428
  runs-on: ubuntu-latest
394
429
  steps:
395
430
  - uses: actions/checkout@v4
396
- - uses: robert19001-cmyk/mcp-lint@v0.8.0
431
+ - uses: robert19001-cmyk/mcp-lint@v1.0.0
432
+ # Tag v1.0.0. The action installs npm latest.
397
433
  with:
398
434
  input: tools.json
399
435
  severity: warning
@@ -411,6 +447,9 @@ jobs:
411
447
  | `clients` | all | Comma-separated client filter |
412
448
  | `fail_on` | `error` | Fail CI when issues at this severity found |
413
449
  | `score` | `false` | Show quality score |
450
+ | `sarif` | `false` | Upload SARIF when this `mcp-lint` release includes `report`. The workflow needs `security-events: write`. |
451
+
452
+ The action in this repository writes a `::error`, `::warning`, or `::notice` annotation from `check --format json`. With an empty `input` it also looks one directory down, skipping `node_modules` and dot directories. `sarif: true` uploads SARIF when the installed CLI has `report`. The action installs npm `latest`, which is 1.0.0. The workflow needs `security-events: write`.
414
453
 
415
454
  ### Manual workflow
416
455
 
@@ -631,23 +670,24 @@ $ mcp-lint recover examples/recover/bad-credential.json
631
670
 
632
671
  search#1
633
672
  ✖ Credential or permission error does not name a tool on this server. Say which tool to call, for example `login`, then retry.
634
- [recover/names-tool]
673
+ [recover/names-tool] permanent
635
674
  ✖ Next step asks for a terminal command, which an agent limited to MCP tools cannot do. Name a tool from this server instead.
636
- [recover/agent-reachable]
675
+ [recover/agent-reachable] permanent
637
676
 
638
677
  search#2
639
678
  ✖ Retry text does not name the call to repeat. Name `search` instead of "wait and retry".
640
- [recover/names-retry]
679
+ [recover/names-retry] transient
641
680
 
642
- 3 errors, 1 recoverable of 3
681
+ 3 errors, 1 recoverable of 3, 1 transient, 2 permanent
643
682
  ```
644
683
 
645
- Exit `1` when any sample has an error. Exit `0` when every failure is recoverable.
684
+ `rate_limit` and `timeout` count as transient. Every other kind counts as permanent. Exit `1` when any sample has an error. Exit `0` when every scored failure is recoverable.
646
685
 
647
- Probe a live server. Tools with no required arguments are skipped, so an empty call cannot fire a real action.
686
+ A live probe lists tools and does not call them. Calling tools requires both `--sandbox` and `--invoke`. Tools with no required arguments are still skipped, so an empty call cannot fire a tool that declares no inputs.
648
687
 
649
688
  ```bash
650
689
  mcp-lint recover --server stdio -- node server.js
690
+ mcp-lint recover --server stdio --sandbox --invoke -- node server.js
651
691
  mcp-lint recover errors.json --hang-ms 8000 --format json
652
692
  ```
653
693
 
@@ -726,7 +766,7 @@ The repository includes `glama.json` and a production Dockerfile so MCP director
726
766
 
727
767
  ## Site
728
768
 
729
- The proof page is in `site/`. It runs the same recovery scorer as the CLI.
769
+ The proof page is in `site/`. Version 1.0.0. It runs the same recovery scorer, schema linter, and preflight function as the CLI.
730
770
 
731
771
  ```bash
732
772
  npm run site
@@ -0,0 +1,3 @@
1
+ import type { MCPAuditReport } from './report.js';
2
+ export declare function projectAuditReport(report: MCPAuditReport): string;
3
+ export declare function auditBaselineDiff(actual: string, expected: string): string | null;
@@ -0,0 +1,18 @@
1
+ const STABLE_TIME = '1970-01-01T00:00:00.000Z';
2
+ export function projectAuditReport(report) {
3
+ return JSON.stringify({ ...report, generatedAt: STABLE_TIME }, null, 2) + '\n';
4
+ }
5
+ export function auditBaselineDiff(actual, expected) {
6
+ if (actual === expected)
7
+ return null;
8
+ const actualLines = actual.split('\n');
9
+ const expectedLines = expected.split('\n');
10
+ const limit = Math.max(actualLines.length, expectedLines.length);
11
+ for (let index = 0; index < limit; index += 1) {
12
+ if (actualLines[index] !== expectedLines[index]) {
13
+ return `Audit baseline differs at line ${index + 1}. Pass --update-baseline to replace the snapshot.`;
14
+ }
15
+ }
16
+ return 'Audit baseline differs. Pass --update-baseline to replace the snapshot.';
17
+ }
18
+ //# sourceMappingURL=baseline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/audit/baseline.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAE/C,MAAM,UAAU,kBAAkB,CAAC,MAAsB;IACvD,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,QAAgB;IAChE,IAAI,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjE,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC9C,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YAChD,OAAO,kCAAkC,KAAK,GAAG,CAAC,mDAAmD,CAAC;QACxG,CAAC;IACH,CAAC;IACD,OAAO,yEAAyE,CAAC;AACnF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { MCPAuditReport } from './report.js';
2
+ export declare const AUDIT_FORMATS: readonly ["terminal", "json", "markdown", "sarif", "html"];
3
+ export type AuditFormat = (typeof AUDIT_FORMATS)[number];
4
+ export declare function formatAuditReport(report: MCPAuditReport, format: string, noColor?: boolean): string;
5
+ export declare function escapeHtml(value: string): string;
@@ -0,0 +1,246 @@
1
+ import chalk from 'chalk';
2
+ export const AUDIT_FORMATS = ['terminal', 'json', 'markdown', 'sarif', 'html'];
3
+ const SITE = 'https://mcp-lint-alpha.vercel.app/';
4
+ export function formatAuditReport(report, format, noColor = false) {
5
+ switch (format) {
6
+ case 'json':
7
+ return JSON.stringify(report, null, 2) + '\n';
8
+ case 'markdown':
9
+ return formatMarkdownReport(report);
10
+ case 'terminal':
11
+ return formatTerminalReport(report, noColor);
12
+ case 'sarif':
13
+ return formatSarif(report);
14
+ case 'html':
15
+ return formatHtml(report);
16
+ default:
17
+ throw new Error(`Unknown format "${format}". Use ${AUDIT_FORMATS.join(', ')}.`);
18
+ }
19
+ }
20
+ export function escapeHtml(value) {
21
+ return value
22
+ .replace(/&/g, '&amp;')
23
+ .replace(/</g, '&lt;')
24
+ .replace(/>/g, '&gt;')
25
+ .replace(/"/g, '&quot;')
26
+ .replace(/'/g, '&#39;');
27
+ }
28
+ function findingRows(findings) {
29
+ return findings.map((finding) => {
30
+ const cells = [finding.severity, finding.toolName, finding.ruleId, finding.path, finding.message]
31
+ .map((cell) => cell.replace(/\|/g, '\\|').replace(/\n/g, ' '));
32
+ return `| ${cells.join(' | ')} |`;
33
+ }).join('\n');
34
+ }
35
+ function formatMarkdownReport(report) {
36
+ const counts = report.severity.status === 'ran'
37
+ ? `${report.severity.data.error} errors, ${report.severity.data.warning} warnings, ${report.severity.data.info} info`
38
+ : report.severity.reason;
39
+ const findings = report.findings.status === 'ran'
40
+ ? (report.findings.data.length === 0
41
+ ? 'No schema findings in this run.\n'
42
+ : [
43
+ '| Severity | Tool | Rule | Path | Message |',
44
+ '| --- | --- | --- | --- | --- |',
45
+ findingRows(report.findings.data),
46
+ '',
47
+ ].join('\n'))
48
+ : `${report.findings.reason}\n`;
49
+ const tokens = report.tokenBudget.status === 'ran'
50
+ ? [
51
+ `Approximate \`chars / 4\` estimate: **${report.tokenBudget.data.tokens}** tokens (${report.tokenBudget.data.chars} chars), level \`${report.tokenBudget.data.level}\`.`,
52
+ report.tokenBudget.data.note,
53
+ '',
54
+ ].join('\n')
55
+ : `${report.tokenBudget.status === 'partial' ? report.tokenBudget.reason : report.tokenBudget.reason}\n`;
56
+ const notRun = report.coverage.notRun.map((name) => `- ${name}`).join('\n');
57
+ const recommendations = report.recommendations.map((line) => `- ${line}`).join('\n');
58
+ return [
59
+ `# mcp-lint report`,
60
+ '',
61
+ `Source: \`${report.scope.source}\``,
62
+ `Generated: ${report.generatedAt}`,
63
+ `Tool: mcp-lint ${report.tool.version}`,
64
+ `Schema: ${report.schemaVersion}`,
65
+ '',
66
+ '## Summary',
67
+ '',
68
+ counts,
69
+ `Confidence: ${report.coverage.confidence}. A section marked not run is not a pass.`,
70
+ '',
71
+ '## Findings',
72
+ '',
73
+ findings.trimEnd(),
74
+ '',
75
+ '## Token estimate',
76
+ '',
77
+ tokens.trimEnd(),
78
+ '',
79
+ '## Not measured',
80
+ '',
81
+ notRun || '- none',
82
+ '',
83
+ '## Recommendations',
84
+ '',
85
+ recommendations || '- none',
86
+ '',
87
+ ].join('\n');
88
+ }
89
+ function formatTerminalReport(report, noColor) {
90
+ const tone = (severity, text) => {
91
+ if (noColor)
92
+ return text;
93
+ if (severity === 'error')
94
+ return chalk.red(text);
95
+ if (severity === 'warning')
96
+ return chalk.yellow(text);
97
+ return chalk.blue(text);
98
+ };
99
+ const lines = [
100
+ `${noColor ? '' : chalk.bold('')}mcp-lint report ${report.scope.source}`.trim(),
101
+ report.severity.status === 'ran'
102
+ ? `${report.severity.data.error} errors, ${report.severity.data.warning} warnings, ${report.severity.data.info} info`
103
+ : report.severity.reason,
104
+ ];
105
+ if (report.findings.status === 'ran') {
106
+ for (const finding of report.findings.data) {
107
+ lines.push(tone(finding.severity, `${finding.severity} ${finding.toolName} ${finding.message}`));
108
+ lines.push(` ${finding.path} [${finding.ruleId}]`);
109
+ }
110
+ if (report.findings.data.length === 0)
111
+ lines.push('No schema findings in this run.');
112
+ }
113
+ else {
114
+ lines.push(report.findings.reason);
115
+ }
116
+ if (report.tokenBudget.status === 'ran') {
117
+ lines.push(`Token estimate (chars/4, approximate): ${report.tokenBudget.data.tokens} level ${report.tokenBudget.data.level}`);
118
+ }
119
+ for (const line of report.recommendations)
120
+ lines.push(line);
121
+ lines.push(`Not measured: ${report.coverage.notRun.join(', ')}`);
122
+ return lines.join('\n') + '\n';
123
+ }
124
+ function formatSarif(report) {
125
+ const findings = report.findings.status === 'ran' ? report.findings.data : [];
126
+ const ruleIds = [...new Set(findings.map((finding) => finding.ruleId))].sort((a, b) => a.localeCompare(b));
127
+ const ruleIndex = new Map(ruleIds.map((id, index) => [id, index]));
128
+ const notifications = report.coverage.notRun.map((name) => ({
129
+ message: { text: `${name} did not run. An empty result is not a pass for that section.` },
130
+ level: 'note',
131
+ }));
132
+ const sarif = {
133
+ $schema: 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json',
134
+ version: '2.1.0',
135
+ runs: [
136
+ {
137
+ tool: {
138
+ driver: {
139
+ name: 'mcp-lint',
140
+ version: report.tool.version,
141
+ informationUri: SITE,
142
+ rules: ruleIds.map((id) => ({
143
+ id,
144
+ shortDescription: { text: id },
145
+ })),
146
+ },
147
+ },
148
+ invocations: [
149
+ {
150
+ executionSuccessful: true,
151
+ toolExecutionNotifications: notifications,
152
+ },
153
+ ],
154
+ results: findings.map((finding) => ({
155
+ ruleId: finding.ruleId,
156
+ ruleIndex: ruleIndex.get(finding.ruleId),
157
+ level: finding.severity === 'error' ? 'error' : finding.severity === 'warning' ? 'warning' : 'note',
158
+ message: { text: finding.message },
159
+ locations: [
160
+ {
161
+ physicalLocation: {
162
+ artifactLocation: { uri: encodeURI(report.scope.source) },
163
+ },
164
+ logicalLocations: [
165
+ {
166
+ name: finding.toolName,
167
+ fullyQualifiedName: `${finding.toolName}.${finding.path}`,
168
+ },
169
+ ],
170
+ },
171
+ ],
172
+ partialFingerprints: {
173
+ 'mcpLint/v1': `${finding.toolName}/${finding.ruleId}/${finding.path}`,
174
+ },
175
+ properties: {
176
+ clients: finding.clients,
177
+ fixable: finding.fixable,
178
+ },
179
+ })),
180
+ },
181
+ ],
182
+ };
183
+ return JSON.stringify(sarif, null, 2) + '\n';
184
+ }
185
+ function formatHtml(report) {
186
+ const findings = report.findings.status === 'ran'
187
+ ? (report.findings.data.length === 0
188
+ ? '<p>No schema findings in this run.</p>'
189
+ : `<table>
190
+ <thead><tr><th>Severity</th><th>Tool</th><th>Rule</th><th>Path</th><th>Message</th></tr></thead>
191
+ <tbody>
192
+ ${report.findings.data.map((finding) => `<tr>
193
+ <td>${escapeHtml(finding.severity)}</td>
194
+ <td>${escapeHtml(finding.toolName)}</td>
195
+ <td><code>${escapeHtml(finding.ruleId)}</code></td>
196
+ <td><code>${escapeHtml(finding.path)}</code></td>
197
+ <td>${escapeHtml(finding.message)}</td>
198
+ </tr>`).join('\n')}
199
+ </tbody>
200
+ </table>`)
201
+ : `<p>${escapeHtml(report.findings.reason)}</p>`;
202
+ const tokens = report.tokenBudget.status === 'ran'
203
+ ? `<p>Approximate chars/4 estimate: <strong>${report.tokenBudget.data.tokens}</strong> tokens, level ${escapeHtml(report.tokenBudget.data.level)}.</p><p>${escapeHtml(report.tokenBudget.data.note)}</p>`
204
+ : `<p>${escapeHtml(report.tokenBudget.reason)}</p>`;
205
+ const counts = report.severity.status === 'ran'
206
+ ? `${report.severity.data.error} errors, ${report.severity.data.warning} warnings, ${report.severity.data.info} info`
207
+ : report.severity.reason;
208
+ const notRun = report.coverage.notRun.map((name) => `<li>${escapeHtml(name)}</li>`).join('');
209
+ const recommendations = report.recommendations.map((line) => `<li>${escapeHtml(line)}</li>`).join('');
210
+ return `<!DOCTYPE html>
211
+ <html lang="en">
212
+ <head>
213
+ <meta charset="utf-8">
214
+ <meta name="viewport" content="width=device-width, initial-scale=1">
215
+ <title>mcp-lint report: ${escapeHtml(report.scope.source)}</title>
216
+ <style>
217
+ body { margin: 0; background: #f3efe4; color: #1c1916; font: 16px/1.5 ui-sans-serif, system-ui, sans-serif; }
218
+ main { max-width: 880px; margin: 0 auto; padding: 32px 20px 64px; }
219
+ h1 { font-size: 32px; line-height: 1.15; margin-bottom: 8px; }
220
+ h2 { font-size: 18px; margin-top: 32px; }
221
+ p, li { max-width: 68ch; }
222
+ table { width: 100%; border-collapse: collapse; }
223
+ th, td { text-align: left; vertical-align: top; border-bottom: 1px solid #d9d2c5; padding: 8px; }
224
+ code { font-family: ui-monospace, monospace; }
225
+ .meta { color: #5c564e; }
226
+ </style>
227
+ </head>
228
+ <body>
229
+ <main>
230
+ <p class="meta">mcp-lint ${escapeHtml(report.tool.version)} · schema ${report.schemaVersion} · ${escapeHtml(report.generatedAt)}</p>
231
+ <h1>${escapeHtml(report.scope.source)}</h1>
232
+ <p>${escapeHtml(counts)}. Confidence ${escapeHtml(report.coverage.confidence)}. A section that did not run is not a pass.</p>
233
+ <h2>Findings</h2>
234
+ ${findings}
235
+ <h2>Token estimate</h2>
236
+ ${tokens}
237
+ <h2>Not measured</h2>
238
+ <ul>${notRun}</ul>
239
+ <h2>Recommendations</h2>
240
+ <ul>${recommendations}</ul>
241
+ </main>
242
+ </body>
243
+ </html>
244
+ `;
245
+ }
246
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/audit/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAGxF,MAAM,IAAI,GAAG,oCAAoC,CAAC;AAElD,MAAM,UAAU,iBAAiB,CAC/B,MAAsB,EACtB,MAAc,EACd,OAAO,GAAG,KAAK;IAEf,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;QAChD,KAAK,UAAU;YACb,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,UAAU;YACb,OAAO,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,KAAK,OAAO;YACV,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,MAAM;YACT,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B;YACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,UAAU,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpF,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAA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QACrH,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC3B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7F,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtG,OAAO;;;;;0BAKiB,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;2BAe9B,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,MAAM,CAAC,aAAa,MAAM,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC;MACzH,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;KAChC,UAAU,CAAC,MAAM,CAAC,gBAAgB,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;;EAE3E,QAAQ;;EAER,MAAM;;MAEF,MAAM;;MAEN,eAAe;;;;CAIpB,CAAC;AACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { AUDIT_REPORT_SCHEMA_VERSION, QUALITY_ALGORITHM, AuditInputError, AuditReportSchema, buildAuditReport, parseAuditReport, } from './report.js';
2
+ export type { AuditFinding, AuditTool, BuildAuditReportInput, MCPAuditReport, QualitySectionData, Section, SectionStatus, SeverityCounts, } from './report.js';
3
+ export { AUDIT_FORMATS, escapeHtml, formatAuditReport } from './format.js';
4
+ export { auditBaselineDiff, projectAuditReport } from './baseline.js';
5
+ export type { AuditFormat } from './format.js';
6
+ export { DEFAULT_TOKEN_THRESHOLDS, TOKEN_ESTIMATE_METHOD, TokenEstimateError, assertThresholds, buildTokenBudget, compareTokenBudgets, estimateTokens, } from './tokens.js';
7
+ export type { RepeatedDescription, TokenBudget, TokenBudgetDiff, TokenEstimate, TokenThresholds, ToolTokenRank, } from './tokens.js';
@@ -0,0 +1,5 @@
1
+ export { AUDIT_REPORT_SCHEMA_VERSION, QUALITY_ALGORITHM, AuditInputError, AuditReportSchema, buildAuditReport, parseAuditReport, } from './report.js';
2
+ export { AUDIT_FORMATS, escapeHtml, formatAuditReport } from './format.js';
3
+ export { auditBaselineDiff, projectAuditReport } from './baseline.js';
4
+ export { DEFAULT_TOKEN_THRESHOLDS, TOKEN_ESTIMATE_METHOD, TokenEstimateError, assertThresholds, buildTokenBudget, compareTokenBudgets, estimateTokens, } from './tokens.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAWrB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,GACf,MAAM,aAAa,CAAC"}