Labsco
MCP SERVER

Decompose

by echology-io

Classify a document into labelled semantic units before the LLM reads it — deterministic, no model call, no API key.

Codebase Context Packing & Compression
Summary
The step before retrieval, not another retrieval system.

Chunking treats every paragraph as equal and then leans on embeddings to sort it out. Classifying first means a contract's boilerplate and its load limit are labelled differently before either is embedded, which is what makes routing by risk possible — safety-critical text to one chain, financial to another, low-attention text to none. Being deterministic and key-free is what makes it cheap enough to run on everything.

What it is

A text classifier for agents. It splits a document into units and labels each one, so downstream code can filter, route or prioritise before any text reaches a language model.

What you get
  • `decompose_text` classifies any text you pass it; `decompose_url` fetches a public page and classifies its content
  • Each unit carries `authority` — mandatory, prohibitive, directive, permissive, conditional or informational — so a hard requirement is distinguishable from background
  • `risk` labels it safety_critical, security, compliance, financial, contractual, advisory or informational
  • `type` says whether it is a requirement, definition, reference, constraint, narrative or data; `actionable` says whether someone has to do something
  • `irreducible` marks text that must be preserved verbatim; `attention` scores 0.0 to 10.0 how much compute the unit deserves
  • `entities` extracts the formal references cited — standards, codes and regulations
  • The Python library adds `filter_for_llm(result, max_tokens=...)`, which keeps mandatory, safety-critical, financial and compliance units and reports the reduction as a percentage
Requirements

`pip install decompose-mcp` for version 0.2.0, then add it to your client as `uvx decompose-mcp --serve` over stdio. No API key and no model call — the classification is deterministic. It also runs as a CLI reading stdin, and as a Python library.

Setup effort

One command — pip install decompose-mcp