Registry / devops / ast-lint-mcp

ast-lint-mcp

JSON →
library0.1.0jsnpmunverified

AST Lint MCP Server (v0.1.0) is a Model Context Protocol server that exposes AST Lint's static code analysis capabilities to MCP clients like Claude Code. It provides 34 code quality rules covering security, maintainability, performance, accessibility, and Vue-specific issues. Runs locally with no remote server, supports persistent process (~50ms response), category/severity filtering, batch and git diff incremental analysis, and automatic AI integration. Differentiator: seamless integration with Claude Code via MCP, enabling natural language-driven code review. Requires Node.js >= 18.

npm install ast-lint-mcp
INSTALL
IMPORT
SIG · AST-LINT-MCP
A
ast-lint-mcp
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import astLintMcp from 'ast-lint-mcp'
const astLintMcp = require('ast-lint-mcp')
Package is ESM-only as of v0.1.0. No default export is documented; primarily used as a CLI/MCP server.
createServer
import { createServer } from 'ast-lint-mcp'
import { createMCPServer } from 'ast-lint-mcp'
Exact named export may differ; check package entry. MCP server creation function.
runLint
import { runLint } from 'ast-lint-mcp'
Undocumented API; internal linter function. Not typically imported directly.

MCP server configuration for Claude Code, enabling natural language-driven code analysis via AST Lint.

// MCP client configuration (e.g., in ~/.claude.json) // The server is started via npx; no programmatic import needed. { "mcpServers": { "ast-lint": { "type": "stdio", "command": "npx", "args": ["-y", "ast-lint-mcp"] } } } // In Claude Code, ask naturally: // "Check for security issues in src/" // "Analyze git diff for code quality problems"
mypy --version
Debug
Known issues
breakingRequires Node.js >= 18. Older versions not supported.
fix
Upgrade Node.js to v18 or later.
affects: >=0.1.0
deprecatedConfiguration via .astlintrc is preferred; older formats (.astlintrc, astlint.config.json) may be deprecated
fix
Use .astlintrc.json with version 0.6.0 schema.
affects: >=0.1.0
gotchaThe default export is not documented; most users run the package via CLI/MCP, not as a library.
fix
Use npx or global install as instructed; avoid importing directly.
affects: >=0.1.0
gotchaGit diff analysis may miss unstaged changes if files are not staged.
fix
Stage changes first (git add) before running diff analysis.
affects: >=0.1.0
gotchaConfiguration file search starts from current directory upwards; no cwd option available.
fix
Run npx from project root or set cwd in MCP config.
affects: >=0.1.0
Errors
Common errors & fixes
Command 'ast-lint-mcp' not found
Package not installed globally or npx not available.
fix
Run with npx: npx -y ast-lint-mcp, or install globally: npm install -g ast-lint-mcp
Cannot find module 'ast-lint-mcp'
Incorrect import path or missing dependency.
fix
Install locally: npm install ast-lint-mcp, then import from 'ast-lint-mcp'
Error: AstLint config not found
No .astlintrc.json present in project hierarchy.
fix
Create a .astlintrc.json file in the project root with a valid configuration (see README).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
1
Resources
ast-lint-mcp — npm install ast-lint-mcp · libregistry