tailor-mcp
saahasmuthineni/tailor-mcp
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-mcp1 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
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
| Scenario | Raw to Claude | Through Tailor | Reduction |
|---|---|---|---|
| Single subject, computed report | 48,006 tokens | 73 tokens | 657× |
| 16-subject cohort | exceeds context window | ~800 tokens | 938× (and it fits) |
| 5-session thread pickup | ~$11.58 | ~$0.04 | 318× |
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:
-
Claude Desktop (Windows: Microsoft Store; macOS: claude.ai/download)
-
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 inspectrenders 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.
| Tier | What the LLM sees | Typical token range | Gate |
|---|---|---|---|
| 1 — Free | Server-computed reports: summaries, stats, trends, anomalies | 200 – 1,500 | None |
| 2 — Consent | Downsampled streams at 5–30 s resolution | 3,000 – 7,000 | Domain consent |
| 3 — Cost | Full per-timestamp streams with precision reduction | 25,000 – 60,000 | Consent + 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:
domainanddisplay_nameconsent_info— what data types the child exposes and whytool_definitions— tools and their tiersexecute()andestimate_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+)