@lintsure/mcp 0.3.18 → 0.3.20

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
@@ -1,6 +1,6 @@
1
1
  # @lintsure/mcp
2
2
 
3
- **Keep your AI coding agents on track.** Lintsure as an MCP server for Claude Code, Cursor, Codex, Devin Desktop (formerly Windsurf) and other MCP clients: the agent asks which checks apply before it writes code, and scans its own work before it says it is done. Runs on your machine over stdio, never writes files, never uploads your code.
3
+ **Keep your AI coding agents on track.** Lintsure as an MCP server for Claude Code, Grok Build, Codex, Devin Desktop (formerly Windsurf) and other MCP clients: the agent asks which checks apply before it writes code, and scans its own work before it says it is done. Runs on your machine over stdio, never writes files, never uploads your code.
4
4
 
5
5
  > **Lintsure is a readiness tool, not an audit, a certification or legal advice.** It tells your coding agent not to call you compliant, certified or ready, not to decide for you, and to ask before changing anything. A person makes the final call.
6
6
 
@@ -10,6 +10,6 @@ claude mcp add lintsure -- npx -y @lintsure/mcp
10
10
 
11
11
  Then ask your agent: *check this repo for security problems*.
12
12
 
13
- Tools: `scan`, `plan_checks`, `classify`, `explain_framework`, `explain_rule`. Setup for Cursor, Codex and Devin Desktop (formerly Windsurf): https://lintsure.com/docs/mcp
13
+ Tools: `scan`, `plan_checks`, `classify`, `explain_framework`, `explain_rule`. Setup for Grok Build, Codex and Devin Desktop (formerly Windsurf): https://lintsure.com/docs/mcp
14
14
 
15
15
  Source: https://github.com/lintsure/lintsure · Apache-2.0
package/dist/src/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- // Lintsure MCP server over stdio. Works with any MCP client (Claude Code, Cursor, Codex, Devin Desktop).
2
+ // Lintsure MCP server over stdio. Works with any MCP client (Claude Code, Grok Build, Codex, Devin Desktop).
3
3
  // Read-only: it never writes files. The Fixer's suggestions come back as text for your agent to apply.
4
4
  // Every response carries the disclaimer, and the server tells the calling agent how to talk about results.
5
5
  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, crossStandardLinks, verifyText } from "@lintsure/core";
10
- const server = new McpServer({ name: "lintsure", version: "0.3.18" }, { instructions: AGENT_GUIDANCE });
9
+ import { AGENT_GUIDANCE, APPROVAL_RULES, TRIAGE_GUIDE, ALL_FRAMEWORKS, DISCLAIMER, isHygiene, nextSteps, readConfig, scan, toMarkdown, QUESTIONS, classifyAnswer, explainFramework, explainRule, planAnswer } from "@lintsure/core";
10
+ const server = new McpServer({ name: "lintsure", version: "0.3.20" }, { 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,29 +56,7 @@ 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, 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
- 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("")}${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
- });
63
- // One list of questions: it describes the inputs and is what the agent asks when it has no answers yet.
64
- const QUESTIONS = {
65
- euUsers: "Do you have users or customers in the EU?",
66
- personalData: "Do you store or process data about people (names, emails, addresses, IP addresses)?",
67
- specialCategoryData: "Any sensitive data, such as health, biometrics, ethnicity, religion, politics, sexual orientation or union membership?",
68
- usesAI: "Does any feature use an AI model, including third-party ones like OpenAI or Gemini?",
69
- generativeAI: "Does the AI create text, images, audio or video that people see?",
70
- interactsWithPeople: "Do people talk or chat with the AI directly, for example a chatbot or voice assistant?",
71
- decisionArea: "Does the AI help decide something important about people? If so, which area (for example \"employment\" for screening job applicants, \"credit\" for loan scoring), otherwise \"none\".",
72
- b2bCustomers: "Do you sell to businesses, whose security teams may ask for SOC 2 or ISO 27001?",
73
- wantsCertification: "Do customers or partners ask for a security certificate or report, such as ISO 27001 or a SOC 2 report?",
74
- digitalProductEU: "Do you sell or supply software, an app or a connected device in the EU as a business?",
75
- mobileApp: "Do you have a mobile app (iOS, Android, React Native, Expo or Flutter)?",
76
- healthDataUS: "Do you handle health information for US patients, as a healthcare provider or for one (business associate)?",
77
- governmentCustomers: "Do you sell software to US government agencies or their suppliers?",
78
- euConsumers: "Do you sell to consumers in the EU, for example an online shop, banking, travel booking, e-books or a messaging service?",
79
- cardPayments: "Do you take card payments?",
80
- usMarket: "Do you sell in the United States?",
81
- };
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 }) => reply(explainRule(ruleId)));
82
60
  const yes = (k) => z.boolean().optional().describe(`${QUESTIONS[k]} True or false; leave out if unknown.`);
