fix: add examples as workspace members for standalone execution#93
Merged
Larry-Osakwe merged 7 commits intomainfrom Apr 6, 2026
Merged
fix: add examples as workspace members for standalone execution#93Larry-Osakwe merged 7 commits intomainfrom
Larry-Osakwe merged 7 commits intomainfrom
Conversation
Running `uv run python main.py` from an example directory failed because examples were not workspace members. Their editable path loaded the parent package pyproject which has `workspace = true` sources, but those only resolve within the workspace context. Adding `packages/*/examples/*` to workspace members fixes this for all 9 examples across mcp-fastmcp, mcp, oauth, and agents.
Two delegated_access examples (mcp-fastmcp and mcp) were both named delegated-access-example, causing uv workspace member name collision. Renamed to delegated-access-fastmcp-example and delegated-access-lowlevel-example.
Package-level [tool.uv.sources] with `workspace = true` caused failures when examples resolved deps via editable paths — uv loaded the package pyproject outside the workspace context and could not resolve the workspace references. The root pyproject.toml already declares all workspace sources, so package-level declarations were redundant. Removing them lets examples run directly from their directory with `uv run python main.py`.
…er README Incorporates improvements from Sean's PR #94: - Support KEYCARD_ZONE_URL in addition to KEYCARD_ZONE_ID - Remove hardcoded fallback values for credentials - Streamline README install/run steps - Add note for local SDK development workflow
The workspace fix makes examples resolve against local source by default — no need for a separate root-level command.
The test suite imports the example without env vars set. Removing the fallback defaults caused ClientSecret to receive None, failing the client_id validation.
Sean's improvement removed the explicit zone_id parameter, relying on AuthProvider's internal env var discovery. But the test suite imports the example without env vars, so AuthProvider raises AuthProviderConfigurationError. Restore the fallback default.
Fitzse
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes examples so they can be run directly from their directory with
uv run python main.py.Before
After
What changed
Remove redundant
[tool.uv.sources]frompackages/mcp-fastmcp/pyproject.tomlandpackages/mcp/pyproject.toml— these declaredworkspace = truefor sibling packages, which broke resolution when uv loaded them via editable paths outside the workspace context. The rootpyproject.tomlalready declares all workspace sources.Add
packages/*/examples/*to workspace members in the rootpyproject.tomlso examples participate in workspace resolution.Disambiguate duplicate example names — two
delegated-access-exampleprojects across mcp and mcp-fastmcp caused a workspace name collision.Improve delegated_access example (from Sean's Fix delegated_access example project and support Zone URL #94) — adds
KEYCARD_ZONE_URLsupport, streamlines README.Tested all 9 examples locally — all resolve and import successfully from their own directory.
Test plan
uv run python main.pyuv syncstill resolves correctly