Skip to main content
Glama
mcp-server-autocad-lisp-helper

mcp-server-autocad-lisp-helper

mcp-name: io.github.radwanalmsora/mcp-server-autocad-lisp-helper

📐 AutoCAD AutoLISP Helper MCP Server

PyPI - Version Python Version License: MIT MCP Compliant

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 setq variables.

  • ⚙️ 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

analyze_lisp_syntax

Structural Syntax Audit

Validates balanced parentheses ( ), quotes "...", and block comments ;| ... |;. Reports exact line and column offsets for syntax errors.

extract_lisp_functions

AST Function Inspection

Extracts all (defun ...) and AutoCAD commands (defun c:... ...). Accurately isolates arguments and localized variables declared after the /.

check_missing_cleanups

State Leakage Detection

Identifies global variable pollution caused by unlocalized setq assignments and flags unpreserved AutoCAD system variables (setvar).


⚡ Quickstart (Zero-Install)

No manual clone or installation required. Launch directly using uvx:

uvx mcp-server-autocad-lisp-helper

Available Tools

3 tools
analyze_lisp_syntaxA

Checks AutoLISP code for balanced parentheses, quotation marks, comments, and structural syntax errors with exact line and column numbers.

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness5/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

  1. 3 tool updatesv0.1.1
    • First observedanalyze_lisp_syntax
    • First observedcheck_missing_cleanups
    • First observedextract_lisp_functions

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables deterministic static analysis of Python code, providing tools to inspect classes, functions, imports, dependencies, and more, without executing the code.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides deep structural analysis of Python source code via AST, including function signatures, call graphs, cyclomatic complexity, code smells, dead code detection, and protocol conformance.
    20
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP 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.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables local code inspection and analysis for clean code practices, best practices, and actionable recommendations without external API calls or modifying the code.
    82 npm
    1
    MIT