Skip to main content
Glama
luc-me

LTspice MCP Server

by luc-me

LTspice MCP Server

Un servidor MCP (Model Context Protocol) que permite a los LLMs diseñar y simular circuitos electrónicos usando LTspice.

Este proyecto conecta asistentes de IA (como Google Gemini) con LTspice XVII, permitiendo diseño de circuitos en lenguaje natural y simulación automática. Simplemente describí un circuito y la IA generará el netlist, lo simulará, detectará errores y los corregirá iterativamente hasta lograr una simulación exitosa.


🌟 Características

  • 🔌 Integración directa con LTspice - Generación automática de netlists y simulación

  • 🔄 Auto-corrección - Detecta y corrige errores comunes de SPICE (singular matrix, convergencia, etc.)

  • 📚 Búsqueda en biblioteca - Valida componentes antes de simular

  • 📁 Organización automática - Cada circuito se guarda en su propia carpeta con logs

  • 🤖 Diseño asistido por IA - Compatible con cualquier LLM que soporte MCP


📋 Requisitos Previos

Necesitás tener instalado:

  1. Python 3.11+ - Descargar

  2. uv - Guía de instalación

  3. LTspice XVII - Descargar de Analog Devices

  4. Gemini CLI - Guía de instalación

Sistema: Windows 10/11


🚀 Instalación

1. Clonar el Repositorio

git clone https://github.com/luc-me/ltspiceMCP.git
cd ltspiceMCP

2. Instalar Dependencias

uv sync

3. Configurar Biblioteca de LTspice

Después de instalar LTspice, extraer la biblioteca de componentes:

  1. Ir a C:\Program Files\ADI\LTspice\ (o donde instalaste LTspice)

  2. Buscar el archivo lib.zip

  3. Extraerlo en C:\Users\<TuUsuario>\Documents\LTspice\lib\

4. Configurar Gemini CLI

Editar el archivo de configuración de Gemini CLI:

Ubicación: C:\Users\<TuUsuario>\.gemini\settings.json

Agregar en la sección mcpServers:

