@lintsure/mcp 0.3.15 → 0.3.16

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/dist/src/index.js CHANGED
@@ -6,8 +6,8 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { resolve } from "node:path";
8
8
  import { z } from "zod";
9
- import { AGENT_GUIDANCE, APPROVAL_RULES, TRIAGE_GUIDE, ALL_FRAMEWORKS, DISCLAIMER, checksFor, classify, getKnowledge, isHygiene, nextSteps, readConfig, rules, scan, toMarkdown } from "@lintsure/core";
10
- const server = new McpServer({ name: "lintsure", version: "0.3.15" }, { instructions: AGENT_GUIDANCE });
9
+ import { AGENT_GUIDANCE, APPROVAL_RULES, TRIAGE_GUIDE, ALL_FRAMEWORKS, DISCLAIMER, checksFor, classify, getKnowledge, isHygiene, nextSteps, readConfig, rules, scan, toMarkdown, crossStandardLinks, verifyText } from "@lintsure/core";
10
+ const server = new McpServer({ name: "lintsure", version: "0.3.16" }, { instructions: AGENT_GUIDANCE });
11
11
  // Every tool only reads. Clients can show this; none of them may treat a Lintsure tool as making changes.
12
12
  const RO = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
13
13
  // Checked in the handler, not a startup enum, so frameworks from a repo's rule packs are accepted too.
@@ -56,9 +56,9 @@ server.tool("scan", "Scan a repository's source code for compliance and security
56
56
  "", `${APPROVAL_RULES}\n\nAsk the user which finding to work on first. Call explain_rule for detail on a rule, or format "full" for the complete report.`,
57
57
  ].join("\n"));
58
58
  });
59
- server.tool("explain_rule", "Explain one Lintsure rule in plain words: what it looks for, which framework controls it relates to (for example GDPR Art. 32 or OWASP A05), why it matters and how to fix it. Use after scan, when the user asks about a finding ('what does pii.logged mean?', 'why is this a problem?'). Returns text; read-only.", { ruleId: z.string().describe("The rule id shown on a scan finding. Examples: \"pii.logged\" (personal data in logs), \"secret.in-source\", \"supabase.rls-disabled\". The full list is at lintsure.com/rules.") }, RO, async ({ ruleId }) => {
59
+ server.tool("explain_rule", "Explain one Lintsure rule in plain words: what it looks for, which framework controls it relates to (for example GDPR Art. 32 or OWASP A05), why it matters, how to fix it, and what to check before calling a finding real. Use after scan, when the user asks about a finding ('what does pii.logged mean?', 'why is this a problem?'). Returns text; read-only.", { ruleId: z.string().describe("The rule id shown on a scan finding. Examples: \"pii.logged\" (personal data in logs), \"secret.in-source\", \"supabase.rls-disabled\". The full list is at lintsure.com/rules.") }, RO, async ({ ruleId }) => {
60
60
  const r = rules.find((x) => x.id === ruleId);
61
- return reply(r ? `${r.title}\nControls: ${r.controls.map((c) => `${c.framework} ${c.id}`).join(", ")}\nSuggested fix: ${r.fix}\nNote: ${r.note}${(r.seenIn ?? []).map((s) => `\nSeen in a real incident: ${s.title} (${s.url})`).join("")}\n\n${APPROVAL_RULES}` : `No rule named ${ruleId}. Rule ids look like "pii.logged"; see lintsure.com/rules.`);
61
+ return reply(r ? `${r.title}\nControls: ${r.controls.map((c) => `${c.framework} ${c.id}`).join(", ")}\nSuggested fix: ${r.fix}\nNote: ${r.note}${(r.seenIn ?? []).map((s) => `\nSeen in a real incident: ${s.title} (${s.url})`).join("")}${crossStandardLinks(r).length ? `\nThe same weakness in other standards: ${crossStandardLinks(r).join(" ")}` : ""}\n\n${verifyText(r.id)}\n\n${APPROVAL_RULES}` : `No rule named ${ruleId}. Rule ids look like "pii.logged"; see lintsure.com/rules.`);
62
62
  });
63
63
  // One list of questions: it describes the inputs and is what the agent asks when it has no answers yet.
64
64
  const QUESTIONS = {
@@ -117,7 +117,7 @@ server.tool("plan_checks", "Before writing a feature, list the Lintsure checks i
117
117
  return reply([`Checks this feature is likely to meet (${found.length}), best match first. Build it so these don't fire:`, "",
118
118
  ...found.map((r) => `- ${r.id}: ${r.title}. Avoid it: ${r.fix}`), "", "Run the scan tool when the code is written. These are hints from the description, not findings."].join("\n"));
119
119
  });
120
- server.tool("explain_framework", "Explain a compliance framework in plain words: what it is, who it applies to, key dates (marked as already applying or upcoming), what it asks for, which parts Lintsure can check in code and which need work outside code. Use when the user asks 'what is the EU AI Act?', 'does the Cyber Resilience Act apply to us?', 'when does it apply?' or 'what does SOC 2 need from our code?', often before a scan. Returns text; read-only.", { framework: z.string().describe("Which framework to explain: \"eu-ai-act\", \"gdpr\", \"owasp-top10\", \"cra\" (EU Cyber Resilience Act), \"owasp-llm\" or \"cwe-top25\". Rule packs installed with Lintsure add more.") }, RO, async ({ framework }) => {
120
+ server.tool("explain_framework", "Explain a compliance framework in plain words: what it is, who it applies to, key dates (marked as already applying or upcoming), what it asks for, which parts Lintsure can check in code and which need work outside code. Use when the user asks 'what is the EU AI Act?', 'does the Cyber Resilience Act apply to us?', 'when does it apply?' or 'what does SOC 2 need from our code?', often before a scan. Returns text; read-only.", { framework: z.string().describe("Which framework to explain: \"eu-ai-act\", \"gdpr\", \"owasp-top10\", \"cra\" (EU Cyber Resilience Act), \"owasp-llm\", \"owasp-ast\" (agent skills), \"owasp-api\" or \"cwe-top25\". Rule packs installed with Lintsure add more.") }, RO, async ({ framework }) => {
121
121
  const k = getKnowledge(framework);
122
122
  if (!k)
123
123
  return { isError: true, content: [{ type: "text", text: `Unknown framework: ${framework}. Known: ${ALL_FRAMEWORKS.join(", ")}.` }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lintsure/mcp",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "mcpName": "io.github.lintsure/lintsure",
5
5
  "description": "Lintsure MCP server: lets Claude Code, Cursor, Codex and other agents check their own code before they say they are done. Runs locally. Not an audit or legal advice.",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "LICENSE"
15
15
  ],
16
16
  "dependencies": {
17
- "@lintsure/core": "0.3.15",
17
+ "@lintsure/core": "0.3.16",
18
18
  "@modelcontextprotocol/sdk": "^1.12.0",
19
19
  "zod": "^4.6.7"
20
20
  },