Metadata-Version: 2.5
Name: lane-mcp-auth
Version: 1.3.1
Summary: OAuth 2.1 resource server and consent gate for an MCP server behind Lane. FastMCP-friendly.
Project-URL: Homepage, https://github.com/Lane-Technologies-Inc/lane-mcp-auth
Project-URL: Source, https://github.com/Lane-Technologies-Inc/lane-mcp-auth
License: MIT
License-File: LICENSE
Keywords: fastmcp,mcp,model-context-protocol,oauth,oauth2,rfc8693,rfc9728
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: pyjwt[crypto]>=2.8
Provides-Extra: fastmcp
Requires-Dist: fastmcp<5,>=4.0; extra == 'fastmcp'
Description-Content-Type: text/markdown

# lane-mcp-auth

Add Lane sign-in, tool permissions, and user-approved purchases to an MCP server.

## Install and register

```sh
pip install "lane-mcp-auth[fastmcp]"
python -m lane_mcp_auth setup https://acme.com/mcp --name="Acme shop"
```

Replace the URL with your public MCP endpoint. Setup writes `.env` with the server credentials. The library also needs `LANE_ORG_KEY`, even for free tools. Keep that file out of version control.

Use Node.js 22.22.2 or later for TypeScript, or Python 3.10 or later with FastMCP 4.

## Run a server

Follow the complete [FastMCP](https://docs.getonlane.com/sell/auth/framework-integration?framework=fastmcp) guide for configuration, a protected tool, a startup command, and an HTTP check.

Use an [in-memory connection store](https://docs.getonlane.com/sell/auth/connections#in-memory) for one process. Use [PostgreSQL](https://docs.getonlane.com/sell/auth/connections#postgresql) for multiple processes or registrations that must survive a restart.

## Add capabilities

- [Scopes](https://docs.getonlane.com/sell/auth/scopes): require permission before a tool runs.
- [Guest access](https://docs.getonlane.com/sell/auth/how-guest-access-works): open selected read tools without sign-in.
- [Claims](https://docs.getonlane.com/sell/auth/claims): read the buyer's shared details.
- [Payments](https://docs.getonlane.com/sell/auth/payments): propose a purchase for the user to approve.
- [Plan events](https://docs.getonlane.com/sell/auth/plan-events): handle results and release reservations.
- [API reference](https://docs.getonlane.com/api-reference/mcp-auth): options, methods, types, and errors.
