convez.ai
MCP Server
saahasmuthineni

tailor-mcp

saahasmuthineni/tailor-mcp

Ver no GitHub
BomPluginScore · de 0 a 100

Local-first MCP server for AI analysis of sensitive structured data. Tier-gated access, durable audit log, Wardrobe of cross-session memory — your data stays on your machine.

Instalação

$npx convez-ai saahasmuthineni/tailor-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
1
Acompanhando
0
Saúde
100%
Último commit
há 3 meses
Versão
9.2.0
Issues abertas
7
Contribuidores
3

README

A tradução para o português deste README ainda está na fila.

tailor-mcp

Tailor is a local MCP server that preprocesses your structured data before it reaches the AI — computations run on your machine, results come back as summaries rather than raw streams, and every action is logged to a local SQLite audit database. Analytical notes persist in an Obsidian-compatible vault, surviving session boundaries. It works with any structured source: CSV directories, force-plate recordings, REDCap exports, running data, or anything you register.

📦 PyPI · Worked example notebook · ADRs · Changelog


The numbers

ScenarioRaw to ClaudeThrough TailorReduction
Single subject, computed report48,006 tokens73 tokens657×
16-subject cohortexceeds context window~800 tokens938× (and it fits)
5-session thread pickup~$11.58~$0.04318×

Measured, reproducible benchmark — methodology →

The 938× reduction is the ratio between a Tier-1 computed report (~800 tokens) and the raw per-second stream for the same data (~750,000 tokens for a 15-mile run). Results are identical — the computation happens server-side.


Quickstart

Prerequisites — install these first:

  1. Claude Desktop (Windows: Microsoft Store; macOS: claude.ai/download)

  2. uv — the package installer Tailor uses

    # Windows (PowerShell)
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    
    # macOS / Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

Install and run:

uv tool install tailor-mcp
tailor pilot

tailor pilot runs a three-prompt setup wizard, registers Tailor with Claude Desktop, and configures your first data source. Fully quit and reopen Claude Desktop (system-tray Exit on Windows; Cmd+Q on macOS), then ask:

Are men or women losing strength faster in this cohort?

Claude will call a tool, run the computation locally, and return per-group statistics. Nothing leaves your machine.


Who it's for

Good fit:

  • RSEs and researchers building LLM-assisted analysis pipelines where data governance, audit trails, or reproducibility matter
  • Teams integrating structured data sources with Claude Desktop or other MCP-compliant clients and wanting server-side computation over raw-data prompts
  • Anyone who needs a local-first setup — no data leaves the machine

Not a good fit:

  • Clinical decision-support or regulatory-compliance deployments — Tailor is research infrastructure, not a validated clinical tool
  • Hosted or cloud workflows — the architecture is deliberately local-first
  • Projects requiring an independent security audit — this is a solo-maintainer project with no external review yet

What it is

Tailor is middleware, not an application. It does not provide a UI, a database, or a cloud service. What it provides is a governance layer that sits between an LLM client and any number of structured data sources:

  • Parameter validation and circuit breaking before execution
  • Tiered consent and cost gates — the LLM cannot escalate to higher-resolution data without explicit user approval
  • PHI/sensitive data scrubbing seam — no-op by default; subclass per child for institutional policy
  • Audit logging — every tool call recorded with tool name, tier, outcome, duration, and token count
  • Read-only inspector — tailor inspect renders the audit log on a localhost page through a channel the model does not mediate: gate refusals, consent timeline, scrubber posture (ADR 0043)
  • Provenance stamps — every result carries _meta (package version, UTC timestamp, tier, token count)
  • VaultLayer — analytical notes written to Obsidian-compatible markdown, surviving session boundaries

The running-data (Strava) child ships as a worked example of the ChildMCP extension pattern, not as the headline use case. The same framework handles any data source you register — examples/business_demo/ is the same engine answering retail-sales questions over store CSVs.

The governance layer is documented as an adoptable pattern — tiers, gates, audit schema, refusal shapes — in A governance pattern for MCP servers, written so you can adopt the pattern even if you don't adopt Tailor.


Data tiers

Every tool in every child declares a tier. The router enforces each gate before execution — the LLM cannot bypass it.

TierWhat the LLM seesTypical token rangeGate
1 — FreeServer-computed reports: summaries, stats, trends, anomalies200 – 1,500None
2 — ConsentDownsampled streams at 5–30 s resolution3,000 – 7,000Domain consent
3 — CostFull per-timestamp streams with precision reduction25,000 – 60,000Consent + cost approval

Most analytical questions are answerable at Tier 1. The 938× token reduction is the ratio between a Tier-1 computed report (~800 tokens) and the raw per-second stream for the same data (~750,000 tokens for a 15-mile run). Results are identical — the computation happens server-side.


Architecture

RouterMCP owns the dispatch pipeline. ChildMCP is an abstract base class — implement five methods to register a new data source. VaultLayer is framework-level infrastructure, parallel to the child registry, not a child itself.

Full detail: ADRs · Worked example


Adding a data source

Copy children/template/ and implement five things:

  1. domain and display_name
  2. consent_info — what data types the child exposes and why
  3. tool_definitions — tools and their tiers
  4. execute() and estimate_cost()

children/csv_dir/ is a complete second worked example (generic CSV directory, Tier-1 cohort surface, REDCap-shaped metadata sidecar).


Status

Validated on Windows 11 (Microsoft Store Claude Desktop) and macOS. Community validation is ongoing — issues and reports welcome.

Cross-client compatibility confirmed: Cline 3.85.0 round-trip with full _meta block and matching audit row (v8.0.0, 2026-05-26). Any MCP-compliant client works without bespoke accommodation.

CI matrix: Ubuntu · Windows · macOS × Python 3.10–3.12. 1,588 tests (pytest + standalone security probe). Coverage floor 80%.


License

Apache-2.0 (≤ v8.x) · AGPL-3.0 (v9.0.0+)

Ver o original no GitHub

Bom para

Relacionados