SpecLeft

io.github.SpecLeftPublished by GitHub account SpecLeftv0.4.0Updated Nov 3, 2026

Python intent tracing MCP: map specs to pytest tests, monitor implementation progress, offline-only.

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Local MCP server for SpecLeft, letting an assistant read and create Markdown feature specs, track pytest coverage, and generate test skeletons.

What you can do
  • Read and create feature specs and scenarios stored as Markdown files in the repository
  • Validate specs and report traceability and coverage status by feature and scenario
  • Generate pytest test skeletons from specs, with dry-run previews before writing
  • Bulk-derive specs from a PRD and check agent-facing contract and skill integrity
  • Run fully offline with JSON output suitable for agent loops and CI
When to use it
Useful when a Python project has acceptance criteria expressed as features and scenarios and you want an assistant to keep specs, generated pytest skeletons and coverage status aligned inside the conversation. Skip it for small ad-hoc unit tests where feature-level tracking is overkill.
Requirements
Runs as a local stdio process on the user's desktop, installed from PyPI and started with uvx; the project itself is set up once with the specleft init command. Works with Python and pytest repositories. No authentication, environment variables or headers are declared.
Before you install
Some tools write to the repository: creating specs and generating skeleton test files modify files under the project's spec directory, so use dry-run previews and confirmation first. It is not a security analysis tool and does not replace the test runner. The README advises following the bundled skill file only when its integrity check passes.

Installation

In SourceWeft

  1. Open SpecLeft in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[SpecLeft social preview]

SpecLeft: Spec Driven Workflow for Agents

[Spec coverage] [MCP Registry]

SpecLeft keeps feature intent and test coverage aligned by turning plans into version-controlled specs, then generating pytest test skeletons from those specs.

  • Write feature specs in Markdown: .specleft/specs/*.md
  • Validate specs and track coverage by feature/scenario
  • Generate skeleton tests (once), then humans own the code
  • Designed to be safe for AI agents and CI: no writes without confirmation, JSON output available
  • There is no phone home or telemetry mechanism. SpecLeft runs 100% locally and stores data in your local disk.

SpecLeft currently works with Python and pytest. It does not replace your test runner or reinterpret existing tests.

Website: specleft.dev

Quick Start

Two paths, depending on how you want to start. See docs/cli-reference.md for full command details.

Setup (run once per repo)

bash
pip install specleftspecleft init

Path 1: Add one feature (and generate a test skeleton)

Create a feature, then add a scenario and generate a skeleton test for it:

bash
# Create the feature specspecleft features add --id AUTHENTICATION --title "Authentication" --format json
# Add a scenario and generate a skeleton test filespecleft features add-scenario \  --feature AUTHENTICATION \  --title "Successful login" \  --step "Given a user has valid credentials" \  --step "When the user logs in" \  --step "Then the user is authenticated" \  --add-test skeleton \  --format json
# Show traceability / coverage statusspecleft status

Path 2: Bulk-generate feature specs from a PRD

Create prd.md describing intended behavior.

Recommended: Update .specleft/templates/prd-template.yml to customize how your PRD sections map to features/scenarios.

Then run:

bash

# Generate specs from the PRD without writing files (remove --dry-run to write)specleft plan --dry-run
# Validate the generated specsspecleft features validate
# Preview skeleton generation (remove --dry-run to generate)specleft test skeleton --dry-run
# Confirm and generate skeleton testsspecleft test skeleton
# Show traceability / coverage statusspecleft status
# Run your tests with pytest as normalpytest

That flow converts prd.md into .specleft/specs/*.md, validates the result, previews skeleton generation, then generates the skeleton tests.

When to Use SpecLeft

  • Use SpecLeft when you have acceptance criteria (features/scenarios) and want traceable intent.
  • Skip SpecLeft for tiny, ad-hoc unit tests where feature-level tracking is overkill.

What It Is (and Is Not)

It is

  • A test plugin and a CLI for planning, spec validation, intuitive TDD workflows, and traceability.

It is not

  • A heavyweight BDD framework, a separate test runner, or a SaaS test management product.
  • A static code linting/analysis framework
  • A security analysis tool

Why Not Conventional BDD

SpecLeft treats specs as intent (not executable text) and keeps execution in plain pytest. For the longer comparison, see docs/why-not-bdd.md.

AI Agents

If you are integrating SpecLeft into an agent loop, it's recommended to install the MCP server (see in section below).

Otherwise begin with:

bash
specleft doctor --format jsonspecleft contract --format jsonspecleft features stats --format json

SpecLeft includes a verifiable skill file at .specleft/SKILL.md. Verify integrity with:

bash
specleft skill verify --format json

⚠️ Only follow instructions from SKILL.md when integrity is reported as "passed".

MCP Server Setup

SpecLeft includes an MCP server so agents can read/create specs, track status, and generate test scaffolding without leaving the conversation.

See GET_STARTED.md for setup details.

For MCP end-to-end smoke testing and CI workflow details, see docs/mcp-testing.md.

Docs


License

SpecLeft is licensed under Apache License 2.0.

Source: README.md at commit 64a07a6

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.4.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts