# janaraj/tnl [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/janaraj/tnl  
**GitHub Stars:** 8  
**npm Downloads (last month):** 50  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/janaraj-tnl

## Description
MCP server for TNL (Typed Natural Language): per-feature English contracts for AI coding agents. 6 tools — getimpactedtnls, retrievetnl, trace, proposetnldiff, approvetnldiff, verify — let agents look up relevant contracts, propose contract edits, and verify implementations against them. Drop-in via npx typed-nl init for Claude Code, Codex, Gemini.

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

```json
"mcpServers": {
  "tnl": {
    "command": "npx",
    "args": ["-y","typed-nl"]
  }
}
```

## Documentation

## What janaraj/tnl MCP server does

The janaraj/tnl MCP server exposes a contract workflow for AI coding agents. A TNL contract is a Markdown-like file describing a feature or repository-wide requirement with fields for identity, scope, allowed paths, external surfaces, behaviors, non-goals, and rationale. Behavioral clauses use MUST, SHOULD, or MAY language and can include semantic or test references.

Contracts are intended to make design decisions reviewable before implementation. An agent can inspect existing contracts, propose a new contract or edit, wait for approval, save the approved file under `tnl/`, implement the change, and report how each required behavior was satisfied. Follow-up sessions can reuse the saved contract instead of reconstructing requirements from source code.

## How it works

The janaraj/tnl MCP server works with TNL files in the project’s `tnl/` directory. For a new request, the workflow checks whether existing `paths` overlap the requested change. An overlap indicates an edit to an existing contract; otherwise, the agent prepares a new one. The contract is reviewed before it is written, and its `paths` field limits the intended change surface.

After implementation, the agent self-attests against every MUST clause by identifying the relevant file or test. The separate `tnl verify` command can check that declared paths exist and that test bindings resolve. A PreToolUse hook can re-surface the active contract during Edit and Write operations, but hooks, CI, and MCP are optional layers rather than prerequisites for the basic workflow.

## Setup and configuration

Install the command-line package with Node.js 20 or later:

```bash
npx -y typed-nl <command>
```

A global installation is also supported:

```bash
npm install -g typed-nl
tnl <command>
```

For native setup, `tnl init` can configure Claude Code, Codex, Gemini, and Cursor with the workflow stanza, hooks, and MCP support. Agents outside that list can adopt the minimum workflow manually by copying `tnl/workflow.tnl` into the project and adding the workflow stanza to their Markdown instruction file. No environment variables are documented as required.

## Tools and capabilities

The janaraj/tnl MCP server provides six tools:

- `getimpactedtnls` finds contracts relevant to a requested change.
- `retrievetnl` reads a selected contract for agent context.
- `trace` follows contract-related implementation or requirement information.
- `proposetnldiff` prepares a proposed contract change for review.
- `approvetnldiff` records approval for a proposed contract diff.
- `verify` checks implementation details against the contract workflow.

Together, these tools support contract lookup, change proposal and approval, implementation tracing, and verification. The server is most suitable for repositories where feature requirements should remain alongside the code and be available to later agent sessions.

## Limitations and notes

TNL adoption can start without MCP through an instruction-file stanza and a `tnl/` directory; the MCP server is an optional part of the broader workflow. Verification depends on the contract’s declared paths and any referenced tests being present and resolvable. The repository’s evaluation reports improved scenario results in its tested runs, but those results are based on a small sample and should not be treated as a guarantee for other projects or agents.

_Full upstream README: https://allmcps.com/mcp/janaraj-tnl/readme_

