civil3d-mcp
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
civil3d2021-mcp
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.