Civil3d
FreeNot checkedMCP server that connects an LLM assistant to Autodesk Civil 3D via COM, enabling direct manipulation of surfaces, alignments, COGO points, layers, profiles, and
About
MCP server that connects an LLM assistant to Autodesk Civil 3D via COM, enabling direct manipulation of surfaces, alignments, COGO points, layers, profiles, and more through natural language.
README
English
MCP (Model Context Protocol) server that connects an LLM assistant (Claude)
to Autodesk Civil 3D via COM (pywin32). It lets you operate Civil 3D —
surfaces, alignments, COGO points, layers, profiles, cross-sections,
scripts — directly from a conversation with Claude, without going through
the GUI.
Tested on Civil 3D 2021; it should work on other versions that expose the same AutoCAD/Civil 3D COM/ActiveX API.
Requirements
- Windows with Autodesk Civil 3D installed and open
- Python 3.11 (not compatible with 3.14, due to
asyncioissues) pip install mcp fastmcp pywin32
Installation
git clone https://github.com/<your-username>/civil3d2021-mcp.git
cd civil3d2021-mcp
python -m pip install -e .
Configuration in Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"civil3d-mcp": {
"command": "python",
"args": ["-m", "civil3d_mcp.server"],
"env": {
"PYTHONPATH": "PATH_TO_REPO\\src",
"CIVIL3D_BIN_PATH": "C:\\Program Files\\Autodesk\\AutoCAD 2021\\C3D"
}
}
}
}
Architecture
Modular FastMCP server (src/civil3d_mcp/). Each tools_*.py is an
independent tool domain, registered in server.py:
tools_drawing.py— drawing/project infotools_cogo.py— COGO pointstools_lines.py— lines and polylinestools_surfaces.py— TIN surfacestools_alignments.py— alignmentstools_corridors.py— corridorstools_layers.py— layerstools_blocks.py— blockstools_view.py— view and zoomtools_create.py— object creationtools_files.py— file managementtools_script.py— script execution and .NET plugin loadingtools_mesh.py— 3D meshes (3DFace) from triangulations or polylinestools_geometria.py— real bounding box and fitting blocks onto TIN surfacestools_cotas.py— elevation labels (MLeader) on cross-section blockstools_cache.py— SQLite entity cache for large layerstools_textos.py— text search and visual selection
scripts/templates/ contains standalone Python scripts that replicate some
operations without going through the MCP server, useful as reference or for
quick one-off tests directly against Civil 3D.
Additional documentation
- TOOLS.md — full tool index by module, with signature and behavior.
- LECCIONES_TECNICAS.md — lessons learned about the behavior of Civil 3D's COM/ActiveX API (in Spanish; useful for anyone extending the server).
Credits
Developed by Orcosto, with Claude (Anthropic) as co-author: design and implementation of most of the tools, debugging of the COM API, and writing of this repository's technical documentation.
Related projects
Inspired by the general idea behind barbosaihan/civil3d-mcp
(an MCP server for Civil 3D). This is not a fork: the architecture is
different — that project uses TypeScript plus a C#/Roslyn plugin that
executes code inside Civil 3D via NETLOAD/TCP, while this server is pure
Python over COM/ActiveX (pywin32) with fixed per-domain tools. No code is
shared between the two.
License
No license defined yet — personal use. Get in touch before reusing this in a commercial context.
Español
Servidor MCP (Model Context Protocol) que conecta un asistente LLM (Claude) con
Autodesk Civil 3D via COM (pywin32). Permite operar Civil 3D — superficies,
alineaciones, puntos COGO, capas, perfiles, secciones, scripts — directamente
desde una conversación con Claude, sin pasar por la interfaz gráfica.
Probado sobre Civil 3D 2021, debería funcionar sobre otras versiones que expongan la misma API COM/ActiveX de AutoCAD y Civil 3D.
Requisitos
- Windows con Autodesk Civil 3D instalado y abierto
- Python 3.11 (no compatible con 3.14 por temas de
asyncio) pip install mcp fastmcp pywin32
Instalación
git clone https://github.com/<tu-usuario>/civil3d2021-mcp.git
cd civil3d2021-mcp
python -m pip install -e .
Configuración en Claude Desktop
Añadir en claude_desktop_config.json:
{
"mcpServers": {
"civil3d-mcp": {
"command": "python",
"args": ["-m", "civil3d_mcp.server"],
"env": {
"PYTHONPATH": "RUTA_AL_REPO\\src",
"CIVIL3D_BIN_PATH": "C:\\Program Files\\Autodesk\\AutoCAD 2021\\C3D"
}
}
}
}
Arquitectura
Servidor FastMCP modular (src/civil3d_mcp/). Cada tools_*.py es un dominio
de herramientas independiente, registrado en server.py:
tools_drawing.py— info del dibujo/proyectotools_cogo.py— puntos COGOtools_lines.py— líneas y polilíneastools_surfaces.py— superficies TINtools_alignments.py— alineacionestools_corridors.py— corredorestools_layers.py— capastools_blocks.py— bloquestools_view.py— vista y zoomtools_create.py— creación de objetostools_files.py— gestión de archivostools_script.py— ejecución de scripts y carga de plugins .NETtools_mesh.py— mallas 3D (3DFace) desde triangulaciones o polilíneastools_geometria.py— bounding box real y encaje de bloques sobre superficies TINtools_cotas.py— cotas de nivel (MLeader) sobre bloques de seccióntools_cache.py— cache SQLite de entidades para capas grandestools_textos.py— búsqueda de textos y selección visual
scripts/templates/ contiene scripts Python standalone que replican algunas
operaciones sin pasar por el servidor MCP, útiles como referencia o para
pruebas puntuales directas contra Civil 3D.
Documentación adicional
- TOOLS.md — índice completo de herramientas por módulo, con firma y comportamiento.
- LECCIONES_TECNICAS.md — lecciones acumuladas sobre el comportamiento de la API COM/ActiveX de Civil 3D (útil para quien quiera extender el servidor).
Créditos
Desarrollado por Orcosto, con Claude (Anthropic) como coautor: diseño e implementación de la mayoría de las herramientas, depuración de la API COM y redacción de la documentación técnica de este repositorio.
Proyectos relacionados
Inspirado en la idea general de barbosaihan/civil3d-mcp
(servidor MCP para Civil 3D). No es un fork: la arquitectura es distinta —
aquel usa TypeScript + un plugin C#/Roslyn que ejecuta código dentro de
Civil 3D via NETLOAD/TCP, mientras que este servidor es Python puro sobre
COM/ActiveX (pywin32) con herramientas fijas por dominio. No se comparte
código entre ambos.
Licencia
Sin licencia definida todavía — uso personal. Contactar antes de reutilizar en un contexto comercial.
Install Civil3d in Claude Desktop, Claude Code & Cursor
unyly install civil3d-mcpInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add civil3d-mcp -- uvx --from git+https://github.com/orcosto-lab/civil3d2021-mcp civil3d-mcpFAQ
Is Civil3d MCP free?
Yes, Civil3d MCP is free — one-click install via Unyly at no cost.
Does Civil3d need an API key?
No, Civil3d runs without API keys or environment variables.
Is Civil3d hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Civil3d in Claude Desktop, Claude Code or Cursor?
Open Civil3d on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Civil3d with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
