Building SpecSync: How I Extended Kiro with Custom MCP Tools

Published: (December 5, 2025 at 12:00 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

The Problem: Drift Between Code, Tests, Docs, and Specs

Picture this: It’s 2 AM. Production is down. Your frontend is calling GET /users/{id}/posts. The backend removed that endpoint three weeks ago. The tests? All green. The docs? Still show the endpoint exists.

Someone updated the code, forgot to update the tests, and definitely forgot the docs. The spec? Nobody’s looked at it in months. This drift—when your code, tests, docs, and specs slowly become strangers to each other—kills velocity.

What is SpecSync?

SpecSync is a pre‑commit hook on steroids that validates everything stays in sync before the commit even happens. Your Git commits simply refuse to lie.

How SpecSync Works

Adding a New Endpoint

git add backend/handlers/user.py
git commit -m "Add user posts endpoint."

SpecSync blocks the commit:

❌ Hold up. You added an endpoint, but:
   - No spec for it
   - No tests for it
   - No docs for it

Fix these and try again.

After fixing the missing spec, tests, and docs, the commit succeeds. Zero lies in your Git history.

The Microservices Problem

When a backend team ships a breaking change, the frontend may still call the old endpoint. SpecSync Bridge catches this early.

Backend:

specsync-bridge extract   # Extracts API contract
git push                  # Shares it

Frontend (auto‑syncs every hour):

specsync-bridge validate

Output when the frontend is out‑of‑date:

❌ You're calling GET /users/{id}/posts
   Backend removed it last week.

You discover the mismatch in development, not production.

Key Features

1. One‑Command Setup

specsync-bridge setup

The command auto‑detects your environment, asks a few questions, and finishes—no YAML hell.

2. Automatic Sync

specsync-bridge auto-sync --enable

Contracts sync every hour silently in the background. You’re only notified when something breaks.

3. Git‑Based, No Extra Infrastructure

specsync-bridge add-dependency backend \
  --git-url https://github.com/org/backend.git

No Kafka, service mesh, or databases—just Git.

Real‑World Results

I tested SpecSync on a microservices project with five services:

  • Week 1: Detected 23 drift issues we didn’t know existed.
  • Week 2: Caught three breaking changes before they hit staging.
  • Week 3: A new developer trusted the docs—they were actually correct.
  • Week 4: Zero production incidents from API mismatches.

The team’s reaction? “Why didn’t this exist before?”

Quick Start (Takes 2 Minutes)

pip install specsync-bridge
specsync-bridge setup

Answer a few questions and you’re done.

The project is open source.

The Motto of SpecSync

Your code lies. Your docs lie. Your tests lie. They don’t mean to; they just drift apart over time. SpecSync forces them to tell the truth at commit time—automatically, forever. No drift in Git = no drift in production.

Back to Blog

Related posts

Read more »