Skip to main content
Glama
OmniZenRaj

dxf-mcp

by OmniZenRaj

dxf-mcp

An MCP server that gives an agent structured, read-only access to DXF drawings.

Most CAD automation exists to answer three questions, and shops still answer them by hand: what is in this drawing, what parts does it place, and does it follow our standards. This exposes those as tools, so a model can ask instead of a person opening the file.

Nothing here writes a drawing. The server reads.

Tools

Tool

What it does

list_drawings

DXF files under a directory, relative to the configured root

drawing_summary

DXF version, units, layer and block counts, entity mix

list_layers

Every layer with colour, linetype, on/locked state, entity count

extract_bill_of_materials

Block insertions and their attributes, flattened into rows

check_standards

Required layers, forbidden layers, expected units, empty layers

find_text

Case-insensitive search across TEXT, MTEXT and block attributes

extract_bill_of_materials is the one worth explaining. A block insertion with attributes is how a drawing records a placed component: PARTNO, QTY, MATERIAL. Turning those into one row per component with attribute tags as columns is the step between a drawing and an ERP or PLM record, and it is normally either a bespoke LISP routine per shop or a person retyping.

Related MCP server: autocad-mcp

Install

git clone https://github.com/OmniZenRaj/dxf-mcp
cd dxf-mcp
python3 -m venv .venv && .venv/bin/pip install -e .

Configure

Point DXF_MCP_ROOT at the directory holding your drawings. Claude Desktop, in claude_desktop_config.json:

{
  "mcpServers": {
    "dxf": {
      "command": "/absolute/path/to/dxf-mcp/.venv/bin/dxf-mcp",
      "env": { "DXF_MCP_ROOT": "/absolute/path/to/your/drawings" }
    }
  }
}

VS Code, in .vscode/mcp.json:

{
  "servers": {
    "dxf": {
      "type": "stdio",
      "command": "/absolute/path/to/dxf-mcp/.venv/bin/dxf-mcp",
      "env": { "DXF_MCP_ROOT": "/absolute/path/to/your/drawings" }
    }
  }
}

The root is the security boundary

An MCP server hands file access to a model, which means the model chooses what to open. DXF_MCP_ROOT is the only thing standing between that and the rest of the disk, so it is enforced in one place and tested directly.

Paths are resolved before the containment check, so ../../etc/passwd and a symlink pointing outside the root are both refused rather than followed. Relative paths are taken as relative to the root, not to the process working directory, because that is what a caller means. If DXF_MCP_ROOT is unset the root is the working directory, which keeps the server runnable without configuration while still confining it somewhere deliberate.

Example

> Which drawings under ./assemblies are missing a DIMENSIONS layer?

  list_drawings("assemblies")
  check_standards(path, required_layers=["DIMENSIONS"])   # per drawing

> Give me a parts list for assembly.dxf

  extract_bill_of_materials("assembly.dxf")
  -> 2 rows, columns MATERIAL / PARTNO / QTY
     PART  CCI-1042  qty 4  Oak    (layer FRAME)
     PART  CCI-2088  qty 1  Steel  (layer PANEL)

Tests

.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest                        # 16 unit tests
.venv/bin/python scripts/smoke_test.py  # real stdio JSON-RPC against the built server

Fixtures build a real DXF document with ezdxf rather than checking in a binary, so the test drawing is readable as code and easy to extend.

The unit tests cover the DXF and path logic directly. The smoke test drives the installed executable over stdio -- initialize, tools/list, a real extract_bill_of_materials call, and a path-traversal attempt that must come back isError -- because the MCP wiring is the part unit tests cannot see.

The confinement tests were checked by breaking the code on purpose: deleting the containment condition fails three of them, and resolving the path after the check rather than before fails the traversal and symlink cases. A test that never fails is not evidence.

Limitations

Reads DXF, not DWG. DWG is a closed format; converting with ODA File Converter or dwg2dxf first is the usual route.

Bills of material come from block attributes. A drawing that records parts as loose text rather than attributed blocks will produce no rows, which is correct behaviour and not a bug, though find_text will still locate the text.

Licence

MIT.

Available Tools

6 tools
check_standardsA

Check a drawing against drafting standards.

Reports missing required layers, forbidden layers and wrong units as errors, and empty layers as warnings. passed reflects errors only, so a drawing with warnings still passes.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
require_unitsNo
required_layersNo
forbidden_layersNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
passedYes
findingsYes

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden and delivers substantial value: it discloses the error/warning classification (missing/forbidden layers and wrong units as errors, empty layers as warnings) and the non-obvious `passed` semantics — warnings do not fail the check. This is exactly the behavioral context an agent could not infer from the schema.

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?

Two compact paragraphs with zero filler. The headline capability is front-loaded in the first sentence, and the critical `passed` behavior gets its own dedicated sentence. Every sentence earns its place.

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?

