Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
6 changes: 3 additions & 3 deletions kicad_mcp/tools/export_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def register_export_tools(mcp: FastMCP) -> None:
"""

@mcp.tool()
async def generate_pcb_thumbnail(project_path: str, ctx: Context) -> Optional[Image]:
async def generate_pcb_thumbnail(project_path: str, ctx: Context):
"""Generate a thumbnail image of a KiCad PCB layout using kicad-cli.

Args:
Expand Down Expand Up @@ -88,14 +88,14 @@ async def generate_pcb_thumbnail(project_path: str, ctx: Context) -> Optional[Im
return None

@mcp.tool()
async def generate_project_thumbnail(project_path: str, ctx: Context) -> Optional[Image]:
async def generate_project_thumbnail(project_path: str, ctx: Context):
"""Generate a thumbnail of a KiCad project's PCB layout (Alias for generate_pcb_thumbnail)."""
# This function now just calls the main CLI-based thumbnail generator
print(f"generate_project_thumbnail called, redirecting to generate_pcb_thumbnail for {project_path}")
return await generate_pcb_thumbnail(project_path, ctx)

# Helper functions for thumbnail generation
async def generate_thumbnail_with_cli(pcb_file: str, ctx: Context) -> Optional[Image]:
async def generate_thumbnail_with_cli(pcb_file: str, ctx: Context):
"""Generate PCB thumbnail using command line tools.
This is a fallback method when the kicad Python module is not available or fails.

Expand Down
30 changes: 12 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,23 @@ build-backend = "setuptools.build_meta"
[project]
name = "kicad-mcp"
version = "0.1.0"
authors = [
{ name="Lama Al Rajih", email="[email protected]" },
]
authors = [{ name = "Lama Al Rajih", email = "[email protected]" }]
description = "Model Context Protocol server for KiCad on Mac, Windows, and Linux"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
dependencies = [
"mcp[cli]",
"pandas",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
keywords = ["kicad", "mcp", "model-context-protocol", "eda", "pcb"]
dependencies = ["mcp[cli]>=1.11.0", "pandas>=2.3.1", "pytest>=8.4.1"]

[project.urls]
"Homepage" = "https://github.com/lamaalrajih/kicad-mcp"
Expand Down
Loading