mcp-server-autocad-lisp-helper
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-helperCheck 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.
mcp-name: io.github.radwanalmsora/mcp-server-autocad-lisp-helper
📐 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.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations at all, the description carries the full behavioral burden. It usefully discloses that results include exact line and column numbers, and the wording "structural syntax errors" suggests a structural rather than semantic parse, but it never states whether the operation is non-mutating, whether analysis stops at the first error or reports all of them, or any size limits on input.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that front-loads the action and then lists the checks in a compact, scannable series. No filler or restatement of the tool name beyond what is needed to define scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter validator with an output schema present, the description supplies what matters: the language dialect, the defect classes checked, and the form of the results (line and column). Return-value structure is already covered by the output schema, so nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the single parameter "code" has no documented type or format detail in the schema, but the description's phrase "AutoLISP code" effectively identifies what must be supplied. It adds no further detail such as whether the code should be a full file, a fragment, or whether encoding matters, so it only partially compensates for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb ("Checks") tied to a specific resource ("AutoLISP code") and enumerates the exact defect classes it detects: balanced parentheses, quotation marks, comments, and structural syntax errors. It does not explicitly contrast itself with extract_lisp_functions or check_missing_cleanups, though the verb-and-resource phrasing makes the distinction fairly evident.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use statement, no prerequisites, and no named alternative. Usage is only implied: a validator is naturally invoked before deeper analysis or cleanup checks, and the AutoLISP scoping hints at that context. An agent must infer the workflow position rather than being told it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_missing_cleanupsB
Identifies unhandled local variables (assigned via setq but not declared after '/') and unmodified system variables to prevent AutoCAD state leakage.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the full behavioral burden. "Identifies" implies a read-only analysis that reports findings rather than rewriting code, and the stated goal (preventing AutoCAD state leakage) gives the agent the purpose behind the check. However, it never states whether the tool mutates or returns suggestions, nor any limits on scope such as whole files versus fragments.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence with the target findings front-loaded and the motivating outcome at the end; nothing is padding. The parenthetical qualification is slightly awkward to parse but necessary to define the defect precisely.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description need not explain return values, and the detection targets are clearly specified. What is missing is the input contract — the format and expected shape of the code argument — which is the main gap for an agent trying to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is a single required parameter, "code", with 0% schema description coverage, so the schema contributes no meaning. The description never references the input at all — it does not say that "code" is the AutoLISP source text to be checked, nor whether it accepts a full file or a snippet. For a one-parameter tool at zero coverage, this leaves the agent to guess.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb ("Identifies") and two concrete defect classes: local variables assigned via setq but not declared after '/', and unmodified system variables. This is far more specific than the tool name alone and lets an agent distinguish it from analyze_lisp_syntax or extract_lisp_functions by the defect type it targets. It stops short of explicitly contrasting itself with those siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The trailing rationale ("to prevent AutoCAD state leakage") implies the tool is a pre-finalization lint check on AutoLISP code, but there is no explicit statement of when to call it versus analyze_lisp_syntax or extract_lisp_functions, and no stated exclusions or prerequisites. Usage is inferable rather than instructed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_lisp_functionsA
Extracts function definitions (defun C:...), argument lists, and localized variables from AutoLISP code.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the full disclosure burden. The word 'extracts' plus the output schema make the read-only nature and return shape reasonably evident, but it says nothing about behavior on malformed or partial code, whether partial matches are returned, or how nested/quoted defuns are handled.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler; the parenthetical example pattern is the most information-dense element and arrives immediately. Nothing is repeated from the title or schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return-value explanation is not required, and for a one-parameter extraction tool the description covers the core scope. The remaining gap is behavioral edge cases on invalid input, which is minor given the tool's low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for the single 'code' parameter, so the schema only supplies a name and type. The description partially compensates by establishing that the input is AutoLISP source code, but it says nothing about formatting expectations, size limits, or whether the code must be a complete file versus a snippet.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (extracts) and a specific set of resources (function definitions, argument lists, localized variables) from AutoLISP code, with the '(defun C:...)' pattern making the target concrete. It does not compare itself to siblings like analyze_lisp_syntax or check_missing_cleanups, so the agent must infer the boundary from tool names alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is for pulling function signatures and local variables out of LISP source, and that syntax analysis or cleanup checking belong to the siblings. There is no explicit when-to-use or when-not-to-use statement, and no stated prerequisites or input constraints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.1- First observed
analyze_lisp_syntax - First observed
check_missing_cleanups - First observed
extract_lisp_functions
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