Skip to main content

Cavi MCP Core

A beaver supports a workbench while a hedgehog builds a clockwork dragonfly

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.

PyPI version PyPI weekly downloads License: MIT

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:

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.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cavi-mcp-core 0.1.7
File Size Uploaded Provenance Actions
cavi_mcp_core-0.1.7.tar.gz 96.1 kB With provenance Details for cavi_mcp_core-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cavi-mcp-core 0.1.7
File Interpreter ABI Platform Actions
cavi_mcp_core-0.1.7-py3-none-any.whl Python 3 none any Details for cavi_mcp_core-0.1.7-py3-none-any.whl

Total release size: 151.3 kB

Release files / cavi_mcp_core-0.1.7.tar.gz

Download URL cavi_mcp_core-0.1.7.tar.gz
Size 96.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c9d99203e7259cbd9c610991769a90dd806f52a06c6cb8d616fe1b9cf745b8d0
BLAKE2b-256 checksum
How to use checksums
8732dca1f82ab37dcc20eb6bc8d751e02bfeeef3459b7513f0b4903ffc6858e1
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 log

Release files / cavi_mcp_core-0.1.7-py3-none-any.whl

Download URL cavi_mcp_core-0.1.7-py3-none-any.whl
Size 55.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b72625cdb24791159f09d7cd06e7e52db8255111898de254113da10a74508362
BLAKE2b-256 checksum
How to use checksums
6a2fd5962b1c4b4509ab6fb279bb9755aa1b91b5da412af95c2b3a59b0bc4fb4
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 log

Security for cavi-mcp-core 0.1.7

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.

Select from 2 files

Attestation for cavi_mcp_core-0.1.7.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 log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page