Since an output schema exists, the description need not document return values — and it still adds value by explaining the `passed` field's meaning. The check logic is thoroughly covered. The remaining gaps are minor: the unspecified semantics of `path` and the absence of an explicit read-only guarantee for this check operation.

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%, so the description must compensate for missing parameter docs. It implicitly maps three parameters to their checks (required_layers → missing layer errors, forbidden_layers → forbidden layer errors, require_units → wrong units), which adds meaning. However, the single required parameter `path` is never clarified — an agent cannot tell whether it expects a file path, drawing ID, or directory.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource: 'Check a drawing against drafting standards.' The validation purpose is unmistakable and naturally distinguishes it from the sibling query tools (list_drawings, find_text, drawing_summary, list_layers), none of which perform standards validation.

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 usage context is clear by implication — an agent can infer this tool is for validating drawings against standards — but there is no explicit statement of when to use it versus alternatives, nor any exclusions. No sibling is named as a better fit for related scenarios (e.g., drawing_summary for a general overview before checking standards).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

drawing_summaryA

Describe one drawing: DXF version, units, layer and block counts, entity mix.

Call this first. It is cheap, and it tells you which of the other tools is worth calling on this file.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
unitsYes
dxf_versionYes
layer_countYes
entity_countYes
entity_typesYes
layers_in_useYes
block_definition_countYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral disclosure burden. It signals non-mutating behavior through 'Describe,' adds the performance trait 'cheap,' and positions the tool as a safe first step. It does not explicitly state side effects or permissions, but for a read-only summary tool the behavioral hints are strong.

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?

The description is two short sentences with no filler. The first sentence front-loads what the tool does and what it returns; the second sentence delivers actionable usage guidance. Every word earns its place.

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?

Given the tool's simplicity, one required parameter, and an output schema that defines return values, the description is complete. It covers what the tool returns, when to call it, why it is the right first step, and how it relates to the other tools. Nothing important 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?

The schema provides only a 'path' parameter with no description, and schema description coverage is 0%. The description's phrase 'this file' implies the path refers to a drawing file, adding slight semantic clarity. However, it does not elaborate on path format or constraints, so it only partially compensates for the missing schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Describe one drawing') and identifies the exact information returned: DXF version, units, layer and block counts, and entity mix. It is easily distinguished from sibling tools like list_drawings or list_layers, since it targets a single drawing and provides an overview.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage guidance: 'Call this first.' It explains why ('It is cheap') and what to do with the result ('it tells you which of the other tools is worth calling on this file'). This directly orients the agent toward the correct workflow among the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_bill_of_materialsA

Extract a bill of materials from block insertions and their attributes.

Each placed block becomes a row and each attribute tag becomes a column, which is the shape drawing data has to be in before it can reach an ERP or a PLM record. Pass block to restrict the extract to one block name.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
blockNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
pathYes
rowsYes
row_countYes
attribute_columnsYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It usefully discloses the output mapping (each block becomes a row, each attribute becomes a column) and the block restriction behavior. But it does not explicitly state whether the tool is read-only, how blocks without attributes are treated, or what happens on missing/invalid paths.

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?

The description is three sentences with no fluff: a clear purpose, a valuable transformation detail, and a parameter tip. Every sentence contributes unique information, and the purpose is front-loaded.

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?

The tool is relatively simple (2 parameters, no nested objects), and an output schema exists, so return values do not need to be described. However, the missing explanation of the required 'path' parameter and the lack of explicit when-to-use guidance leave some gaps. Still, the core extraction behavior and output shape are well covered, making it adequate but not complete.

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?

Schema description coverage is 0%, so the description must compensate for both parameters. It clearly explains the optional 'block' parameter ('restrict the extract to one block name'), but the required 'path' parameter is not described at all. Even a basic statement about what path should point to would have lifted this toward a 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Extract') with a clear resource ('bill of materials from block insertions and their attributes'). The row/column transformation detail makes the tool's purpose concrete and distinguishes it from sibling tools like list_drawings, list_layers, or drawing_summary, even without naming them.

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 ERP/PLM sentence provides an implied use case for when this extraction is needed, and 'Pass block to restrict the extract to one block name' gives a parameter-level usage hint. However, there is no explicit statement of when to use this tool versus its siblings, nor any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

find_textA

Search TEXT, MTEXT and block attributes for a substring, case-insensitively.

Useful for locating a part number or a revision note when you do not yet know which block or layer it lives on.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
needleYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations available, the description carries the behavioral disclosure burden. It states the search is case-insensitive, operates on a substring, and covers TEXT, MTEXT, and block attributes, giving useful detail beyond the tool name. It does not mention all limitations, but the search semantics are reasonably transparent.

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?

The description is short, front-loaded with the core action and scope, and the second sentence adds a practical usage scenario. Every sentence earns its place with no redundant filler.

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?

The description is adequate for tool selection and general invocation, but it leaves a key required parameter, path, under-defined. Since there are only two parameters, missing clarity on one is a meaningful gap, even though an output schema likely covers return values.

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?

