Skip to main content

tesseron (Python)

The Python SDK lives at Eigenwise/tesseron-python. The Tesseron hub owns the protocol, docs, and issues.

The Python implementation of the Tesseron host protocol. Your application listens on loopback, the MCP gateway dials in, and the agent gets typed actions and readable resources instead of a scraper.

Speaks protocol 1.2.0. Compatibility is decided by protocol version, never by matching package numbers: see the compatibility contract.

Not on PyPI yet.

Install

uv add tesseron

Python 3.11 or newer. The only runtime dependencies are Pydantic v2 and websockets.

A first action

import asyncio

from pydantic import BaseModel, Field
from tesseron import ActionContext, TesseronApp

app = TesseronApp(id="todo", name="Todo", origin="http://127.0.0.1")


class AddTodo(BaseModel):
    text: str = Field(min_length=1)
    tag: str | None = None


@app.action("addTodo", description="Add one todo")
async def add_todo(input: AddTodo, context: ActionContext) -> dict[str, object]:
    await context.progress(percent=100, message="saved")
    return {"id": "1", "text": input.text, "done": False, "tag": input.tag}


async def main() -> None:
    host = await app.listen()
    print(host.url)
    await asyncio.Event().wait()


asyncio.run(main())

The input type comes from the handler annotation. Its validation-mode JSON Schema is what the manifest publishes, and model_validate is what rejects bad input with -32004 before the handler body runs.

What it covers

Handshake and claiming, session resume with in-memory token rotation, action invocation with validation, cancellation, timeouts, progress, sampling, confirmation, schema-checked elicitation, structured logs, and resources with reads, subscriptions, and pushes.

Gateway-minted claims only. WebSocket only: no Unix domain sockets and no host-minted bind in this release, so the conformance suite skips those fixtures honestly.

Examples

From the repo root, run the headless todo app with:

uv run --locked --directory sdks/python python -m examples.todo

Run the prompt library with:

uv run --locked --directory sdks/python python -m examples.prompts

Each prints a claim code after the gateway connects. In Claude Code with the Tesseron plugin loaded, ask Claude to claim that code, then call the actions. The todo app includes the canonical todos://all resource and the prompt app includes library and lastTest resources.

Validate both examples against the real gateway with pnpm example:python:e2e.

Development

Run everything from this directory:

uv sync --locked
uv run ruff check .
uv run ruff format --check .
uv run mypy --strict src tests
uv run pytest
uv build

The conformance host lives in conformance_host/, beside the package rather than inside it, so the published wheel carries the SDK and nothing else. See the conformance page for how the runner drives it.

Documentation

License

Tesseron is licensed under the Business Source License 1.1. Each release auto-converts to Apache-2.0, the Change License, four years after publication.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tesseron-0.1.0.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tesseron-0.1.0-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file tesseron-0.1.0.tar.gz.

File metadata

  • Download URL: tesseron-0.1.0.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tesseron-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0701f15b9c3a2c86454bbacb58a66c83a15b98da571ff8e07e70cf3c144c105
MD5 d95a03f3673159d8476036e03e1a12ab
BLAKE2b-256 2942fb47532356719774c739f83660ebb3ce4faf3eed3ddb41ded9a1b8e7471d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tesseron-0.1.0.tar.gz:

Publisher: release.yml on Eigenwise/tesseron-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tesseron-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tesseron-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for tesseron-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71745ab8f8fb6aa94a3da07c9b6095ba88b5c47afbbdb708b24f6ab73c813ef6
MD5 80f5ea45b738a20e00e299757093384f
BLAKE2b-256 c0920497506d18972b9812019a315ae1e2bfd1bc63becbbb881839f0d87501c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tesseron-0.1.0-py3-none-any.whl:

Publisher: release.yml on Eigenwise/tesseron-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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