{
  "mcpServers": {
    "ltspice-circuit": {
      "command": "uv",
      "args": ["run", "server.py"],
      "cwd": "C:\\ruta\\completa\\a\\ltspiceMCP",
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

Importante: Reemplazar la ruta con tu ubicación real del proyecto.

5. Verificar

Ejecutar el script de verificación:

uv run install.py

💡 Ejemplos de Uso

Una vez configurado, podés usar lenguaje natural en Gemini CLI:

Diseñame un filtro pasa-bajos RC con frecuencia de corte de 1kHz.
Usá un capacitor de 10nF y calculá el resistor.
Creá un amplificador emisor común con un transistor BC547.
Tensión de alimentación: 12V, resistor de carga: 2.2kΩ.

La IA automáticamente:

  1. Buscará componentes disponibles

  2. Generará el netlist

  3. Simulará el circuito

  4. Intentará corregir errores si los hay

  5. Guardará todo en circuitos/<nombre_proyecto>/


🔧 Configuración

Ruta Personalizada de LTspice

Si LTspice está en otra ubicación, editar en server.py:

LTSPICE_EXE = r"C:\Tu\Ruta\LTspice.exe"

Ruta Personalizada de Biblioteca

LTSPICE_LIB_PATH = os.path.expanduser(r"~\Tu\Ruta\lib")

🐛 Solución de Problemas

"LTspice.exe no encontrado"

  • Verificar que LTspice esté instalado

  • Revisar la ruta en server.py

  • Ejecutar install.py para auto-detectar la ruta

"Componente no encontrado"

  • Asegurar que lib.zip esté extraído en Documents\LTspice\lib\

  • La IA sugerirá automáticamente alternativas genéricas

"Singular Matrix" o "Time step too small"

  • Son errores de SPICE que la IA corrige automáticamente (hasta 3 intentos)

  • Revisar el archivo .log en la carpeta del circuito para más detalles

El servidor MCP no se conecta

  1. Verificar que Gemini CLI esté instalado correctamente

  2. Revisar que settings.json tenga la ruta correcta

  3. Asegurar que uv esté en el PATH del sistema

  4. Reiniciar Gemini CLI después de cambios


Available Tools

2 tools
buscar_componente_en_libreriaC

Busca componentes en la biblioteca de LTspice.

ParametersJSON Schema
NameRequiredDescriptionDefault
nombreYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it searches components but doesn't describe what kind of results to expect, whether it's read-only or has side effects, or any performance characteristics. The existence of an output schema helps but doesn't compensate for the lack of behavioral context in the description.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple search tool.

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?

For a single-parameter search tool with an output schema, the description is minimally adequate but lacks important context. It doesn't explain what the search returns, how results are structured, or any limitations. The output schema existence prevents this from being a complete failure, but the description should provide more guidance.

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 has 0% description coverage for the single parameter 'nombre', and the tool description provides no information about what this parameter represents, expected format, or examples. The description doesn't add any meaning beyond the bare schema.

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 clearly states the verb ('Busca' - searches) and resource ('componentes en la biblioteca de LTspice'), making the purpose specific and understandable. However, it doesn't differentiate from the sibling tool 'gestionar_simulacion_ltspice', which appears to be about simulation management rather than component search.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or in what context. There's no mention of prerequisites, limitations, or relationship to the sibling tool, leaving usage entirely implicit.

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

gestionar_simulacion_ltspiceC

Guarda y simula un circuito en su propia carpeta.

ParametersJSON Schema
NameRequiredDescriptionDefault
netlist_contentYes
nombre_proyectoYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/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 of behavioral disclosure. It mentions saving and simulating a circuit, implying mutation and processing, but does not detail behavioral traits like permissions needed, whether simulations are destructive, error handling, or rate limits. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence: 'Guarda y simula un circuito en su propia carpeta.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for the tool's complexity. Every part of the sentence contributes to understanding the tool's function.

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?

Given that there is an output schema (which reduces the need to describe return values) but no annotations and 0% schema coverage for parameters, the description is moderately complete. It states the basic purpose clearly but lacks details on parameters, behavioral context, and usage guidelines. For a tool with two required parameters and no annotations, it should provide more information to be fully helpful.

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 schema provides no parameter descriptions. The tool description does not mention the parameters 'netlist_content' or 'nombre_proyecto', nor does it explain their meanings or usage. Without any parameter information in the description, it fails to compensate for the lack of schema coverage, leaving parameters undocumented.

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 clearly states the tool's purpose: 'Guarda y simula un circuito en su propia carpeta' (Saves and simulates a circuit in its own folder). It specifies the verb (save and simulate) and resource (circuit), though it doesn't explicitly differentiate from the sibling tool 'buscar_componente_en_libreria' (search component in library), which appears to serve a different function. The purpose is clear but lacks explicit sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention the sibling tool or any other context for usage, such as prerequisites or scenarios where this tool is preferred. Without such information, users must infer usage from the purpose alone.

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

TDQS

C2.9/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one searches for components in the LTspice library, while the other manages simulation by saving and simulating circuits in a folder. There is no overlap in functionality, making them easy to differentiate.

Naming Consistency3/5

Both tools use Spanish snake_case naming, which is consistent in style. However, the verb choices differ ('buscar' vs. 'gestionar'), and the naming pattern is not perfectly uniform (e.g., one includes 'en_libreria' while the other specifies 'ltspice'), leading to some inconsistency in structure.

Tool Count2/5

With only two tools, the server feels under-scoped for an LTspice domain, which typically involves tasks like circuit creation, component placement, parameter setting, and analysis. This limited set may not cover essential operations, making it too few for the apparent scope.

Completeness2/5

The tool set is severely incomplete for LTspice functionality. It lacks core operations such as creating or editing circuits, setting simulation parameters, running analyses (e.g., transient, AC), and viewing results. The existing tools cover only library search and basic simulation management, leaving significant gaps that will hinder agent workflows.

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

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/luc-me/ltspiceMCP'

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