The schema provides zero descriptions for path and needle, and the description does not explicitly define either parameter. 'Needle' can be inferred as the substring, but 'path' is left ambiguous, so an agent may not know whether it expects a file path, drawing ID, or directory. The description does not compensate for the 0% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Search'), concrete resources (TEXT, MTEXT, block attributes), and the matching behavior (substring, case-insensitive). This clearly distinguishes it from sibling tools like list_layers or extract_bill_of_materials, which serve different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a clear use case: locating a part number or revision note when the block or layer is unknown. It does not explicitly name alternatives or give when-not-to-use guidance, but the scenario strongly implies when this tool is the right choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_drawingsA

List DXF files available under a directory, relative to the configured root.

ParametersJSON Schema
NameRequiredDescriptionDefault
directoryNo.
recursiveNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose one useful behavioral detail: paths are resolved relative to the configured root, and 'List' implies a read-only operation. It stops short of describing recursive behavior or what 'available' means, but the core behavior is transparent enough for a simple listing tool.

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?

The description is one short, front-loaded sentence that immediately states the action and target. Every word adds meaning, with no filler or repetition of schema names.

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?

The tool is simple: two optional parameters, an output schema for return values, and no annotations. The description plus schema tells an agent what the tool does, what inputs it takes, and the root-relative path rule; the output schema covers return-value details. A small gap is that recursive behavior is only implied rather than stated, so it is not a perfect 5.

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%, so the description must compensate. It clarifies the directory parameter by stating that it is relative to the configured root, which is not in the schema, but it adds no meaning for the recursive boolean beyond what the name and default already imply. This partial compensation is adequate but not thorough.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete verb ('List') and resource ('DXF files') plus the scope ('under a directory, relative to the configured root'). This clearly distinguishes it from siblings like list_layers, which operate on layers within a drawing, so an agent can tell what the tool is for.

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 usage context is implied: use this tool to enumerate DXF files in a directory, whereas siblings like list_layers and drawing_summary address different tasks. However, there is no explicit guidance on when not to use it or how to choose among alternatives, so the routing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_layersA

List every layer in a drawing with its colour, linetype, state and entity count.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioural disclosure. It clearly identifies this as a read-only listing operation that returns all layers and their attributes. It is brief but sufficient for a non-mutating list tool, although it does not mention edge cases such as empty drawings or drawing permissions.

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. Every part of the sentence adds information about the tool's scope and output.

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?

The tool is simple and an output schema exists, so return-value documentation is not required. However, the description does not fully specify the required path parameter, making it only barely complete for invocation; siblings like list_drawings could supply path context but that is not stated.

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?

The schema describes a single required string 'path' with 0% coverage, and the description does not explain what the path should be or how to supply it. The word 'drawing' hints at a file path, but the agent must infer the format and provenance of the path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'List' and a concrete resource ('every layer in a drawing'), enumerating the returned attributes (colour, linetype, state, entity count). This makes its purpose immediately distinct from sibling tools such as list_drawings or drawing_summary.

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 intended use is implied — call it when you need layer-level details for a drawing — but there is no explicit statement of when to choose it over alternatives, nor any exclusions or prerequisites such as first obtaining a path from list_drawings.

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. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedcheck_standards
    • First observeddrawing_summary
    • First observedextract_bill_of_materials
    • First observedfind_text
    • First observedlist_drawings
    • First observedlist_layers

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct purpose: listing files, searching text, summarizing drawings, listing layers, extracting BOMs, and checking standards. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_noun lowercase snake_case pattern (list_drawings, find_text, drawing_summary, etc.), making the naming predictable and clear.

Tool Count5/5

With 6 tools, the set is compact and focused on the domain of DXF file inspection and processing. Each tool earns its place without redundancy or bloat.

Completeness5/5

The tools cover the key workflows: discovering files, searching content, summarizing, inspecting layers, extracting BOM data, and validating standards. No obvious gaps for typical DXF operations.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides DXF parsing, entity extraction, geometry analysis, and optional AutoCAD COM automation for CAD tasks.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables automation of AutoCAD LT and headless DXF creation through two backends (File IPC for Windows AutoCAD LT and ezdxf for cross-platform) with tools for drawing, entity, layer, block, annotation, PID, view, and system operations.
    8
    7
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Opens, inspects, and renders DXF/CAD drawings for AI agents: describe_dxf returns structured facts (layers with actual drawn colors, units, bounds, text content) and render_dxf returns PNG images. On MCP Apps hosts like ChatGPT and Claude, view_dxf opens an interactive in-chat viewer with pan, zoom, and layer toggles.
    4
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    An MCP server for read-only inspection of AutoCAD DWG files, enabling AI agents to open drawings, query objects by handle or filter, and explore properties and references.
    9
    GPL 3.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OmniZenRaj/dxf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server