From cf8394fa6fde71bc5a954fa61459dcd37a424fa3 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Thu, 12 Feb 2026 22:53:16 -0700 Subject: [PATCH] Rename mcp-ltspice -> mcltspice, remove stdout banner Rename package from mcp-ltspice/mcp_ltspice to mcltspice throughout: source directory, imports, pyproject.toml, tests, and README. Remove startup banner prints from main() since FastMCP handles its own banner and stdout is the MCP JSON-RPC transport. Point repo URL at git.supported.systems/MCP/mcltspice. --- README.md | 12 +++-- pyproject.toml | 8 +-- src/{mcp_ltspice => mcltspice}/__init__.py | 2 +- .../asc_generator.py | 0 src/{mcp_ltspice => mcltspice}/batch.py | 0 src/{mcp_ltspice => mcltspice}/config.py | 2 +- src/{mcp_ltspice => mcltspice}/diff.py | 0 src/{mcp_ltspice => mcltspice}/drc.py | 0 src/{mcp_ltspice => mcltspice}/log_parser.py | 0 src/{mcp_ltspice => mcltspice}/models.py | 0 src/{mcp_ltspice => mcltspice}/netlist.py | 0 .../noise_analysis.py | 0 src/{mcp_ltspice => mcltspice}/optimizer.py | 0 .../power_analysis.py | 0 src/{mcp_ltspice => mcltspice}/raw_parser.py | 0 src/{mcp_ltspice => mcltspice}/runner.py | 0 src/{mcp_ltspice => mcltspice}/schematic.py | 0 src/{mcp_ltspice => mcltspice}/server.py | 12 +---- src/{mcp_ltspice => mcltspice}/stability.py | 0 src/{mcp_ltspice => mcltspice}/svg_plot.py | 0 src/{mcp_ltspice => mcltspice}/touchstone.py | 0 .../waveform_expr.py | 0 .../waveform_math.py | 0 tests/conftest.py | 8 +-- tests/test_asc_generator.py | 2 +- tests/test_diff.py | 4 +- tests/test_drc.py | 8 +-- tests/test_integration.py | 12 ++--- tests/test_netlist.py | 2 +- tests/test_new_templates.py | 4 +- tests/test_optimizer_helpers.py | 2 +- tests/test_power_analysis.py | 2 +- tests/test_raw_parser.py | 2 +- tests/test_stability.py | 2 +- tests/test_svg_plot.py | 2 +- tests/test_touchstone.py | 2 +- tests/test_waveform_expr.py | 2 +- tests/test_waveform_math.py | 2 +- uv.lock | 52 +++++++++---------- 39 files changed, 69 insertions(+), 75 deletions(-) rename src/{mcp_ltspice => mcltspice}/__init__.py (78%) rename src/{mcp_ltspice => mcltspice}/asc_generator.py (100%) rename src/{mcp_ltspice => mcltspice}/batch.py (100%) rename src/{mcp_ltspice => mcltspice}/config.py (97%) rename src/{mcp_ltspice => mcltspice}/diff.py (100%) rename src/{mcp_ltspice => mcltspice}/drc.py (100%) rename src/{mcp_ltspice => mcltspice}/log_parser.py (100%) rename src/{mcp_ltspice => mcltspice}/models.py (100%) rename src/{mcp_ltspice => mcltspice}/netlist.py (100%) rename src/{mcp_ltspice => mcltspice}/noise_analysis.py (100%) rename src/{mcp_ltspice => mcltspice}/optimizer.py (100%) rename src/{mcp_ltspice => mcltspice}/power_analysis.py (100%) rename src/{mcp_ltspice => mcltspice}/raw_parser.py (100%) rename src/{mcp_ltspice => mcltspice}/runner.py (100%) rename src/{mcp_ltspice => mcltspice}/schematic.py (100%) rename src/{mcp_ltspice => mcltspice}/server.py (99%) rename src/{mcp_ltspice => mcltspice}/stability.py (100%) rename src/{mcp_ltspice => mcltspice}/svg_plot.py (100%) rename src/{mcp_ltspice => mcltspice}/touchstone.py (100%) rename src/{mcp_ltspice => mcltspice}/waveform_expr.py (100%) rename src/{mcp_ltspice => mcltspice}/waveform_math.py (100%) diff --git a/README.md b/README.md index 312919f..a51d58c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# mcp-ltspice +# mcltspice MCP server for LTspice circuit simulation automation on Linux. @@ -19,7 +19,7 @@ MCP server for LTspice circuit simulation automation on Linux. ```bash # From PyPI (once published) -uvx mcp-ltspice +uvx mcltspice # From source uv pip install -e . @@ -67,15 +67,19 @@ Set the `LTSPICE_DIR` environment variable or use the default `~/claude/ltspice/ ## Usage with Claude Code ```bash -claude mcp add mcp-ltspice -- uvx mcp-ltspice +claude mcp add mcltspice -- uvx mcltspice ``` Or for local development: ```bash -claude mcp add mcp-ltspice -- uv run --directory /path/to/mcp-ltspice mcp-ltspice +claude mcp add mcltspice -- uv run --directory /path/to/mcltspice mcltspice ``` +## Repository + +[git.supported.systems/MCP/mcltspice](https://git.supported.systems/MCP/mcltspice) + ## License MIT diff --git a/pyproject.toml b/pyproject.toml index d98ef52..5886523 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "mcp-ltspice" +name = "mcltspice" version = "2026.02.10" description = "MCP server for LTspice circuit simulation automation" readme = "README.md" @@ -35,17 +35,17 @@ plot = [ ] [project.scripts] -mcp-ltspice = "mcp_ltspice.server:main" +mcltspice = "mcltspice.server:main" [project.urls] -Repository = "https://github.com/ryanmalloy/mcp-ltspice" +Repository = "https://git.supported.systems/MCP/mcltspice" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = ["src/mcp_ltspice"] +packages = ["src/mcltspice"] [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/src/mcp_ltspice/__init__.py b/src/mcltspice/__init__.py similarity index 78% rename from src/mcp_ltspice/__init__.py rename to src/mcltspice/__init__.py index d480c2f..e47d4b7 100644 --- a/src/mcp_ltspice/__init__.py +++ b/src/mcltspice/__init__.py @@ -3,6 +3,6 @@ from importlib.metadata import version try: - __version__ = version("mcp-ltspice") + __version__ = version("mcltspice") except Exception: __version__ = "0.0.0" diff --git a/src/mcp_ltspice/asc_generator.py b/src/mcltspice/asc_generator.py similarity index 100% rename from src/mcp_ltspice/asc_generator.py rename to src/mcltspice/asc_generator.py diff --git a/src/mcp_ltspice/batch.py b/src/mcltspice/batch.py similarity index 100% rename from src/mcp_ltspice/batch.py rename to src/mcltspice/batch.py diff --git a/src/mcp_ltspice/config.py b/src/mcltspice/config.py similarity index 97% rename from src/mcp_ltspice/config.py rename to src/mcltspice/config.py index bb684f6..6905410 100644 --- a/src/mcp_ltspice/config.py +++ b/src/mcltspice/config.py @@ -1,4 +1,4 @@ -"""Configuration for mcp-ltspice.""" +"""Configuration for mcltspice.""" import os from pathlib import Path diff --git a/src/mcp_ltspice/diff.py b/src/mcltspice/diff.py similarity index 100% rename from src/mcp_ltspice/diff.py rename to src/mcltspice/diff.py diff --git a/src/mcp_ltspice/drc.py b/src/mcltspice/drc.py similarity index 100% rename from src/mcp_ltspice/drc.py rename to src/mcltspice/drc.py diff --git a/src/mcp_ltspice/log_parser.py b/src/mcltspice/log_parser.py similarity index 100% rename from src/mcp_ltspice/log_parser.py rename to src/mcltspice/log_parser.py diff --git a/src/mcp_ltspice/models.py b/src/mcltspice/models.py similarity index 100% rename from src/mcp_ltspice/models.py rename to src/mcltspice/models.py diff --git a/src/mcp_ltspice/netlist.py b/src/mcltspice/netlist.py similarity index 100% rename from src/mcp_ltspice/netlist.py rename to src/mcltspice/netlist.py diff --git a/src/mcp_ltspice/noise_analysis.py b/src/mcltspice/noise_analysis.py similarity index 100% rename from src/mcp_ltspice/noise_analysis.py rename to src/mcltspice/noise_analysis.py diff --git a/src/mcp_ltspice/optimizer.py b/src/mcltspice/optimizer.py similarity index 100% rename from src/mcp_ltspice/optimizer.py rename to src/mcltspice/optimizer.py diff --git a/src/mcp_ltspice/power_analysis.py b/src/mcltspice/power_analysis.py similarity index 100% rename from src/mcp_ltspice/power_analysis.py rename to src/mcltspice/power_analysis.py diff --git a/src/mcp_ltspice/raw_parser.py b/src/mcltspice/raw_parser.py similarity index 100% rename from src/mcp_ltspice/raw_parser.py rename to src/mcltspice/raw_parser.py diff --git a/src/mcp_ltspice/runner.py b/src/mcltspice/runner.py similarity index 100% rename from src/mcp_ltspice/runner.py rename to src/mcltspice/runner.py diff --git a/src/mcp_ltspice/schematic.py b/src/mcltspice/schematic.py similarity index 100% rename from src/mcp_ltspice/schematic.py rename to src/mcltspice/schematic.py diff --git a/src/mcp_ltspice/server.py b/src/mcltspice/server.py similarity index 99% rename from src/mcp_ltspice/server.py rename to src/mcltspice/server.py index a1bf5e2..8d6cf90 100644 --- a/src/mcp_ltspice/server.py +++ b/src/mcltspice/server.py @@ -20,7 +20,6 @@ import numpy as np from fastmcp import FastMCP from fastmcp.prompts import Message -from . import __version__ from .asc_generator import ( generate_boost_converter as generate_boost_converter_asc, ) @@ -129,7 +128,7 @@ from .waveform_math import ( ) mcp = FastMCP( - name="mcp-ltspice", + name="mcltspice", instructions=""" LTspice MCP Server - Circuit simulation automation. @@ -2751,15 +2750,6 @@ Common failure modes: def main(): """Run the MCP server.""" - print(f"\U0001f50c mcp-ltspice v{__version__}") - print(" LTspice circuit simulation automation") - - ok, msg = validate_installation() - if ok: - print(f" \u2713 {msg}") - else: - print(f" \u26a0 {msg}") - mcp.run() diff --git a/src/mcp_ltspice/stability.py b/src/mcltspice/stability.py similarity index 100% rename from src/mcp_ltspice/stability.py rename to src/mcltspice/stability.py diff --git a/src/mcp_ltspice/svg_plot.py b/src/mcltspice/svg_plot.py similarity index 100% rename from src/mcp_ltspice/svg_plot.py rename to src/mcltspice/svg_plot.py diff --git a/src/mcp_ltspice/touchstone.py b/src/mcltspice/touchstone.py similarity index 100% rename from src/mcp_ltspice/touchstone.py rename to src/mcltspice/touchstone.py diff --git a/src/mcp_ltspice/waveform_expr.py b/src/mcltspice/waveform_expr.py similarity index 100% rename from src/mcp_ltspice/waveform_expr.py rename to src/mcltspice/waveform_expr.py diff --git a/src/mcp_ltspice/waveform_math.py b/src/mcltspice/waveform_math.py similarity index 100% rename from src/mcp_ltspice/waveform_math.py rename to src/mcltspice/waveform_math.py diff --git a/tests/conftest.py b/tests/conftest.py index 6731b95..f0d4edb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -"""Shared fixtures for mcp-ltspice test suite. +"""Shared fixtures for mcltspice test suite. All fixtures produce synthetic data -- no LTspice or Wine required. """ @@ -8,8 +8,8 @@ from pathlib import Path import numpy as np import pytest -from mcp_ltspice.raw_parser import RawFile, Variable -from mcp_ltspice.schematic import Component, Flag, Schematic, Text, Wire +from mcltspice.raw_parser import RawFile, Variable +from mcltspice.schematic import Component, Flag, Schematic, Text, Wire # --------------------------------------------------------------------------- # Time-domain fixtures @@ -329,7 +329,7 @@ def schematic_duplicate_names() -> Schematic: @pytest.fixture def ltspice_available(): """Skip test if LTspice is not available.""" - from mcp_ltspice.config import validate_installation + from mcltspice.config import validate_installation ok, msg = validate_installation() if not ok: pytest.skip(f"LTspice not available: {msg}") diff --git a/tests/test_asc_generator.py b/tests/test_asc_generator.py index 5382abd..71f0a02 100644 --- a/tests/test_asc_generator.py +++ b/tests/test_asc_generator.py @@ -2,7 +2,7 @@ import pytest -from mcp_ltspice.asc_generator import ( +from mcltspice.asc_generator import ( _PIN_OFFSETS, AscSchematic, _rotate, diff --git a/tests/test_diff.py b/tests/test_diff.py index d3b441b..44c4dc6 100644 --- a/tests/test_diff.py +++ b/tests/test_diff.py @@ -2,7 +2,7 @@ -from mcp_ltspice.diff import ( +from mcltspice.diff import ( ComponentChange, SchematicDiff, _diff_components, @@ -11,7 +11,7 @@ from mcp_ltspice.diff import ( _diff_wires, diff_schematics, ) -from mcp_ltspice.schematic import Component, Flag, Schematic, Text, Wire, write_schematic +from mcltspice.schematic import Component, Flag, Schematic, Text, Wire, write_schematic def _make_schematic(**kwargs) -> Schematic: diff --git a/tests/test_drc.py b/tests/test_drc.py index 5da97b3..690cba0 100644 --- a/tests/test_drc.py +++ b/tests/test_drc.py @@ -2,7 +2,7 @@ -from mcp_ltspice.drc import ( +from mcltspice.drc import ( DRCResult, DRCViolation, Severity, @@ -10,7 +10,7 @@ from mcp_ltspice.drc import ( _check_ground, _check_simulation_directive, ) -from mcp_ltspice.schematic import Schematic, write_schematic +from mcltspice.schematic import Schematic, write_schematic def _run_single_check(check_fn, schematic: Schematic) -> DRCResult: @@ -110,7 +110,7 @@ class TestFullDRC: def test_valid_schematic_passes(self, valid_schematic, tmp_path): """A valid schematic should pass DRC with no errors.""" - from mcp_ltspice.drc import run_drc + from mcltspice.drc import run_drc path = tmp_path / "valid.asc" write_schematic(valid_schematic, path) @@ -119,7 +119,7 @@ class TestFullDRC: assert len(result.errors) == 0 def test_no_ground_fails(self, schematic_no_ground, tmp_path): - from mcp_ltspice.drc import run_drc + from mcltspice.drc import run_drc path = tmp_path / "no_ground.asc" write_schematic(schematic_no_ground, path) diff --git a/tests/test_integration.py b/tests/test_integration.py index fd5486a..c38ede8 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -10,20 +10,20 @@ from pathlib import Path import numpy as np import pytest -from mcp_ltspice.asc_generator import ( +from mcltspice.asc_generator import ( generate_colpitts_oscillator as generate_colpitts_asc, ) -from mcp_ltspice.asc_generator import ( +from mcltspice.asc_generator import ( generate_common_emitter_amp as generate_ce_amp_asc, ) -from mcp_ltspice.asc_generator import ( +from mcltspice.asc_generator import ( generate_non_inverting_amp as generate_noninv_amp_asc, ) -from mcp_ltspice.asc_generator import ( +from mcltspice.asc_generator import ( generate_rc_lowpass as generate_rc_lowpass_asc, ) -from mcp_ltspice.runner import run_simulation -from mcp_ltspice.waveform_math import compute_bandwidth, compute_rms +from mcltspice.runner import run_simulation +from mcltspice.waveform_math import compute_bandwidth, compute_rms @pytest.mark.integration diff --git a/tests/test_netlist.py b/tests/test_netlist.py index 22211c5..4f2ccf8 100644 --- a/tests/test_netlist.py +++ b/tests/test_netlist.py @@ -2,7 +2,7 @@ import pytest -from mcp_ltspice.netlist import ( +from mcltspice.netlist import ( Netlist, buck_converter, colpitts_oscillator, diff --git a/tests/test_new_templates.py b/tests/test_new_templates.py index 348b7ba..83892eb 100644 --- a/tests/test_new_templates.py +++ b/tests/test_new_templates.py @@ -2,7 +2,7 @@ import pytest -from mcp_ltspice.asc_generator import ( +from mcltspice.asc_generator import ( AscSchematic, generate_boost_converter, generate_current_mirror, @@ -10,7 +10,7 @@ from mcp_ltspice.asc_generator import ( generate_sallen_key_lowpass, generate_transimpedance_amp, ) -from mcp_ltspice.netlist import ( +from mcltspice.netlist import ( Netlist, boost_converter, current_mirror, diff --git a/tests/test_optimizer_helpers.py b/tests/test_optimizer_helpers.py index 5b7c093..ad7a583 100644 --- a/tests/test_optimizer_helpers.py +++ b/tests/test_optimizer_helpers.py @@ -2,7 +2,7 @@ import pytest -from mcp_ltspice.optimizer import format_engineering, snap_to_preferred +from mcltspice.optimizer import format_engineering, snap_to_preferred class TestSnapToPreferred: diff --git a/tests/test_power_analysis.py b/tests/test_power_analysis.py index aaad800..d80fd20 100644 --- a/tests/test_power_analysis.py +++ b/tests/test_power_analysis.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from mcp_ltspice.power_analysis import ( +from mcltspice.power_analysis import ( compute_average_power, compute_efficiency, compute_instantaneous_power, diff --git a/tests/test_raw_parser.py b/tests/test_raw_parser.py index 8856daf..9a42bef 100644 --- a/tests/test_raw_parser.py +++ b/tests/test_raw_parser.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from mcp_ltspice.raw_parser import _detect_run_boundaries +from mcltspice.raw_parser import _detect_run_boundaries class TestDetectRunBoundaries: diff --git a/tests/test_stability.py b/tests/test_stability.py index fd64b5c..8e482ef 100644 --- a/tests/test_stability.py +++ b/tests/test_stability.py @@ -2,7 +2,7 @@ import numpy as np -from mcp_ltspice.stability import ( +from mcltspice.stability import ( compute_gain_margin, compute_phase_margin, compute_stability_metrics, diff --git a/tests/test_svg_plot.py b/tests/test_svg_plot.py index da71942..fd69fd0 100644 --- a/tests/test_svg_plot.py +++ b/tests/test_svg_plot.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from mcp_ltspice.svg_plot import ( +from mcltspice.svg_plot import ( _format_freq, _nice_ticks, plot_bode, diff --git a/tests/test_touchstone.py b/tests/test_touchstone.py index 86a3120..06f1078 100644 --- a/tests/test_touchstone.py +++ b/tests/test_touchstone.py @@ -5,7 +5,7 @@ from pathlib import Path import numpy as np import pytest -from mcp_ltspice.touchstone import ( +from mcltspice.touchstone import ( _detect_ports, _to_complex, get_s_parameter, diff --git a/tests/test_waveform_expr.py b/tests/test_waveform_expr.py index 049c046..7d5c97c 100644 --- a/tests/test_waveform_expr.py +++ b/tests/test_waveform_expr.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from mcp_ltspice.waveform_expr import ( +from mcltspice.waveform_expr import ( WaveformCalculator, _tokenize, _TokenType, diff --git a/tests/test_waveform_math.py b/tests/test_waveform_math.py index c021999..25d3320 100644 --- a/tests/test_waveform_math.py +++ b/tests/test_waveform_math.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from mcp_ltspice.waveform_math import ( +from mcltspice.waveform_math import ( compute_bandwidth, compute_fft, compute_peak_to_peak, diff --git a/uv.lock b/uv.lock index e3070ef..60986c7 100644 --- a/uv.lock +++ b/uv.lock @@ -1027,32 +1027,7 @@ wheels = [ ] [[package]] -name = "mcp" -version = "1.26.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "anyio" }, - { name = "httpx" }, - { name = "httpx-sse" }, - { name = "jsonschema" }, - { name = "pydantic" }, - { name = "pydantic-settings" }, - { name = "pyjwt", extra = ["crypto"] }, - { name = "python-multipart" }, - { name = "pywin32", marker = "sys_platform == 'win32'" }, - { name = "sse-starlette" }, - { name = "starlette" }, - { name = "typing-extensions" }, - { name = "typing-inspection" }, - { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/fc/6d/62e76bbb8144d6ed86e202b5edd8a4cb631e7c8130f3f4893c3f90262b10/mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66", size = 608005, upload-time = "2026-01-24T19:40:32.468Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fd/d9/eaa1f80170d2b7c5ba23f3b59f766f3a0bb41155fbc32a69adfa1adaaef9/mcp-1.26.0-py3-none-any.whl", hash = "sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca", size = 233615, upload-time = "2026-01-24T19:40:30.652Z" }, -] - -[[package]] -name = "mcp-ltspice" +name = "mcltspice" version = "2026.2.10" source = { editable = "." } dependencies = [ @@ -1081,6 +1056,31 @@ requires-dist = [ ] provides-extras = ["dev", "plot"] +[[package]] +name = "mcp" +version = "1.26.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "httpx" }, + { name = "httpx-sse" }, + { name = "jsonschema" }, + { name = "pydantic" }, + { name = "pydantic-settings" }, + { name = "pyjwt", extra = ["crypto"] }, + { name = "python-multipart" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, + { name = "sse-starlette" }, + { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, + { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/6d/62e76bbb8144d6ed86e202b5edd8a4cb631e7c8130f3f4893c3f90262b10/mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66", size = 608005, upload-time = "2026-01-24T19:40:32.468Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/d9/eaa1f80170d2b7c5ba23f3b59f766f3a0bb41155fbc32a69adfa1adaaef9/mcp-1.26.0-py3-none-any.whl", hash = "sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca", size = 233615, upload-time = "2026-01-24T19:40:30.652Z" }, +] + [[package]] name = "mdurl" version = "0.1.2"