devcontract
Provides tools for analyzing Git repositories, including compiling a Team Engineering Contract from git artifacts and understanding code provenance with cited git history.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@devcontractWhy does src/auth/session.ts exist? Use dev.understand."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 devcontractRequires 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 initThat 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
codexIn 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 onboardingdevcontract(no args) — MCP stdio withdev.understanddevcontract contract compile— Team Engineering Contract from git artifactsdevcontract 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 buildLicense: Apache-2.0
Available Tools
1 tooldev.understandUnderstandARead-onlyIdempotent
Cited answer for why a file, module, ticket, or commit exists. Deterministic; no API key required.
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | File path, module dir, ticket key (PROJ-123), or commit SHA | |
| private | No | Lower visibility ceiling to private. Does not load personal prefs. |
Output Schema
| Name | Required | Description |
|---|---|---|
| claims | Yes | |
| owners | Yes | |
| outcome | No | |
| subject | Yes | |
| summary | No | |
| degraded | Yes | |
| visibility | Yes | |
| schemaVersion | Yes | |
| contractSources | Yes | |
| contractVersion | Yes |
TDQS
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.
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.
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.
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.
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.
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 tool update
v0.1.1- First observed
dev.understand
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another tool; its purpose is unique and clearly stated.
A single tool with a clear namespace prefix and descriptive name; no inconsistency possible.
A single tool is too thin for a server named devcontract; this appears to be a trivial or underdeveloped surface.
Only one operation is provided, with no create, update, delete, or listing capabilities; the lifecycle for understanding development context is severely incomplete.
Maintenance
Related MCP Connectors
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
- WitWikiOAuthapp.witwiki
A shared team wiki your coding agents read and write — across every repo and every MCP client.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
One shared context your team's AI tools read & write over MCP. No re-explaining. Free.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAutomatically 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 npm7MIT
- AlicenseNot gradedqualityBmaintenanceExposes a repo's historical engineering memory (decisions, landmines, guardrails) via MCP tools for AI coding agents.MIT
- AlicenseBqualityAmaintenanceGive your AI coding agent superpowers over git history — auto-generate changelogs, analyze commits, attribute blame, and draft release notes via MCP. Zero runtime dependencies.61MIT
- AlicenseNot gradedqualityAmaintenanceProvides 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 npmMIT