Skip to main content

Serac Agent SDK — Sovereign E2EE cloud storage for AI agents (Python)

Project description

serac-mcp

Sovereign E2E cloud storage SDK for AI agents — Python edition.

Zero runtime dependencies. Python 3.10+. Uses only stdlib hashlib, hmac, os, urllib.request, json.

Installation

pip install serac-mcp

Quick Start

from serac_mcp import SeracAgent, generate_agent_key_material

# 1. Generate key material (Ed25519 + X25519 + master key)
keys = generate_agent_key_material()

# 2. Self-register a vault
result = SeracAgent.register(
    agent_name="my-agent",
    ed25519_public_key=keys.signing.public_key_b64,
    x25519_public_key=keys.encryption.public_key_b64,
    encrypted_master_key=keys.encrypted_master_key,
    master_key_nonce=keys.master_key_nonce,
    key_commitment=keys.key_commitment,
)
agent = result["agent"]
vault_id = result["vault_id"]

# 3. Store encrypted data
from serac_mcp import derive_namespace_key, encrypt_aes256_gcm
ns_key = derive_namespace_key(keys.master_key, "memory")
encrypted = encrypt_aes256_gcm('{"role": "assistant", "content": "Hello"}', ns_key)
agent.store("memory", "greeting", encrypted.ciphertext_b64)

# 4. Retrieve
agent.retrieve("memory", "greeting")

# 5. List
agent.list("memory")

# 6. Delete
agent.delete("memory", "greeting")

# 7. Check quota
agent.quota()

Authentication

Two methods:

  1. API Key (quick start): SeracAgent.from_api_key("sk_serac_...")
  2. Ed25519 Challenge-Response (session renewal): Automatic JWT renewal

V2 Tools (Preview)

# Share with another agent
agent.share("memory", "prefs", target_x25519_pubkey, permission="read")

# Cryptographic attestation
agent.attest("memory", "prefs")

# Archive to Glacier
agent.archive("memory", "old-data")

Crypto Module

All E2EE primitives available standalone — no external dependencies:

Function Description
generate_ed25519_keypair() Ed25519 signing keypair
generate_x25519_keypair() X25519 encryption keypair
generate_agent_key_material() Full agent keygen
encrypt_aes256_gcm(plaintext, key) AES-256-GCM encrypt
decrypt_aes256_gcm(enc, key) AES-256-GCM decrypt
derive_namespace_key(master_key, name) HKDF-SHA256 namespace key
seal_with_public_key(plaintext, pubkey_der) X25519 sealed box
unseal_with_private_key(sealed_b64, privkey_b64) Open sealed box
sign_ed25519(data, privkey_b64) Ed25519 sign
verify_ed25519(data, sig_b64, pubkey_b64) Ed25519 verify
sha256_hash(data) SHA-256 hash

MCP Configuration

Add to your agent config:

mcp_servers:
  serac:
    url: "https://serac.cloud/api/agent/mcp/v1"
    headers:
      Authorization: "Bearer sk_serac_your_api_key"

Pricing

Tier Storage Price
Agent Free 5 GB €0
Agent Starter 100 GB €3.99/mo
Agent Pro 500 GB €9.99/mo
Agent Fleet 2 TB €29.99/mo

Automatic tiering (hot → warm → cold → Glacier) for cost optimization.

Interop

The Python SDK (serac-mcp) and TypeScript SDK (serac-agent-sdk) use identical crypto primitives:

  • Ed25519 for signing
  • X25519 for encryption
  • AES-256-GCM with HKDF-SHA256 for namespace key derivation
  • Sealed box format: ephPubKey(DER) || iv(12) || tag(16) || ciphertext

Cross-SDK test vectors verified (ADR-001 §10).

License

MIT © Serac

Project details


Download files

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

Source Distribution

serac_mcp-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

serac_mcp-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: serac_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for serac_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d07df62d0ab0923010614ab97a67c1f3d769cca532d83670d9ffeb5a805277e
MD5 81ed312d7f72b9d90a6f57032bb156e9
BLAKE2b-256 95efd81e9ca96854fb32a149401316697d85d4e19ad32fae716e0d18d9bb2d34

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on AikoGilpin/serac-agents

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

File details

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

File metadata

  • Download URL: serac_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for serac_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adcf38cc23ee7cb60d1b0c6a514690a2ecbd021c65a4ec3b275ff600cba1f00d
MD5 a047f13f6547974ff3b95155e04aeca9
BLAKE2b-256 82453ad042ee221c789d8ef6c3b74e4af421848f8b0747ba85ddab61f72eb77e

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on AikoGilpin/serac-agents

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page