liberrex-mcp-client (Python)
Call the tools of other platforms on the Liberrex MCP mesh (Liberrex AI, Animatoria, the ERP…) from async or sync
code, and hand them to an LLM as function-calling tools. Implements the mesh conventions; the
other side is liberrex-mcp-server. TypeScript equivalent:
@liberrex/mcp-client.
pip install liberrex-mcp-client
Configure the platforms you call
LIBERREX_MCP_PLATFORM=animatoria # this platform's own name (trace origin)
LIBERREX_MCP_PLATFORMS='{"liberrex-ai": {"url": "https://ai-api.liberrex.com/mcp", "key": "lxp_…"},
"erp": {"url": "https://erp.acme.tn/mcp", "key": "lxp_…", "timeout": 20}}'
Each platform issues your key (liberrex-mcp-server new-key <your-name>) and lists you in its LIBERREX_MCP_PEERS.
Keys are secrets: keep them server-side.
Call tools
from liberrex_mcp_client import Identity, Mesh, PlatformToolError
mesh = Mesh.from_env()
sara = Identity(user_id="42", tenant_id="biat", roles=("sales.read",), locale="fr") # the signed-in user
recs = await mesh.call("liberrex-ai", "sales_recommendations",
{"mode": "next_best_product", "context": {"record": {"type": "Customer", "id": "C-118"}}},
identity=sara)
try:
mesh.call_sync("erp", "send_reminder", {"invoice_id": "F-1024"}, identity=sara) # Flask, Celery, scripts
except PlatformToolError as error:
if error.code == "writes_disabled": ...
- The identity is the signed-in person, set by your code and never by a model. The called platform applies that person's permissions.
PlatformToolError.codeis a mesh code:forbidden,not_found,identity_required,tenant_not_allowed,writes_disabled,rate_limited…PlatformUnavailablemeans the platform was unreachable or refused the key.list_tools(name)is cached for 5 minutes. EachRemoteToolcarriesinput_schema,write,permissionandcategory.- Inside a platform tool, pass
meta=ctx.forward_meta()instead ofidentityto keep the trace across platforms.
Give the tools to an LLM
from liberrex_mcp_client import anthropic_tools, openai_tools, route
tools = await mesh.list_tools("animatoria")
specs = anthropic_tools([t for t in tools if not t.write]) # names: animatoria__production_ranking
platform, tool = route(call.name, tools) # back to ("animatoria", "production_ranking")
result = await mesh.call(platform, tool, call.input, identity=sara)
Get a human's approval before you run a write tool.
Development
.venv/bin/pytest # the end-to-end tests live with the server package (sdk/mcp-server/python/tests)
Metadata
Release files for liberrex-mcp-client 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 |
|---|---|---|---|---|
| liberrex_mcp_client-0.1.0.tar.gz | 11.0 kB | Without provenance | Details for liberrex_mcp_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liberrex_mcp_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for liberrex_mcp_client-0.1.0-py3-none-any.whl |
Total release size: 21.6 kB
Release files / liberrex_mcp_client-0.1.0.tar.gz
| Download URL | liberrex_mcp_client-0.1.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5e20b93aef4a2bdf4a321f91d7804b3292a76f33f44b162c3bfb017ae91e6b8
|
|
BLAKE2b-256 checksum How to use checksums |
240b266b55980ae4babb310887a9f86aacc079ab51114c18128577d147a7006a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / liberrex_mcp_client-0.1.0-py3-none-any.whl
| Download URL | liberrex_mcp_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a30b7c98b6561159c4bd005b617ebace864d7443bb1eab1ab4909e3e6da8412c
|
|
BLAKE2b-256 checksum How to use checksums |
1df4a320909779892c944d512c79784a44744d9793672d5a5cc121df51561f7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for liberrex-mcp-client 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.