Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

push code

zzstoatzz96c9bad51ab9
diff --git a/examples/smart_home/pyproject.toml b/examples/smart_home/pyproject.toml
index 4b21c0107..367bd8da0 100644
--- a/examples/smart_home/pyproject.toml
+++ b/examples/smart_home/pyproject.toml
@@ -5,21 +5,18 @@ description = "Add your description here"
readme = "README.md"
authors = [{ name = "zzstoatzz", email = "[email protected]" }]
requires-python = ">=3.12"
-dependencies = ["fastmcp"]
+dependencies = [
+ "fastmcp@git+https://github.com/jlowin/[email protected]",
+ "phue2",
+]
[project.scripts]
smart-home = "smart_home.__main__:main"
[dependency-groups]
-dev = ["ruff", "smart_home[lights]"]
-
-[project.optional-dependencies]
-lights = ["phue2"]
+dev = ["ruff"]
[build-system]
requires = ["uv_build"]
build-backend = "uv_build"
-
-[tool.uv.sources]
-fastmcp = { path = "../../" }
diff --git a/examples/smart_home/src/smart_home/hub.py b/examples/smart_home/src/smart_home/hub.py
index eda88bdc2..ac011c3c1 100644
--- a/examples/smart_home/src/smart_home/hub.py
+++ b/examples/smart_home/src/smart_home/hub.py
@@ -3,7 +3,9 @@ from smart_home.lights.server import bridge, lights_mcp
hub_mcp = FastMCP(
"Smart Home Hub (phue2)",
- dependencies=["fastmcp@git+https://github.com/jlowin/fastmcp.git", "phue2"],
+ dependencies=[
+ "smart_home@git+https://github.com/jlowin/fastmcp.git@n8example#subdirectory=examples/smart_home",
+ ],
)
# Mount the lights service under the 'hue' prefix
diff --git a/examples/smart_home/src/smart_home/lights/server.py b/examples/smart_home/src/smart_home/lights/server.py
index 47ac5aed2..9bf976fe8 100644
--- a/examples/smart_home/src/smart_home/lights/server.py
+++ b/examples/smart_home/src/smart_home/lights/server.py
@@ -44,7 +44,9 @@ except Exception as e:
lights_mcp = FastMCP(
"Hue Lights Service (phue2)",
- dependencies=["phue2", "fastmcp@git+https://github.com/jlowin/fastmcp.git"],
+ dependencies=[
+ "smart_home@git+https://github.com/jlowin/fastmcp.git@n8example#subdirectory=examples/smart_home",
+ ],
)
# --- Resources ---