Skip to main content

Kintsua

PyPI CI License HOL Guard

Self-maintaining integrations for AI agents. Every agent depends on tools it does not own: MCP servers, OpenAPI specs, vendor SDKs. When one of them changes shape, the agent fails mid-task and nothing in your test suite notices, because your tests cover your code, not theirs.

Kintsua watches those upstreams. This repository is the open-source part:

  • kintsua watch, a CLI that snapshots an MCP server's tools/list or an OpenAPI spec into a lockfile you commit, diffs it on every run, classifies the change (breaking, degraded, additive) with reproducible rules, and exits non-zero so CI can block the deploy. Also packaged as a GitHub Action.
  • import kintsua, a runtime SDK under 500 lines that wraps your MCP session or HTTP client and reports schema drift and failed tool calls from production agents. No payloads leave your process.

Both are Apache 2.0 and need Python 3.12+.

pip install kintsua

The hosted service, Kintsua Cloud (a GitHub App that maps your repo's dependencies, opens an issue within an hour of an upstream break and a tested fix PR for the common cases), is a separate closed-source codebase that builds on this package. The CLI's --push flag and the SDK talk to it when you have an account.


Quick start: the CLI

kintsua watch is the MCP/OpenAPI watcher and the rules classifier packaged as a CLI (Apache 2.0). It snapshots a server's tools/list into a lockfile you commit, so a schema change shows up in a PR diff, and it exits non-zero on breaking changes so it can gate a deploy.

pip install kintsua

# snapshot: writes .kintsua/<server>.lock.json (tools, inputSchemas, fingerprints)
kintsua watch snapshot --server https://mcp.vendor.com/mcp
kintsua watch snapshot --server "npx -y @vendor/mcp-server"        # stdio servers work too
kintsua watch snapshot --spec https://api.vendor.com/openapi.json  # OpenAPI 3.x / Swagger 2 / Google discovery

# diff: exit 1 on breaking changes, 0 otherwise; appends to .kintsua/history.jsonl
kintsua watch diff --server https://mcp.vendor.com/mcp
kintsua watch diff --server ... --fail-on degraded --github-action   # CI annotations + step summary
kintsua watch diff --server ... --json                               # the ChangeEvent + classification

# report: Markdown drift report from history.jsonl
kintsua watch report --since 7d

Useful flags: --header K=V (values may use ${VAR}), --auth-env NAME (bearer token from an env var), --env K=V (for stdio servers), --name (lockfile base name), --update (rewrite the lockfile after diffing), --dir (default .kintsua).

--push --repo owner/name --key $KINTSUA_KEY sends the snapshot to a Kintsua Cloud account (see below), so the repo gets issues and fix PRs without CI running.

As a GitHub Action:

- uses: hr7657316/Kintusa-Ai@main
  with:
    server: https://mcp.vendor.com/mcp
    fail-on: breaking

Exit codes: 0 no gate hit, 1 severity at or above --fail-on, 2 usage error or an unreadable lockfile (merge-conflict markers, or a lockfile another server wrote under the same --name), 3 could not connect (auth required, bad URL, server down), 4 no lockfile yet (run snapshot; the GitHub Action does this itself with snapshot-if-missing: true). --auth-env applies to --spec too, sent as Authorization: Bearer.

Exit code semantics are the contract: 0 nothing at or above the gate, 1 a change at or above --fail-on, 2 usage error or an unreadable lockfile, 3 the upstream could not be fetched, 4 no lockfile yet.

Runtime SDK

The SDK sees what tools an agent actually calls and whether they still answer the way they did yesterday. Python only in v0, under 500 lines, one wrapper call, no payloads.

import kintsua

# MCP: wrap any ClientSession from the official mcp package (1.x or 2.x)
session = kintsua.wrap_mcp(session, repo="acme/support-agent", key=KINTSUA_KEY)

# HTTP: wrap an httpx Client/AsyncClient or a requests Session
client = kintsua.wrap_http(httpx.AsyncClient(), repo="acme/support-agent", key=KINTSUA_KEY)

# Frameworks: one-line hooks (no-ops when the framework is not installed)
kintsua.hook_langchain(); kintsua.hook_openai_agents(); kintsua.hook_google_adk()

What it records: per MCP tool a schema_fingerprint (SHA-256 of the canonical inputSchema) compared with the last one stored locally, so a changed schema becomes a schema_mismatch event with the diff; per tools/call the tool name, latency, outcome and error class; per HTTP call host, method, normalised path, status, latency and, on 4xx/5xx, the first 512 bytes of the error body with secrets redacted. Arguments and results are never sent unless you pass sample=True, and then keys only.

Transport: batched every 5 seconds or 100 events to POST /v1/ingest, one retry then drop, never blocks or raises (every public function is wrapped; failures log once at debug level). Configure with kintsua.configure(key=..., repo=..., url=...) or KINTSUA_KEY / KINTSUA_REPO / KINTSUA_URL.

Trust and data boundaries

  • The CLI runs the MCP command or fetches the URL you pass it and nothing else. It writes only to --dir (default .kintsua/).
  • Every URL is network-guarded: localhost, private, link-local and cloud-metadata addresses are refused, each redirect hop is re-checked, and response bodies are size-capped.
  • The SDK sends tool names, latencies, outcomes and schema fingerprints, never arguments or results (keys only with sample=True). Secrets in error bodies, URLs and paths are redacted client-side. Without a key every SDK call is a no-op, and nothing ever raises into the agent.
  • The command-safety extension for this CLI is listed in HOL Guard: snapshot, diff --update and --push are the only state-changing operations and are flagged for review there.

Layout

kintsua/
  cli/        kintsua watch: snapshot, diff, report
  watchers/   base, mcp (+ 1.x/2.x compat), openapi, schemadiff, bounded http
  classify/   the rules classifier, severity schema, rename detection
  core/       canonical change events, network guard, small utilities
  report/     Markdown drift report
  sdk/        wrap_mcp, wrap_http, framework hooks, batched reporter
tests/        unit tests, a golden set of labelled change events, a fixture MCP server
action.yml    the composite GitHub Action

Development

uv sync --all-extras
make test            # unit tests, no network
make test-network    # live checks against real vendor specs and public MCP servers
make lint

Releases: bump version in pyproject.toml, tag vX.Y.Z, push the tag. GitHub Actions publishes to PyPI through trusted publishing.

Licence: Apache 2.0.

Metadata

Release files for kintsua 0.1.1

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

Source distribution (sdist)

Source distribution for kintsua 0.1.1
File Size Uploaded Provenance
kintsua-0.1.1.tar.gz 80.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kintsua 0.1.1
File Interpreter ABI Platform
kintsua-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 171.7 kB

Release files / kintsua-0.1.1.tar.gz

Download URL kintsua-0.1.1.tar.gz
Size 80.0 kB
Tags Source
SHA-256 checksum
How to use checksums
33fba466606531ab4455c2eb6072ad01a0392ae2e5e6948007d0abf3d42093a3
BLAKE2b-256 checksum
How to use checksums
c5e75855a71b0c6d8c9f4aa818121324b087e902a792a603e783cee4d9df6b7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / kintsua-0.1.1-py3-none-any.whl

Download URL kintsua-0.1.1-py3-none-any.whl
Size 91.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4200d5232f02d0c33569fee0282389a56a3af3e362fb24a04e4e2c66e09dfb19
BLAKE2b-256 checksum
How to use checksums
99851a86450efa3d4c777b52805e9c15cc110cce94272b8cf5ed0b4c79a4addb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Security for kintsua 0.1.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kintsua-0.1.1.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 Oct 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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