# preflight-dev/preflight [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/preflight-dev/preflight  
**GitHub Stars:** 12  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/preflight-dev-preflight

## Description
24-tool MCP server for Claude Code that catches vague prompts before they waste tokens. Includes 12-category prompt scorecards, session history search with LanceDB vectors, cross-service contract awareness, correction pattern learning, and cost estimation.

## Tools
Capabilities this server exposes over MCP:

- **preflight_check** — The main entry point.** Triages your prompt (trivial → multi-step), chains the right checks automatically, matches against known correction patterns. Accepts `force_level` override: `skip`, `light`, `full`.
- **scope_work** — Creates structured execution plans before coding starts
- **clarify_intent** — Gathers project context (git state, workspace docs, ambiguity signals) to disambiguate vague prompts
- **enrich_agent_task** — Enriches sub-agent tasks with file paths, patterns, and cross-service context
- **sharpen_followup** — Resolves "fix it" / "do the others" to actual file targets
- **token_audit** — Detects waste patterns, grades your session A–F
- **sequence_tasks** — Orders tasks by dependency, locality, and risk
- **checkpoint** — Save game before compaction — commits + resumption notes
- **check_session_health** — Monitors uncommitted files, time since commit, turn count
- **log_correction** — Tracks corrections and identifies recurring error patterns
- **check_patterns** — Checks prompts against learned correction patterns — warns about known pitfalls
- **session_handoff** — Generates handoff briefs for new sessions
- **what_changed** — Summarizes diffs since last checkpoint
- **onboard_project** — Indexes a project's session history + contracts into per-project LanceDB
- **search_history** — Semantic search with scope: current project, related, or all indexed projects
- **timeline** — Chronological view of events across sessions
- **scan_sessions** — Live scanning of active session data
- **generate_scorecard** — 12-category report card — session, trend (week/month), or cross-project comparative. Radar chart SVG, PDF or markdown.
- **estimate_cost** — Token usage, dollar cost, waste from corrections, preflight savings
- **session_stats** — Lightweight session analysis — no embeddings needed
- **prompt_score** — Gamified A–F grading on specificity, scope, actionability, done-condition
- **verify_completion** — Runs type check + tests + build before declaring done
- **audit_workspace** — Finds stale/missing workspace docs vs git activity
- **search_contracts** — Search API contracts, types, and schemas across current and related projects

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "preflight": {
    "command": "npx",
    "args": ["-y","preflight-dev-serve"]
  }
}
```

## Documentation

## What preflight-dev/preflight MCP server does

The preflight-dev/preflight MCP server provides 24 MCP tools for improving prompt quality and session control in Claude Code. Its central entry point, `preflight_check`, classifies an incoming prompt and selects follow-up checks. Short routine commands can pass through, while vague, multi-step, or cross-service requests can trigger clarification and planning workflows.

The tool set covers five areas: prompt discipline, session-history intelligence, analysis and reporting, verification, and workspace hygiene. It can create execution plans, resolve vague follow-ups to file targets, enrich sub-agent tasks, order work by dependency and risk, and save checkpoints with commits and resumption notes.

## How it works

Prompt triage uses signals such as skip keywords, multi-step language, cross-service terms, prompt length, file references, and vague verbs or pronouns. A correction pattern can raise the required review level when a prompt resembles a previously logged mistake. The `force_level` option on `preflight_check` can explicitly select `skip`, `light`, or `full` handling.

The server reads Claude Code session data stored as JSONL under `~/.claude/projects/`. It extracts prompts, assistant responses, tool calls, sub-agent activity, corrections, context compactions, errors, and commits. Session events are indexed in per-project LanceDB databases for semantic search. Related project data can also be used for cross-service contract and history lookups.

## Setup and configuration

The documented quick-start command runs the server through npm:

```bash
npx -y preflight-dev-serve
```

Claude Code can register that command with `claude mcp add preflight -- npx -y preflight-dev-serve`. For project-specific analysis, the README shows setting `CLAUDE_PROJECT_DIR` to the target workspace. A cloned setup can run the TypeScript entry point with `tsx`, while a global npm installation provides the `preflight-dev-serve` executable.

The project supports a `.preflight/` configuration directory with YAML configuration for triage rules and thresholds. Its local data includes timeline indexes, extracted contracts, and project metadata under `~/.preflight/projects/`.

## Tools and capabilities

The preflight-dev/preflight MCP server includes tools for:

- Checking, scoring, clarifying, scoping, enriching, and sequencing prompts or tasks.
- Tracking corrections and matching new prompts against learned patterns.
- Monitoring session health, scanning active sessions, viewing timelines, and searching history.
- Indexing project history and searching API contracts, types, interfaces, routes, and schemas.
- Creating scorecards with session, trend, or cross-project views, including radar SVG, PDF, or Markdown output.
- Estimating token usage, dollar cost, correction waste, and potential preflight savings.
- Running type checks, tests, and builds through `verify_completion`.
- Auditing workspace documentation and summarizing changes since a checkpoint.

## Limitations and notes

The README specifically documents use with Claude Code; it does not establish compatibility with other MCP clients. The server relies on Claude Code session files for its history-oriented features, so results depend on those files being available. Semantic search uses local vector embeddings by default according to the documented LanceDB schema, with OpenAI-sized vectors also described as an option. Cost figures are estimates rather than billing records, and completion verification only runs the checks configured or available for the workspace.

_Full upstream README: https://allmcps.com/mcp/preflight-dev-preflight/readme_

