{"id":25927,"library":"mcp-lint","title":"mcp-lint","description":"Lint MCP server tool schemas for cross-client compatibility across Claude, Cursor, Gemini, VS Code Copilot, Windsurf, Cline, OpenAI Agents SDK, and Continue.dev. Current stable version: 0.4.0 (MIT). mcp-lint provides static analysis and runtime preflight checks to catch JSON Schema quirks and client-specific incompatibilities before deployment. Ships TypeScript types and supports JSON/YAML input, auto-fix, compatibility matrix output, and rule explainability. Requires Node >=20. Key differentiator: unlike generic JSON Schema validators, mcp-lint is aware of each MCP client's unique schema expectations and known limitations.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","mcp","model-context-protocol","lint","schema","validation","preflight","agent-safety","policy","typescript"],"install":[{"cmd":"npm install mcp-lint","lang":"bash","label":"npm"},{"cmd":"yarn add mcp-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add mcp-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package. The package exposes named exports, not a default export.","wrong":"import mcpLint from 'mcp-lint'","symbol":"mcp-lint","correct":"import { lint } from 'mcp-lint'"},{"note":"Package is ESM-only and cannot be used with require() in Node <20 or without ESM configuration.","wrong":"const { check } = require('mcp-lint')","symbol":"check","correct":"import { check } from 'mcp-lint'"},{"note":"Used to fetch rule documentation programmatically.","wrong":null,"symbol":"explain","correct":"import { explain } from 'mcp-lint'"}],"quickstart":{"code":"import { check } from 'mcp-lint';\nimport { readFileSync } from 'fs';\n\nconst fileContents = readFileSync('tools.json', 'utf-8');\nconst tools = JSON.parse(fileContents);\n\nconst results = await check(tools, {\n  clients: ['claude', 'cursor', 'openai'],\n  severity: 'error'\n});\n\nfor (const result of results) {\n  console.log(`${result.tool}: ${result.severity} - ${result.message}`);\n}","lang":"typescript","description":"Shows how to programmatically lint an MCP server tool schema file with mcp-lint, filtering by clients and severity."},"warnings":[{"fix":"Upgrade to Node.js 20 or later.","message":"Node.js >=20 is required; older versions will throw a syntax error due to ESM-only distribution.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use import syntax and ensure your project is configured for ESM (e.g., type: 'module' in package.json).","message":"ESM-only release: CommonJS require() does not work. Using require('mcp-lint') will fail.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Ensure your tool schemas use the exact property name `inputSchema` as per the MCP specification.","message":"The `inputSchema` property name is case-sensitive. Some clients expect `inputSchema` while others accept `parameters`. mcp-lint defaults to the MCP spec's `inputSchema`.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to dynamic import() or use import statement after adding \"type\": \"module\" to package.json.","cause":"Attempting to use mcp-lint with CommonJS require() on an ESM-only package.","error":"ERR_REQUIRE_ESM: require() of ES Module not supported"},{"fix":"Upgrade Node.js to version 20 or later.","cause":"Running mcp-lint on a Node.js version below 20 that does not support modern JavaScript syntax.","error":"SyntaxError: Unexpected token '??='"},{"fix":"Run `npx mcp-lint@latest check tools.json` or install locally with `npm install mcp-lint`.","cause":"Package not installed or not in node_modules when running via npx without install.","error":"Error: Cannot find module 'mcp-lint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}