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.1a4.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.1a4-py3-none-any.whl
(10.4 kB
view details)
File details
Details for the file laissez-0.0.1a4.tar.gz.
File metadata
- Download URL: laissez-0.0.1a4.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 |
b4c25cd68e6e89c34f21357c75950bfe1cbd523355e5ff32a350a7114abd3318
|
|
| MD5 |
52de23b86d6278b930855beb1c5ea809
|
|
| BLAKE2b-256 |
41d49ce7ed9f25e0374fa7f5a386709174e2d67210ae6af5938d5d2919e3f5b4
|
File details
Details for the file laissez-0.0.1a4-py3-none-any.whl.
File metadata
- Download URL: laissez-0.0.1a4-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 |
3f2a8b1de3d41b92d885bec3a44d853a2e2d4f816556176ee430599d6ed86c2e
|
|
| MD5 |
bd0f73dec318d1e0f0533fc02b89bbb8
|
|
| BLAKE2b-256 |
7690209566f2a09b53004310925313b81f7a63f44e016c996a19b128a9f8f0e8
|