Skip to content

Commit b4d3bfa

Browse files
authored
Merge pull request #12 from lamaalrajih/publish-pip
Add repo to pip package
2 parents 7019df0 + 74ad42e commit b4d3bfa

File tree

8 files changed

+1018
-11
lines changed

8 files changed

+1018
-11
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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "kicad-mcp"
7+
version = "0.1.0"
8+
authors = [{ name = "Lama Al Rajih" }]
9+
description = "Model Context Protocol server for KiCad on Mac, Windows, and Linux"
10+
license = { text = "MIT" }
11+
readme = "README.md"
12+
requires-python = ">=3.10"
13+
classifiers = [
14+
"Programming Language :: Python :: 3",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"License :: OSI Approved :: MIT License",
19+
"Operating System :: OS Independent",
20+
"Development Status :: 4 - Beta",
21+
"Intended Audience :: Developers",
22+
"Topic :: Software Development :: Libraries :: Python Modules",
23+
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
24+
]
25+
dependencies = ["mcp[cli]>=1.11.0", "pandas>=2.3.1", "pytest>=8.4.1"]
26+
27+
[project.urls]
28+
"Homepage" = "https://github.com/lamaalrajih/kicad-mcp"
29+
"Bug Tracker" = "https://github.com/lamaalrajih/kicad-mcp/issues"
30+
"Documentation" = "https://github.com/lamaalrajih/kicad-mcp#readme"
31+
32+
[project.scripts]
33+
kicad-mcp = "kicad_mcp.main:main"
34+
35+
[tool.setuptools.packages.find]
36+
where = ["."]
37+
include = ["kicad_mcp*"]
38+
exclude = ["tests*", "docs*"]
39+
40+
[tool.setuptools.package-data]
41+
"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)