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

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.

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

    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
    • 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.
      58 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local static analysis of AI deployment artifacts, producing SHA-256 hashes, serialized structure, defects, cautions, evidence gaps, and limitations without executing model code.
      Apache 2.0