OCTAVE MCP Server - Lenient-to-Canonical OCTAVE pipeline with schema validation and generative holographic contracts
Project description
OCTAVE MCP Server
Production-grade MCP server implementing the OCTAVE document protocol for deterministic, auditable AI communication.
Table of Contents
- For AI Agents
- What It Does
- Quick Start
- Installation
- MCP Tools
- When OCTAVE Helps
- Documentation
- Contributing
For AI Agents
===AGENT_BOOTSTRAP===
GUIDANCE::AGENTS.oct.md
QUALITY_GATES::[mypy,ruff,black,pytest]
DEV_SETUP::docs/guides/development-setup.md
SPECS::specs/README.oct.md
IMMUTABLES::[I1,I2,I3,I4,I5]
===END===
What It Does
This repository ships the OCTAVE MCP Server—a Model Context Protocol implementation that exposes the OCTAVE document protocol as deterministic tools. The MCP layer is delivery plumbing; the value is the OCTAVE protocol itself.
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.
- Non-reasoning: OCTAVE never guesses intent; it only accepts, validates, and projects what you declare.
- Lenient → canonical: ASCII aliases and flexible whitespace are accepted on ingest, then normalized to canonical Unicode with a logged repair tier.
- Schema-anchored: Data and schema blocks travel together so routing and validation remain explicit.
- Auditable loss: Compression and projections must declare what was dropped; nothing is silently tightened or weakened.
Language, operators, and readability
- Syntax: Unicode-first operators (
→,⊕,⧺,⇌,∨,∧,§) with ASCII aliases (->,+,~,vs,|,&,§) keep documents compact while staying typable everywhere. - Vocabulary: Mythological terms are deliberate compression shorthands (e.g.,
ICARIAN,SISYPHEAN,HUBRIS→NEMESIS) that pack multiple related concepts into single tokens for higher semantic density. - Authoring: Humans typically write in the lenient view and rely on
octave validateto normalize into canonical Unicode; both views stay human-auditable.
See the protocol specs in specs/ for the precise operators, envelopes, and schema rules (v5.1.0).
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 - CLI commands:
octave validate,octave write,octave eject - Deterministic: Non-reasoning control plane for syntax, validation, projection
- Loss accounting: Every transformation logged with audit trails
- Schema-anchored: Validation travels with documents
When OCTAVE Helps
Use OCTAVE when documents must survive multiple agent/tool hops, repeated compression, or auditing:
- Coordination briefs, decision logs, policy artifacts that circulate between agents
- Reusable prompts or RAG artifacts needing stable structure across context windows
- Documents mixing prose with routing/targets (e.g., §targets for tools or indexes)
Proven efficiency:
- 54–68% token reduction vs equivalent JSON while preserving fidelity
- 90.7% comprehension rate (zero-shot across Claude, GPT-4o, Gemini)
- Higher quality outputs (9.3/10 vs 8.3/10) when compression is explicit
See docs/research/ for benchmarks and validation studies.
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 to canonical form
octave validate document.oct.md --schema DECISION_LOG
# Write with validation (from content)
echo "===DOC===\nKEY::value" | octave write output.oct.md --stdin --schema META
# 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"
}
}
}
Or use the setup script:
./setup-mcp.sh --all # Configure all clients
./setup-mcp.sh --show-config # Show config for copy/paste
See docs/mcp-configuration.md for advanced configuration.
MCP Tools
| Tool | Purpose |
|---|---|
octave_validate |
Schema validation + canonical normalization |
octave_write |
Unified file creation/modification (content OR delta changes) |
octave_eject |
Format projection (octave, json, yaml, markdown) |
Repair Tiers
OCTAVE separates semantic decisions from mechanical guarantees through three repair tiers:
- NORMALIZATION (always): ASCII→Unicode, whitespace (semantics preserved)
- REPAIR (opt-in): Schema-bounded coercions (enum casefold, type conversion)
- FORBIDDEN (never): Semantic inference, structure invention, target guessing
Every transformation is logged for auditability.
Documentation
| Doc | Content |
|---|---|
| Usage Guide | CLI, MCP, and API examples |
| API Reference | Python API documentation |
| MCP Configuration | Client setup and integration |
| Protocol Specs | Canonical operators, envelopes, schema rules (v5.1.0) |
| 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 (706 passing, 87% coverage)
pytest
# Quality checks
ruff check src tests && mypy src && black --check src tests
License
Apache-2.0 — Built with MCP Python SDK.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octave_mcp-0.4.0.tar.gz.
File metadata
- Download URL: octave_mcp-0.4.0.tar.gz
- Upload date:
- Size: 101.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19a7f3c1e0abd6988d62e182a165875911e35952f84b977bd6f256b0d407512b
|
|
| MD5 |
a796b9a41b46f0e94562f563723d4df4
|
|
| BLAKE2b-256 |
30563d83903a0084d2b4b9ba0a2dad295f2f078ab634d148834728602a9ceb2c
|
Provenance
The following attestation bundles were made for octave_mcp-0.4.0.tar.gz:
Publisher:
publish.yml on elevanaltd/octave-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
octave_mcp-0.4.0.tar.gz -
Subject digest:
19a7f3c1e0abd6988d62e182a165875911e35952f84b977bd6f256b0d407512b - Sigstore transparency entry: 799041645
- Sigstore integration time:
-
Permalink:
elevanaltd/octave-mcp@fdeaa1bad97f24dd50557b9561096f44b1d38590 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/elevanaltd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fdeaa1bad97f24dd50557b9561096f44b1d38590 -
Trigger Event:
release
-
Statement type:
File details
Details for the file octave_mcp-0.4.0-py3-none-any.whl.
File metadata
- Download URL: octave_mcp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 109.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60e5f49d67e576e92e6f50491db64fbaf3fd5be69e16822d03b74793325422af
|
|
| MD5 |
217579f8a7e5441694308ea28f38690d
|
|
| BLAKE2b-256 |
f9504aee2d06255d6e6601ad68f4aad60de30bc43c848f322a376fba29ab27da
|
Provenance
The following attestation bundles were made for octave_mcp-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on elevanaltd/octave-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
octave_mcp-0.4.0-py3-none-any.whl -
Subject digest:
60e5f49d67e576e92e6f50491db64fbaf3fd5be69e16822d03b74793325422af - Sigstore transparency entry: 799041648
- Sigstore integration time:
-
Permalink:
elevanaltd/octave-mcp@fdeaa1bad97f24dd50557b9561096f44b1d38590 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/elevanaltd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fdeaa1bad97f24dd50557b9561096f44b1d38590 -
Trigger Event:
release
-
Statement type: