mcp-server-autocad-lisp-helper
Statically inspect, parse, and debug AutoCAD AutoLISP (.lsp) code locally with deterministic MCP tools.
analyze_lisp_syntax: check balanced parentheses, quotation marks, block comments, and structural syntax errors with exact line and column locations.extract_lisp_functions: extractdefunandc:command definitions, argument lists, and localized variables.check_missing_cleanups: detect unlocalizedsetqvariables and unpreservedsetvarsystem-variable changes to prevent AutoCAD state leakage.
Statically inspects, parses, and debugs AutoCAD AutoLISP (.lsp) files. Provides tools to audit syntax (balanced parentheses, quotes, block comments with exact line/column error locations), extract function definitions including c: commands with their arguments and localized variables, and detect state leakage such as unlocalized setq globals and setvar calls lacking getvar preservation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-autocad-lisp-helper Check DrawingUtils.lsp for syntax errors and unlocalized setq variables"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π AutoCAD AutoLISP Helper MCP Server
A high-precision, deterministic Model Context Protocol (MCP) server engineered in Python to statically inspect, parse, and debug AutoCAD AutoLISP (.lsp) files with 100% precision.
Quickstart β’ Tools Overview β’ Claude Desktop Setup β’ Architecture
π Highlights
π Zero Cloud Dependencies: 100% local, fast, and deterministic AST parsing with regex. No external APIs or telemetry.
π― Pinpoint Accuracy: Flags balanced parenthesis mismatches with exact line and column numbers.
π‘οΈ AutoCAD State Protection: Prevents global namespace contamination by detecting unlocalized
setqvariables.βοΈ System Variable Auditing: Detects AutoCAD system variable mutations (
setvar) lacking initial preservation (getvar).β‘ Zero-Install Ready: Run instantly in any MCP client via
uvx.
Related MCP server: py-ast-mcp
π οΈ Exposed MCP Tools
Tool | Purpose | Key Capabilities |
| Structural Syntax Audit | Validates balanced parentheses |
| AST Function Inspection | Extracts all |
| State Leakage Detection | Identifies global variable pollution caused by unlocalized |
β‘ Quickstart (Zero-Install)
No manual clone or installation required. Launch directly using uvx:
uvx mcp-server-autocad-lisp-helperAvailable Tools
3 toolsanalyze_lisp_syntaxA
Checks AutoLISP code for balanced parentheses, quotation marks, comments, and structural syntax errors with exact line and column numbers.
Inputs: code (required). Returns: result
check_missing_cleanupsB
Identifies unhandled local variables (assigned via setq but not declared after '/') and unmodified system variables to prevent AutoCAD state leakage.
Inputs: code (required). Returns: result
extract_lisp_functionsA
Extracts function definitions (defun C:...), argument lists, and localized variables from AutoLISP code.
Inputs: code (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
Each tool targets a clearly distinct analysis concern: structural syntax validation, function/variable extraction, and cleanup/state-leakage checking. Although all three operate on AutoLISP source statically, the descriptions draw sharp boundaries so an agent can select correctly with no overlap.
All three names follow a strict verb_noun snake_case pattern (analyze_..., extract_..., check_...). The convention is uniform and self-describing, with no mixed casing or verb styles.
Three focused tools is at the low end of the typical 3-15 range but each earns its place for a narrow lint-style helper. It is not bloated, though the surface feels slightly thin for a full AutoLISP assistance workflow.
The set covers the core static-analysis lifecycle for AutoLISP: syntax validation, symbol/function extraction, and cleanup-state auditing. Minor gaps exist around remediation (auto-fix/format) or deeper cross-reference/usage analysis, but agents can work around these.
Maintenance
Related MCP Connectors
Scan AI agent skills, MCP server packages and MCP configs before you install them. Static analysis.
Statically audits MCP tool surfaces for token cost, schema quality, and design issues.
SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.
Independent static checks for supported tag and alarm CSV import formats; no HMI or PLC access.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables deterministic static analysis of Python code, providing tools to inspect classes, functions, imports, dependencies, and more, without executing the code.1MIT
- AlicenseAqualityDmaintenanceProvides deep structural analysis of Python source code via AST, including function signatures, call graphs, cyclomatic complexity, code smells, dead code detection, and protocol conformance.20MIT
- FlicenseNot gradedqualityBmaintenanceMCP server for static code analysis using AST parsing and linters, providing tools to detect syntax errors, type issues, typos, and incorrect variable usage across multiple languages. It supports headless linting with tools like ast_check, lint_check, and health.-
- AlicenseNot gradedqualityDmaintenanceEnables local code inspection and analysis for clean code practices, best practices, and actionable recommendations without external API calls or modifying the code.82 npm1MIT