Skip to main content
Glama

devcontract

Evidence-backed Team Engineering Contract + guided AI workflows (Understand, Build), served over MCP stdio so Grok, Claude Code, Codex, Kiro, and Cursor share the same tools.

npx -y devcontract

Requires Node.js 22+ and git on PATH. Build plans need XAI_API_KEY (xAI / SpaceXAI). Understand is deterministic and works without a key.

First onboarding

In the git repo you want the agent to learn (not in this package unless you are dogfooding):

npm install -g devcontract
cd your-service
devcontract init

That compiles the Team Engineering Contract, writes .devcontract/ (gitignored except README), and prints MCP snippets.

Then hook Codex once per machine:

codex mcp add devcontract -- devcontract
codex mcp list
codex

In Codex: /mcp should show devcontract. Ask: Why does <file> exist? Use dev.understand.

Optional: devcontract init --write drops .codex/config.toml / .mcp.json into the repo (Codex project config only applies after the directory is trusted).

Related MCP server: repo-history

Status

v0.1.1. Working now:

  • devcontract init — first-run onboarding

  • devcontract (no args) — MCP stdio with dev.understand

  • devcontract contract compile — Team Engineering Contract from git artifacts

  • devcontract understand <path-or-ticket> — cited git history (no API key)

Still stubbed: build, approve, run.

Product overview: docs/PRODUCT.md
Design: docs/DESIGN.md

MCP clients

Claude Code / Cursor.mcp.json or .cursor/mcp.json:

{
  "mcpServers": {
    "devcontract": {
      "command": "npx",
      "args": ["-y", "devcontract"]
    }
  }
}

Codex / Grok — project MCP config, command = "npx", args = ["-y", "devcontract"], startup_timeout_sec = 60.

Kiro — best-effort .kiro/settings/mcp.json (same JSON shape).

Put XAI_API_KEY in the host environment. Do not commit it.

CLI

npx -y devcontract              # MCP stdio (default)
npx -y devcontract --help
npx -y devcontract init
npx -y devcontract contract compile
npx -y devcontract understand <path-or-ticket>
npx -y devcontract build <ticket>
npx -y devcontract approve <runId>    # TTY only; not an MCP tool
npx -y devcontract run <runId> [--resume]

Develop

npm install
npm test
npm run build

License: Apache-2.0

Available Tools

1 tool
dev.understandUnderstandA
Read-onlyIdempotent

Cited answer for why a file, module, ticket, or commit exists. Deterministic; no API key required.

ParametersJSON Schema
NameRequiredDescriptionDefault
targetYesFile path, module dir, ticket key (PROJ-123), or commit SHA
privateNoLower visibility ceiling to private. Does not load personal prefs.

Output Schema

ParametersJSON Schema
NameRequiredDescription
claimsYes
ownersYes
outcomeNo
subjectYes
summaryNo
degradedYes
visibilityYes
schemaVersionYes
contractSourcesYes
contractVersionYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds genuinely new behavioral facts not in any structured field: the operation is deterministic and requires no API key, which matters for reproducibility and setup. It stops short of describing latency, scope limits, or what the citations look like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with zero filler; the core promise (cited answer, target kinds) is front-loaded and the operational caveats (deterministic, no API key) follow. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full input schema, an output schema, and annotations covering the safety profile, the description carries little remaining burden and discharges most of it via the determinism/no-API-key note. The only gap is the absence of explicit usage boundaries, minor for a simple read-only lookup tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are fully documented in the schema, including the multi-format 'target' (file path, module dir, ticket key, commit SHA) and the 'private' visibility switch. The description adds no additional parameter semantics, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific outcome — a 'cited answer' — and enumerates the target kinds it reasons about (file, module, ticket, commit), which is more concrete than the abstract name 'understand' suggests. It is clear what the tool produces, though the phrasing 'why ... exists' leaves the exact output shape to the output schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the purpose: reach for this when you need the rationale/provenance behind an artifact. There is no explicit when-to-use/when-not guidance, no prerequisites, and no siblings to route away from, so the guidance never rises above inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.1
    • First observeddev.understand

TDQS

A3.7/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusing it with another tool; its purpose is unique and clearly stated.

Naming Consistency5/5

A single tool with a clear namespace prefix and descriptive name; no inconsistency possible.

Tool Count2/5

A single tool is too thin for a server named devcontract; this appears to be a trivial or underdeveloped surface.

Completeness2/5

Only one operation is provided, with no create, update, delete, or listing capabilities; the lifecycle for understanding development context is severely incomplete.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Automatically extracts architectural decisions, patterns, and insights from Git commits to build a local, structured project memory. It exposes this living context to AI tools via MCP, allowing them to understand the historical reasoning and evolution behind your codebase.
    10 npm
    7
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Exposes a repo's historical engineering memory (decisions, landmines, guardrails) via MCP tools for AI coding agents.
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Give your AI coding agent superpowers over git history — auto-generate changelogs, analyze commits, attribute blame, and draft release notes via MCP. Zero runtime dependencies.
    6
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides MCP tools that give AI agents persistent, append-only memory in a git repository, letting them record observations, decisions, and corrections while retrieving context briefs, current facts, conflicts, and traceable event history without a vector database.
    5 npm
    MIT