
tieline
io.github.nugehsPublished by GitHub account nugehsv0.1.4Updated Oct 24, 2026
Static FE-BE contract-drift checker: finds frontend calls the backend does not expose. CLI + MCP.
Overview
A local MCP server that statically checks whether a frontend's HTTP calls match the routes a backend exposes, returning drift, contract maps and code-vs-spec d
- What you can do
- Run a contract check between frontend call sites and backend routes, returning totals plus drift and unverifiable entries as JSON. Retrieve the full resolved contract map of every endpoint and its status. List backend routes that no frontend call reaches. Compare routes parsed from source against an OpenAPI spec to find undocumented and phantom routes. Auto-detect nearby repos and write a tieline config file.
- When to use it
- Use it when an assistant is working across a frontend and backend repo and you want a deterministic, sub-second answer on whether the two sides still agree, for example before a PR or as a CI-style gate. It suits path and method drift checks, not payload-level contract testing.
- Requirements
- Runs as a local stdio process via npx from the npm package, or from a global install. Needs the source code of both sides and a tieline config file, either written by hand or generated by the init tool. No authentication, environment variables or headers are declared.
Installation
In SourceWeft
- Open tieline in the dashboard and add it to a workspace.
- 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
tieline
Static frontend↔backend contract-drift checker. Pact without writing a single contract test.
[npm] [CI] [license: MIT] [node] [tests] [dependencies]
tieline reads the code you already wrote on both sides of an API boundary — the
HTTP calls your frontend makes and the routes your backend exposes — and tells you
where they disagree. No contract tests to author, no broker to run, no backend to
boot. It finishes in well under a second and is built to run in CI as a gate.
Delete the LLM and a developer still installs it.
tielineis a deterministic tool first; an agent reading its output is a bonus.
How it works
Both sides are reduced to a canonical (METHOD, path) and joined. The matcher is
adapter-agnostic — any client adapter pairs with any server adapter, so the
same engine checks a React app against Express, an Angular app against Spring, or
anything against an OpenAPI spec.
tieline vs alternatives
These tools solve neighbouring problems — pick by what you have and what you want guaranteed.
They compose: tieline catches FE↔BE drift statically in every PR, tieline doctor
keeps code↔spec honest, and a runtime tool like Pact or Schemathesis can guard the
payload/behaviour layer underneath.
Quick start
Install (or run with npx):
Generate a tieline.config.json — init sniffs the surrounding directories
(cwd, its children, and its siblings) for known stacks and writes a ready-to-run
config:
It detects adapters from package.json deps (@reduxjs/toolkit, axios,
@angular/core, @nestjs/core, express, fastify, next),
requirements.txt / pyproject.toml (fastapi, flask), pom.xml /
build.gradle (spring), and any OpenAPI doc as a fallback. Anything it can't
detect is written as a placeholder for you to edit. The file is always
overwritten, so re-run it whenever your layout changes.
Or write it by hand — at the root of (or above) your repos:
Run it:
check exits non-zero when any failOn bucket is non-empty — drop it into CI and
the build fails the moment the two sides disagree.
Commands
Supported stacks
Any client adapter pairs with any server adapter — the matcher never changes.
That covers MERN (rtk/axios ↔ express), MEAN (angular ↔ express), MEVN
(axios ↔ express), Next full-stack, Python (fastapi/flask), and
enterprise (angular ↔ spring) — plus openapi for any backend that emits a
spec (Express+swagger-jsdoc, FastAPI, Spring springdoc, .NET Swashbuckle, …).
Notes:
expresswalks theapp.use()mount graph acrossrequire/importboundaries and nested routers; routers it can't reach are flagged, never dropped.nextis file-system routing — app-router files exportGET/POST/…; pages-router handlers serve any verb (matched asALL).- Runtime-built urls (e.g.
`users/${id}?x=${q}`) are surfaced as unverifiable rather than guessed.
Configuration
tieline.config.json — repo paths resolve relative to the config file.
Visual report
tieline check --html report.html writes one self-contained file (inline
CSS/JS, no external assets) you can open in any browser or attach to a PR:
- a contract-flow diagram — frontend resources on the left, backend on the
right, curved links coloured green (matched) / red (drift), with a
∅ no routenode catching calls that land nowhere; hover a resource to highlight its links - a health ring, summary cards, and live-filterable drift / unverifiable / unused tables
tieline doctor — does your code match your published docs?
doctor diffs routes parsed from source (a native adapter like nestjs) against
the routes declared in your OpenAPI spec (server.spec):
- undocumented — working routes invisible to anyone generating an SDK or partner integration from the spec.
- phantom — the spec promises a route the code no longer serves (stale docs).
Run it alongside check and your spec can never silently drift from your code.
Use as an MCP server
tieline ships an MCP server so an agent can ask "do these two repos still agree?" and get the same structured result the CLI produces — no LLM does the analysis, the deterministic engine does. It's still zero-dependency: the server is hand-rolled stdio JSON-RPC, no SDK.
Register it with any MCP client (Claude Code, Claude Desktop, …):
Or, from a global install (npm i -g @nugehs/tieline), just "command": "tieline-mcp".
It exposes five tools, each returning JSON:
config defaults to searching upward from the server's working directory, exactly
like the CLI — so an agent dropped into a repo with a tieline.config.json can
just call tieline_check.
Architecture
Each side implements a single extractor; everything downstream is shared.
A new framework is a new adapter (~80 lines) — the normalizer, matcher, reporters,
and CLI never change. Path-existence drift ships today; OpenAPI DTO-shape
diffing (--deep) and SARIF/PR annotations are on the roadmap.
Tests
71 tests on Node's built-in runner:
- normalize — every param syntax (
${id}/:id/<int:id>/[id]/{id}), query stripping, basePath, path joining - matcher — all four buckets, drift hints (method-mismatch, "did you mean"),
ignore,ALL/ANYany-verb routes, cross-syntax param matching - adapters — every client + server adapter against a fixture, plus edge cases
via throwaway temp repos (Express
app.all+ unmounted router, Next route groups- catch-all, Spring
@RequestMapping(method=…), Flask default-GET, runtime urls → unverifiable, non-HttpClient.get()ignored)
- catch-all, Spring
- openapi —
servers[].urlprefix, Swagger 2basePath,stripPrefix - doctor — undocumented / phantom / matched + hints
- init — stack auto-detection (node deps, Python, Spring, OpenAPI fallback), dir-name bias, sibling/child scanning, placeholder fallback, config round-trip
- integration — three cross-stack proofs (RTK↔Express, Angular↔Spring,
axios↔FastAPI) and the real CLI (exit codes,
--json,--html,doctor) - mcp — the stdio JSON-RPC server: handshake,
tools/list, a realtieline_checkover a fixture, in-band tool errors, method-not-found
Roadmap
- SARIF output — inline drift annotations on GitHub PRs
--deep— diff request/response DTO shapes, not just paths, via OpenAPI (catches a renamed field or changed enum, where the expensive bugs live)- More adapters —
react-query/swrfirst-class clients,koa/djangoservers - AST extraction — replace regex parsing for exotic declarations
Known limits today: regex-based extraction (robust on conventional code), one
@Controller per file, path/method existence only. GraphQL is out of scope.
License
MIT © Segun Olumbe
Part of the toolchain
tieline is one of four tools that form a deterministic trust layer for AI-assisted development. Each answers a question people keep handing to an LLM — with static analysis instead.
- repoctx — context: what does this change actually touch?
- tieline (this tool) — contracts: did the front end and back end quietly stop agreeing?
- bouncer — compliance: could you defend this to Ofcom?
- aiglare — governance: where can the model do something you can't undo?
More at segunolumbe.com. static analysis, never the model.
Source: README.md at commit 8f56e97
Tools
0Version history
1- v0.1.4LatestSep 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