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., "@devcontract Why 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.
Inputs: target (required), private. Returns: claims, owners, outcome, subject, +6 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Related MCP Connectors
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
A shared team wiki your coding agents read and write — across every repo and every MCP client.
Query your team's AI coding history and act on HypAware recommendations from any MCP client.
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.45 npm6MIT
- AlicenseNot gradedqualityDmaintenanceExposes a repo's historical engineering memory (decisions, landmines, guardrails) via MCP tools for AI coding agents.MIT
- AlicenseNot gradedqualityBmaintenanceProvides 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.4 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with Git repository history analysis, including churn hotspot detection, semantic file coupling, and recent context summaries through MCP tools.MIT