Skip to content

Commit d7c2692

Browse files
authored
Merge branch 'main' into pr-1-fastmcp-2.0-migration
2 parents 9bea0f4 + b4d3bfa commit d7c2692

File tree

8 files changed

+1002
-12
lines changed

8 files changed

+1002
-12
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
name: Bug Report
3-
about: Report a bug or issue with the KiCad MCP Server
4-
title: "[BUG] "
5-
labels: bug
6-
assignees: ''
7-
---
8-
91
## Bug Description
102
<!-- A clear and concise description of the bug -->
113

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ __pycache__/
1818
dist/
1919
build/
2020
*.egg-info/
21+
*.egg
22+
*.whl
23+
24+
# PyPI
25+
.pypirc
2126

2227
# Unit test / coverage reports
2328
htmlcov/

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include README.md
2+
include LICENSE
3+
include requirements.txt
4+
include .env.example
5+
recursive-include kicad_mcp *.py
6+
recursive-include docs *.md

kicad_mcp/__init__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
"""
22
KiCad MCP Server - A Model Context Protocol server for KiCad.
33
"""
4+
from .server import *
5+
from .config import *
6+
from .context import *
7+
48
__version__ = "0.1.0"
9+
__author__ = "Lama Al Rajih"
10+
__description__ = "Model Context Protocol server for KiCad on Mac, Windows, and Linux"
11+
12+
__all__ = [
13+
# Package metadata
14+
"__version__",
15+
"__author__",
16+
"__description__",
17+
18+
# Server creation / shutdown helpers
19+
"create_server",
20+
"add_cleanup_handler",
21+
"run_cleanup_handlers",
22+
"shutdown_server",
23+
24+
# Lifespan / context helpers
25+
"kicad_lifespan",
26+
"KiCadAppContext",
27+
]

kicad_mcp/tools/export_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def register_export_tools(mcp: FastMCP) -> None:
2020
"""
2121

2222
@mcp.tool()
23-
async def generate_pcb_thumbnail(project_path: str, ctx: Context) -> Optional[Image]:
23+
async def generate_pcb_thumbnail(project_path: str, ctx: Context):
2424
"""Generate a thumbnail image of a KiCad PCB layout using kicad-cli.
2525
2626
Args:
@@ -88,14 +88,14 @@ async def generate_pcb_thumbnail(project_path: str, ctx: Context) -> Optional[Im
8888
return None
8989

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

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

pyproject.toml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ dependencies = [
1717
"fastmcp>=0.1.0",
1818
"pandas>=2.0.0",
1919
]
20+
classifiers = [
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"License :: OSI Approved :: MIT License",
26+
"Operating System :: OS Independent",
27+
"Intended Audience :: Developers",
28+
"Topic :: Software Development :: Libraries :: Python Modules",
29+
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
30+
]
31+
32+
[project.urls]
33+
"Homepage" = "https://github.com/lamaalrajih/kicad-mcp"
34+
"Bug Tracker" = "https://github.com/lamaalrajih/kicad-mcp/issues"
35+
"Documentation" = "https://github.com/lamaalrajih/kicad-mcp#readme"
2036

2137
[project.scripts]
2238
kicad-mcp = "kicad_mcp.server:main"
@@ -25,4 +41,12 @@ kicad-mcp = "kicad_mcp.server:main"
2541
dev = [
2642
"pytest>=7.0.0",
2743
"pytest-asyncio>=0.23.0",
28-
]
44+
]
45+
46+
[tool.setuptools.packages.find]
47+
where = ["."]
48+
include = ["kicad_mcp*"]
49+
exclude = ["tests*", "docs*"]
50+
51+
[tool.setuptools.package-data]
52+
"kicad_mcp" = ["prompts/*.txt", "resources/**/*.json"]

uv.lock

Lines changed: 939 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)