Lint MCP tool schemas for cross-client compatibility and agent preflight safety.
io.github.robert19001-cmyk/mcp-lint MCP Server
The io.github.robert19001-cmyk/mcp-lint server lints MCP tool schemas to support cross-client compatibility and agent preflight safety. It is described as a developer-tool focused on checking JSON-schema-related MCP definitions, with topics spanning linting, guardrails, and policy-as-code.
π οΈ Key Features
Lint MCP tool schemas
Cross-client compatibility checks
Agent preflight safety validation
JSON-schemaβoriented linting
π Use Cases
Validate MCP tool schema definitions before use
Reduce agent startup failures by running preflight checks
Align MCP tool schemas across clients and environments
β‘ Developer Benefits
Improved schema consistency for MCP servers
Earlier detection of schema issues via linting
References topics for JSON schema, TypeScript, and Node.js workflows
β οΈ Limitations
Scope described only as βlint MCP tool schemasβ; no additional runtime tools are stated
Lint MCP server tool schemas for cross-client compatibility.
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.
code
$ npx mcp-lint check tools.json
search-tool
β Schema node at "inputSchema.properties.query" has `required: false` which is not valid JSON Schema.
inputSchema.properties.query [no-required-false]
β Parameter "limit" in tool "search-tool" is missing a description.
inputSchema.properties.limit [description-exists]
1 error, 1 warning
Installation
bash
# One-time use (no install)
npx mcp-lint check tools.json
# Global
npm install -g mcp-lint
# Per-project dev dependency
npm install --save-dev mcp-lint
Quick Start
bash
# Check a JSON or YAML file
mcp-lint check tools.json
# See compatibility across all clients at a glance
mcp-lint compat tools.json
# Learn what a rule does
mcp-lint explain openai/no-additional-properties
# Auto-fix what can be fixed
mcp-lint fix tools.json --in-place
# Generate a config file
mcp-lint init
# Run as an MCP server
mcp-lint-server
Exit codes:0 = no new errors introduced, 1 = new errors found, 2 = error
mcp-lint fix [input]
Auto-fixes issues that are safe to fix automatically (no semantic changes).
bash
mcp-lint fix tools.json # fixed output to stdout
mcp-lint fix tools.json --output fixed-tools.json # write to file
mcp-lint fix tools.json --in-place # overwrite original
mcp-lint fix tools.json --dry-run # show what would be fixed
mcp-lint fix tools.json --rules no-required-false,no-empty-enum # specific rules only
mcp-lint init
Creates a default .mcplintrc.json in the current directory.
jobs:lint:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v4-uses:actions/setup-node@v4with: { node-version:20 }
# Fail the build on errors-run:npxmcp-lintcheck./src/tools.json# Post compatibility matrix to PR summary-run:npxmcp-lintcompat./src/tools.json--formatmarkdown>>$GITHUB_STEP_SUMMARYif:always()# Diff against previous version-run:npxmcp-lintdifftools-before.jsontools-after.json--formatmarkdown>>$GITHUB_STEP_SUMMARYif:always()
Lint catches bad schemas. Preflight catches bad actions.
At runtime, your agent is about to call a tool β delete a file, send a request, charge a card. Preflight sits between the agent and the action and answers:
List built-in rules, clients, severities, and fixability
mcp_lint_explain_rule
Explain one rule with examples and auto-fix notes
mcp_lint_check_tools
Lint MCP tool schemas passed as JSON
mcp_lint_fix_tools
Return safely auto-fixed tool schemas without writing files
mcp_lint_preflight_action
Score a proposed agent action and return allow/deny/approval/rewrite
All server tools are read-only from the host perspective: they return diagnostics, fixed JSON, or policy decisions and never execute the action being evaluated.
Docker
bash
docker build -t mcp-lint-server .
docker run --rm -i mcp-lint-server
The repository includes glama.json and a production Dockerfile so MCP directories can build, start, and introspect the server.