Thanks for your interest in contributing. This repository is a monorepo publishing three packages to PyPI:
| PyPI dist | Import | Directory |
|---|---|---|
authplane-sdk |
authplane |
authplane/ |
authplane-mcp |
authplane_mcp |
authplane-mcp/ |
authplane-fastmcp |
authplane_fastmcp |
authplane-fastmcp/ |
Adapters depend on authplane-sdk. A single tagged release publishes all three.
- Bugs: open a bug report. Include package name, version, Python version, and a minimal reproduction.
- MCP client compatibility: use the MCP Compatibility Report template.
- Feature requests: open a feature request. Describe the problem, then the proposed solution.
- Security vulnerabilities: do not open a public issue. See SECURITY.md.
- Python 3.11, 3.12, or 3.13
git- A virtual environment tool (
python -m venv,uv, or similar)
Clone the repo and install the root SDK with dev extras:
git clone https://github.com/AuthPlane/python-sdk.git
cd python-sdk
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"If you plan to work on an adapter, also install it editable:
pip install -e "authplane-mcp[dev]"
pip install -e "authplane-fastmcp[dev]"Adapters depend on authplane-sdk as a PyPI dep, so the root install above must happen first for editable cross-linking.
Run the same checks CI runs before opening a PR.
Lint and format:
ruff check .
ruff format --check .Use ruff format . to auto-fix formatting. Use ruff check --fix . for safe autofixes.
Type-check (SDK root only):
pyrightThe adapters don't run pyright in CI today; treat any type errors they surface as advisory.
Tests:
pytest tests # root SDK
(cd authplane-mcp && pytest tests) # MCP adapter
(cd authplane-fastmcp && pytest tests) # FastMCP adapterConformance tests (shared catalog required):
The conformance suite in conformance-tests/ validates the SDK against the shared OAuth SDK Conformance Catalog, which lives in AuthPlane/conformance. Clone that repo as a sibling of your python-sdk/ clone:
# From the directory that contains your python-sdk/ clone
git clone https://github.com/AuthPlane/conformance.gitExpected layout:
parent-dir/
├── python-sdk/
└── conformance/
└── oauth-sdk-conformance-catalog.yaml
Then run:
pytest conformance-tests/conformance-tests/conftest.py resolves the catalog at ../conformance/oauth-sdk-conformance-catalog.yaml by default. Set AUTHPLANE_CONFORMANCE_CATALOG=/absolute/path/to/oauth-sdk-conformance-catalog.yaml to override (useful if your checkout layout differs). Without the catalog, conformance-tests/ fails with a clear error — the rest of the test suite still runs.
Coverage (matches CI):
coverage run -m pytest tests && coverage reportCoverage fails below 80% — see pyproject.toml → [tool.coverage.report] fail_under.
Package build smoke test:
python -m build
twine check dist/*- Branch off
main. Release branches (release/v*,hotfix/v*) are managed by the release flow — see RELEASE_POLICY.md. - PR titles follow Conventional Commits:
feat:,fix:,docs:,ci:,deps:,refactor:,test:,chore:. - Link any related GitHub issue in the PR description (e.g.,
Fixes #123). - Fill out the PR template (summary, testing, checklist).
- Keep PRs focused. Large, multi-theme PRs are hard to review and easy to stall.
User-facing changes go in CHANGELOG.md under the [Unreleased] heading. Follow the Keep a Changelog format. Release tooling moves entries from [Unreleased] to the release version on tag.
All workflow actions must be SHA-pinned with a version comment:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2When editing or adding a workflow, run pinact to pin any new uses: lines before committing:
pinact runDependabot opens weekly PRs to bump the SHAs (see .github/dependabot.yml).
Releases follow a single-branch flow driven by the release workflow: release/v* (or hotfix/v*) branches are cut off the default branch, tagged in place, then deleted after the tag is pushed. The detailed procedure lives in RELEASE_POLICY.md and RELEASE_SETUP.md. As a contributor you don't need to trigger releases — maintainers handle them.
The end-to-end demo exercises FastMCP and MCP adapters against a local Authplane authorization server.
Prerequisites:
- OAuth server running locally on
:9000/:9001with client credentials, token exchange, and DPoP enabled. - Demo client registration with required grant types and scopes.
- Adapter demo server (
authplane-fastmcp/demo/run.shorauthplane-mcp/demo/run.sh). - Demo client execution (Python or TypeScript matrix client).
Entry points:
authplane-fastmcp/demo/run.shauthplane-mcp/demo/run.sh
Helper scripts in scripts/ boot a local authserver and run a smoke check:
# Start local authserver and register client/scopes/user.
bash scripts/manual-e2e-setup.sh
# Smoke against the MCP adapter (default).
bash scripts/manual-e2e-smoke.sh --skip-setup
# Smoke against the FastMCP adapter.
bash scripts/manual-e2e-smoke.sh --adapter fastmcp --skip-setupOptional overrides:
AUTHSERVER_DIR=/path/to/authserverISSUER_URL=http://localhost:9000RESOURCE_URL=http://localhost:8080/mcp
client_credentials grant is not enabled— OAuth server is missingAUTHPLANE_CLIENT_CREDENTIALS_ENABLED=true.client is not authorized for this grant type— client registration is missingurn:ietf:params:oauth:grant-type:token-exchange.requested scope is invalid or not allowed— requested scopes are not registered or assigned to the demo client.invalid API key— admin API requests are using a different key than the server startup key.
Be kind. Disagree on substance, not people. Projects that aren't kind don't last.