mcs-permission
Consent / permission decorator for the Model Context Standard (MCS).
Provides PermissionDecorator -- a BaseDecorator that gates tool execution
behind a consent callback. Before execute_tool runs, the decorator asks the
client whether the pending tool call (name + arguments) is allowed; on denial it
returns a structured permission_denied result instead of executing.
Installation
pip install mcs-permission
Usage
from mcs.permission.decorator import PermissionDecorator
def ask_user(tool_name, arguments) -> bool:
return input(f"Run {tool_name}? [y/N] ").strip().lower() == "y"
guarded = PermissionDecorator(MyToolDriver(...), consent=ask_user)
orchestrator.add_driver(guarded, label="mail")
It wraps the ToolDriver layer, so the surrounding orchestrator keeps its
process_llm_response loop and calls execute_tool -- the decorator -- beneath
it. Decorators stack: PermissionDecorator(AuthDecorator(RealToolDriver))
checks consent first and handles auth challenges deeper down.
Advertises the "consent" capability and is reachable via
DriverMeta.resolve_capability(driver, SupportsConsent).
License
Apache-2.0
Metadata
Release files for mcs-permission 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcs_permission-0.1.0.tar.gz | 8.4 kB | Without provenance | Details for mcs_permission-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcs_permission-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcs_permission-0.1.0-py3-none-any.whl |
Total release size: 16.2 kB
Release files / mcs_permission-0.1.0.tar.gz
| Download URL | mcs_permission-0.1.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c23fd7ecbbf09bd29e68199b216e1d94a43a46b88949eb41880915a0ce0d8bb
|
|
BLAKE2b-256 checksum How to use checksums |
f2ee7e6d80c386bdeaf0312034bfc58ace74cbeaa4489f85f891f764c668d2ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / mcs_permission-0.1.0-py3-none-any.whl
| Download URL | mcs_permission-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01c85e6f840f40eaae9fdf1245b9d74582c22d28d2a3485c3b83a4ecb0a1d091
|
|
BLAKE2b-256 checksum How to use checksums |
06b2bd9f2ddd54e14735d2762704405fbe6c3141e4bf87d47ea668029ccc327e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for mcs-permission 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.