Skip to content

Commit 17cffda

Browse files
iaminaweclaude
andauthored
Add CLI entry point and package prompts for PyPI publishing (#10)
* feat: add CLI entry point and include prompts in package Fixes #8 Changes: - Add [project.scripts] entry point for uvx installation - Include prompts/ directory in wheel package - Force include server.py in package distribution This enables users to install via uvx: uvx spec-driven-development-mcp Package now includes: - mcp_server/*.py (implementation files) - prompts/*.md (3 prompt definitions) - server.py (entry point module) - CLI command: spec-driven-development-mcp Tested: - Package builds successfully - All required files present in wheel - Entry point loads FastMCP instance correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * fix: make entry point callable for console script Address CodeRabbit review feedback by creating a callable main() function for the console script entry point. Changes: - Add main() function to server.py that calls mcp.run() - Update entry point from "server:mcp" to "server:main" - Entry point now properly callable when installed via uvx Fixes the TypeError that would occur when trying to invoke the non-callable FastMCP instance directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent f2f4f27 commit 17cffda

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ dev = [
2727
requires = ["hatchling"]
2828
build-backend = "hatchling.build"
2929

30+
[project.scripts]
31+
spec-driven-development-mcp = "server:main"
32+
3033
[tool.hatch.build.targets.wheel]
31-
packages = ["mcp_server"]
34+
packages = ["mcp_server", "prompts"]
35+
36+
[tool.hatch.build.targets.wheel.force-include]
37+
"server.py" = "server.py"
3238

3339

3440
# --- Ruff (linter + formatter) ---

server.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,14 @@
99
# Create the MCP server instance
1010
# The CLI looks for 'mcp', 'server', or 'app' at module level
1111
mcp = create_app()
12+
13+
14+
def main() -> None:
15+
"""Entry point for console script.
16+
17+
This function is called when the package is installed and run via:
18+
uvx spec-driven-development-mcp
19+
20+
It runs the MCP server using stdio transport.
21+
"""
22+
mcp.run()

0 commit comments

Comments
 (0)