83
61
  server.tool("classify", "Suggest which compliance frameworks may apply to a product, with a short reason for each, from a few yes/no answers about it. Use when the user asks 'which rules apply to us?' or before a first scan. Call it with no answers to get the questions to ask the user; then call it again with what you know and leave the rest out. Returns a list of frameworks to confirm with the user before running scan. Suggestions only: the user decides, ideally with a compliance professional. Read-only.", {
84
62
  euUsers: yes("euUsers"),
@@ -98,37 +76,11 @@ server.tool("classify", "Suggest which compliance frameworks may apply to a prod
98
76
  euConsumers: yes("euConsumers"),
99
77
  cardPayments: yes("cardPayments"),
100
78
  usMarket: yes("usMarket"),
101
- }, RO, async (profile) => {
102
- // No answers yet: hand back the questions, so the agent asks the user instead of guessing.
103
- if (!Object.values(profile).some((v) => v !== undefined))
104
- return reply([
105
- "Ask the user these questions, then call classify again with their answers (leave out anything they don't know):",
106
- ...Object.entries(QUESTIONS).map(([k, q]) => `- ${k}: ${q}`),
107
- ].join("\n"));
108
- const s = classify(profile);
109
- return reply(s.length
110
- ? `These frameworks may apply, based on the answers given:\n${s.map((x) => `- ${x.name}: ${x.reason}`).join("\n")}\n\nThis is a suggestion, not a legal determination. Ask the user to confirm the list before running scan.`
111
- : "None of the available frameworks clearly apply from these answers. That is not a conclusion that no rules apply; ask the user, or a compliance professional, to confirm.");
112
- });
113
- server.tool("plan_checks", "Before writing a feature, list the Lintsure checks it is most likely to run into, with what each looks for and how to avoid it. Use when the user describes something to build ('add a file upload', 'a login page with Supabase', 'a chat with Claude'). Word matching, not a code review: it reads only the description. Returns text; read-only.", { feature: z.string().min(3).max(2000).describe("The feature in plain words, for example \"users upload a profile picture that we store in Supabase\".") }, RO, async ({ feature }) => {
114
- const found = checksFor(feature);
115
- if (!found.length)
116
- return reply("No Lintsure check matches this description. Run the scan tool after writing the code.");
117
- return reply([`Checks this feature is likely to meet (${found.length}), best match first. Build it so these don't fire:`, "",
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
- });
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
- const k = getKnowledge(framework);
122
- if (!k)
123
- return { isError: true, content: [{ type: "text", text: `Unknown framework: ${framework}. Known: ${ALL_FRAMEWORKS.join(", ")}.` }] };
124
- const today = new Date().toISOString().slice(0, 10);
125
- return reply([
126
- `# ${k.name}`, k.summary, "", `Applies to: ${k.whoItAppliesTo}`,
127
- ...(k.timeline ? ["", "Key dates:", ...k.timeline.map((m) => `- ${m.date} (${m.date <= today ? "already applies" : "upcoming"}): ${m.what}`)] : []),
128
- "", "What it asks:", ...k.obligations.map((o) => `- ${o.ref} ${o.title} [${o.inCode === "yes" ? "checked in code" : o.inCode === "partly" ? "partly in code" : "outside code"}]: ${o.plain}`),
129
- "", "Watch out:", ...k.watchOut.map((w) => `- ${w}`),
130
- "", `Summary in our own words, checked on ${k.checkedOn}. Read the official text for anything you rely on.`,
131
- ].join("\n"));
79
+ }, RO, async (profile) => reply(classifyAnswer(profile)));
80
+ server.tool("plan_checks", "Before writing a feature, list the Lintsure checks it is most likely to run into, with what each looks for and how to avoid it. Use when the user describes something to build ('add a file upload', 'a login page with Supabase', 'a chat with Claude'). Word matching, not a code review: it reads only the description. Returns text; read-only.", { feature: z.string().min(3).max(2000).describe("The feature in plain words, for example \"users upload a profile picture that we store in Supabase\".") }, RO, async ({ feature }) => reply(planAnswer(feature)));
81
+ 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\", \"owasp-agentic\" (AI agents) or \"cwe-top25\". Rule packs installed with Lintsure add more.") }, RO, async ({ framework }) => {
82
+ const text = explainFramework(framework);
83
+ return text ? reply(text) : { isError: true, content: [{ type: "text", text: `Unknown framework: ${framework}. Known: ${ALL_FRAMEWORKS.join(", ")}.` }] };
132
84
  });
133
85
  // The triage method as an MCP prompt, so every client gets it without installing anything
134
86
  // (in Claude Code it shows as /mcp__lintsure__triage). Same text as skills/lintsure-triage/SKILL.md.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@lintsure/mcp",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "mcpName": "io.github.lintsure/lintsure",
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.",
5
+ "description": "Lintsure MCP server: lets Claude Code, Grok Build, 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",
7
7
  "type": "module",
8
8
  "bin": {
@@ -14,7 +14,7 @@
14
14
  "LICENSE"
15
15
  ],
16
16
  "dependencies": {
17
- "@lintsure/core": "0.3.18",
17
+ "@lintsure/core": "0.3.20",
18
18
  "@modelcontextprotocol/sdk": "^1.12.0",
19
19
  "zod": "^4.6.7"
20
20
  },
@@ -40,7 +40,7 @@
40
40
  "model-context-protocol",
41
41
  "ai-agents",
42
42
  "claude-code",
43
- "cursor",
43
+ "grok-build",
44
44
  "codex",
45
45
  "guardrails",
46
46
  "security",