Agents spending you can trust
Project description
Laissez
Agent spending you can trust.
What you get
- Paid MCP server: Wrap FastMCP tools with
create_paid_mcp_app()so every call flows through Laissez billing. - Paying MCP client: Use
LaissezClientas the HTTP transport for MCP agents so they authenticate and settle usage automatically. - Transparent settlement: Payments are finalized with x402 and appear in the Laissez App dashboard at https://laissez.app.
Set up once
uv sync --group examplesto pull the example dependencies.- Grab a Laissez API key via the CLI wizard when you first run the examples, or from https://laissez.app.
- Export your OpenAI API key (the client agent calls an OpenAI model).
- Optional: add the keys to a
.env; the examples load it withpython-dotenv.
Run the paid MCP server
- Command:
uv run examples/mcp/paid-mcp-server.py - What happens: spins up a FastMCP app on
http://127.0.0.1:8000, generates a temporary wallet, and exposes paid tools (e.g.roll_die,multiply) behind Laissez enforcement.
Run the paying MCP client
- Ensure the server is live or update
BASE_URLinexamples/mcp/mcp-client.pyto point at your deployment. - Command:
uv run examples/mcp/mcp-client.py - What happens: creates a
pydantic_aiagent backed byLaissezClient, pays for two dice rolls plus a multiply call, and prints the result.
Keep exploring
- See
examples/mcp/README.mdfor a deeper walkthrough of the server and client. - Tweak prices, add more tools, or swap in different MCP agents to prototype your own billing flows.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
laissez-0.0.1a3.tar.gz
(245.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
laissez-0.0.1a3-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file laissez-0.0.1a3.tar.gz.
File metadata
- Download URL: laissez-0.0.1a3.tar.gz
- Upload date:
- Size: 245.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5878172b0218fa08735680835c092e29cf9a097580ad2287b872313f4cf39c9a
|
|
| MD5 |
4ca7669605e258ed057ebf03727c0e66
|
|
| BLAKE2b-256 |
3eeed5725d103503f6878e352a57953723397d33f77621821ac9cb85d60f175b
|
File details
Details for the file laissez-0.0.1a3-py3-none-any.whl.
File metadata
- Download URL: laissez-0.0.1a3-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
476f1e95cb5cb7b1f4e70f47277ee8d1dd51dc49f3d76c70b11b58b902d77a58
|
|
| MD5 |
bbb08a8db6077631d91ba6b36acc1ce4
|
|
| BLAKE2b-256 |
6e44f5ae99858b3077bfd19a2357a301f47a6129acd003ddafab7d08f2e3c9f1
|