Skip to main content

OCTAVE MCP Server - Lenient-to-Canonical OCTAVE pipeline with schema validation and generative holographic contracts

Project description

OCTAVE MCP Server

License Python 3.11+ Tests Coverage

Production-grade MCP server implementing the OCTAVE v6 document protocol: Generative Holographic Contracts.

Table of Contents


For AI Agents

===AGENT_BOOTSTRAP===
META:
  TYPE::BOOTSTRAP
  VERSION::"6.0"
  CONTRACT::HOLOGRAPHIC[
    VALIDATION::JIT_GRAMMAR
    ANCHOR::HERMETIC
  ]

GUIDANCE::AGENTS.oct.md
QUALITY_GATES::[mypy,ruff,black,pytest]
DEV_SETUP::docs/guides/development-setup.md
SPECS::src/octave_mcp/resources/specs/
SKILLS::src/octave_mcp/resources/skills/
PRIMERS::src/octave_mcp/resources/primers/
IMMUTABLES::[I1,I2,I3,I4,I5]
===END===

What It Does

This repository ships the OCTAVE MCP Server (v0.4.0)—a Model Context Protocol implementation that transforms OCTAVE documents from passive text into Generative Holographic Contracts.

OCTAVE (Olympian Common Text And Vocabulary Engine) is a deterministic document format and control plane for LLM systems. It keeps meaning durable when text is compressed, routed between agents, or projected into different views.

Core Philosophy: Validation Precedes Generation Instead of checking if an LLM wrote a valid document after the fact, OCTAVE v6 compiles the document's META block into a strict grammar (Regex/GBNF) that constrains the LLM's output generation. It is structurally impossible to generate invalid syntax.

  • Generative Constraints: META.CONTRACT compiles to regex/grammar for LLM guidance.
  • Holographic Sovereignty: The document defines its own schema laws inline.
  • Hermetic Anchoring: No network calls in the hot path. Standards are frozen or local.
  • Auditable Loss: Compression tiers declared in META (LOSSLESS, AGGRESSIVE).

Language, operators, and readability

  • Syntax: Unicode-first operators (, , , , , , §) with ASCII aliases.
  • Vocabulary: Mythological terms as semantic compression shorthands.
  • Authoring: Humans write in the lenient view; tools normalize to canonical Unicode.

See the protocol specs in specs/ for v6.0.0 rules.

What this server provides

octave-mcp bundles the OCTAVE tooling as MCP tools and a CLI.

  • 3 MCP tools: octave_validate, octave_write, octave_eject
  • Generative Engine: Compiles constraints to grammars (debug_grammar=True).
  • Hermetic Hydrator: Resolves standards without network dependency.

When OCTAVE Helps

Use OCTAVE when documents must survive multiple agent/tool hops, repeated compression, or auditing:

  • Self-Validating Agents: Agents that define their own output grammar.
  • Coordination Briefs: Decision logs that circulate between agents.
  • Compressed Context: Reusable prompts needing stable structure (54–68% token reduction).

Installation

PyPI:

pip install octave-mcp
# or
uv pip install octave-mcp

From source:

git clone https://github.com/elevanaltd/octave-mcp.git
cd octave-mcp
uv pip install -e ".[dev]"

Quick Start

CLI

# Validate and normalize (v6 auto-detection)
octave validate document.oct.md

# Write with validation (from content)
echo "===DOC===\nMETA:\n  TYPE::LOG\n  CONTRACT::GRAMMAR[...]\n..." | octave write output.oct.md --stdin

# Project to a view/format
octave eject document.oct.md --mode executive --format markdown

MCP Setup

Add to Claude Desktop (claude_desktop_config.json) or Claude Code (~/.claude.json):

{
  "mcpServers": {
    "octave": {
      "command": "octave-mcp-server"
    }
  }
}

MCP Tools

Tool Purpose
octave_validate Schema validation + Grammar Compilation (debug_grammar=True)
octave_write Unified file creation/modification (content OR delta changes)
octave_eject Format projection (octave, json, yaml, markdown)

Generative Holographic Contracts (v6)

OCTAVE v6 introduces the Holographic Contract:

  1. Read META: The parser reads the META block first.
  2. Compile Grammar: It compiles the constraints (REQ, ENUM, REGEX) into a generative grammar.
  3. Generate/Validate: The body is generated/validated against this bespoke grammar.

Documentation

Doc Content
Usage Guide CLI, MCP, and API examples
API Reference Python API documentation
MCP Configuration Client setup and integration
Protocol Specs v6.0.0 Generative Holographic Specs
Development Setup Dev environment, testing, quality gates
Architecture Decision records and design docs
Research Benchmarks and validation studies

Architecture Immutables

ID Principle
I1 Syntactic Fidelity — normalization alters syntax, never semantics
I2 Deterministic Absence — distinguish absent vs null vs default
I3 Mirror Constraint — reflect only what's present, create nothing
I4 Transform Auditability — log every transformation with stable IDs
I5 Schema Sovereignty — validation status visible in output

Contributing

See CONTRIBUTING.md for development setup, testing, and guidelines.

# Quick dev setup
git clone https://github.com/elevanaltd/octave-mcp.git
cd octave-mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"

# Run tests
pytest

# Quality checks
ruff check src tests && mypy src && black --check src tests

License

Apache-2.0 — Built with MCP Python SDK.

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

octave_mcp-0.5.0.tar.gz (146.0 kB view details)

Uploaded Source

Built Distribution

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

octave_mcp-0.5.0-py3-none-any.whl (169.0 kB view details)

Uploaded Python 3

File details

Details for the file octave_mcp-0.5.0.tar.gz.

File metadata

  • Download URL: octave_mcp-0.5.0.tar.gz
  • Upload date:
  • Size: 146.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for octave_mcp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0e0ed3adf90ddfcae4c701d96fb419be74f696d1596c2cdfaec5fef108b62096
MD5 2641616f3a4154d6333b03391195dc1e
BLAKE2b-256 37d1dac9915e85d90a7c975638d165b787bba9adb8f5ceb5e8a54adf75438ae9

See more details on using hashes here.

Provenance

The following attestation bundles were made for octave_mcp-0.5.0.tar.gz:

Publisher: publish.yml on elevanaltd/octave-mcp

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

File details

Details for the file octave_mcp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: octave_mcp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 169.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for octave_mcp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a56b6f5613a540c96adde21a8f4aa05fa5c8d8b3a640729d64f25c98b904bfc6
MD5 ca8ba81b87b14e25c34555c60f636b7c
BLAKE2b-256 291f2bf904c08e5ced9deb6e858f44c71354f429a939839ac812a65ffcd14e20

See more details on using hashes here.

Provenance

The following attestation bundles were made for octave_mcp-0.5.0-py3-none-any.whl:

Publisher: publish.yml on elevanaltd/octave-mcp

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