Cavi MCP Core
Build the interesting part.
Build your application's tools on a shared foundation. Cavi MCP Core extends the Python MCP server with typed result and error contracts, workspace and file utilities, and bounded process handling, so you can spend more time on what your tools do.
Install
Requires Python 3.15 or later with uv.
uv add cavi-mcp-core
Quickstart
from cavi_mcp_core.contracts import Result
from cavi_mcp_core.server import READ_ONLY, Server
mcp = Server("status-example", package="cavi-mcp-core", instructions="Read readiness.")
class Status(Result):
ready: bool
@mcp.tool(annotations=READ_ONLY)
async def status() -> Status:
"""Report readiness."""
return Status(ready=True)
if __name__ == "__main__":
mcp.run(transport="stdio")
From a checkout, uv run --locked python examples/inspect_status.py starts the example server over
stdio, calls status and prints {"ready": true}. The
quickstart walks through it.
Shared foundations
- Give tool callers consistent typed results and structured failures.
- Work with workspace paths, bounded files and private operation records.
- Run and supervise local processes with bounded output and deadlines.
Blender MCP, Substance MCP, Houdini MCP, Adobe MCP, Premiere MCP and After Effects MCP depend on Core.
Module reference
| Module | What it provides |
|---|---|
server |
Server, the READ_ONLY, WRITES and DESTRUCTIVE annotations, need and reject_foreign. |
contracts |
Result, VariantResult, OperationRejected, OperationUnknown and failure. |
schema |
Compact tool schemas and variant-shape validation. |
schema_refs |
Local $ref handling behind schema. |
workspace |
The workspace root and the input and output path rules. |
files |
Workspace-confined, bounded file reads and JSON parsing. |
journal |
Atomic private JSON records and completion receipts. |
media |
Animation frame receipts, the bounded command that fills one, and PNG image results. Needs cavi-mcp-core[media]. |
lock |
A cross-process file lock, re-entrant in the holding thread. |
apps |
Installed application discovery, command-line programs, versions and running processes. |
proc |
Bounded subprocesses that stop the whole process group. |
owned_exec |
Launch registration with a process owner. |
supervision |
One supervised command with checked process groups and limits. |
resident |
A supervised command that outlives its caller. |
retirement |
Helper cleanup before a worker publishes. |
processes |
Checked process identities and group cleanup. |
sampling |
Read-only macOS process census, identities and RSS. |
Results and errors
Every tool error returns one structured result:
{"error": {"version": 1, "code": "INVALID_ARGUMENT", "operation": "status",
"outcome": "rejected", "retry_safe": false, "next_action": "inspect_inputs"}}
outcome is rejected only when nothing happened; anything else is unknown, and retry_safe is
always false. Results and errors lists the
codes and which exception a tool raises before and after it acts. Servers link to that page instead of
restating it.
Documentation
The documentation source is in docs/mcp-core/source:
- Overview, installation and quickstart
- Guides: write a server, workspaces, files and journals, applications, processes, process supervision and process inspection
- Reference: results and errors, schemas, configuration and testing
- Security model and version and support
Configuration
| Variable | Meaning |
|---|---|
CAVI_MCP_PROCESS_OWNER |
A private owner configuration file; when set, proc.run registers every command with that owner before it runs. |
Every other variable, such as a workspace root or an application override, is named by the server that uses the library.
Security
The library opens no network port, sends no telemetry and uses no accounts. Tool arguments are closed, paths are confined to the workspace, and an unexpected exception keeps its details on the server. See the security model and SECURITY.md.
Contributing
See CONTRIBUTING.md for setup, checks and the rules for changes. This project follows the Code of Conduct.
License
MIT. See LICENSE.
Metadata
Release files for cavi-mcp-core 0.1.8
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 |
|---|---|---|---|---|
| cavi_mcp_core-0.1.8.tar.gz | 97.1 kB | With provenance | Details for cavi_mcp_core-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cavi_mcp_core-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for cavi_mcp_core-0.1.8-py3-none-any.whl |
Total release size: 152.9 kB
Release files / cavi_mcp_core-0.1.8.tar.gz
| Download URL | cavi_mcp_core-0.1.8.tar.gz |
|---|---|
| Size | 97.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd3e1fc260748969ee805d86146f9a3b93f48ee18afc62a4e9704ab163308589
|
|
BLAKE2b-256 checksum How to use checksums |
2386714874acaee04cf186ee1c8cf234d538b1c7d6ef437b69daa9300a297895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / cavi_mcp_core-0.1.8-py3-none-any.whl
| Download URL | cavi_mcp_core-0.1.8-py3-none-any.whl |
|---|---|
| Size | 55.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c902e9ad907c987b1b677030c32a96bac165f0bac593cc93e0304c22b770fc7
|
|
BLAKE2b-256 checksum How to use checksums |
88fae53b26be600ee206a6c0f70ea7ad7266730182fccb1080a6ca205f9d6b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for cavi-mcp-core 0.1.8
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cavi_mcp_core-0.1.8.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA 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.