Skip to main content
MCP server CX Codex

context-foundry — Claude Code MCP server: install and use

An autonomous execution pipeline that works through TASKS.md with isolated agents and verification checks. Best for testable code changes.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add context-foundry -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- uvx context-foundry
Open on GitHub

What context-foundry does

This MCP harness drives a multi-stage software delivery loop based on your TASKS.md file. Each role — investigation, planning, coding, and auditing — runs as a fresh Claude Code process. No conversation history passes between stages. Agents exchange only curated markdown outputs inside the .buildloop folder.

A separate verification pass audits new edits from a clean slate. It executes tests, resolves flagged issues, and writes a git commit: feat(task_id) on success or WIP(task_id) when problems remain. Reusable engineering lessons are cataloged under ~/.foundry/patterns/ as JSON. Without an ANTHROPIC_API_KEY environment variable, the process will not start.

Running this loop on unstructured prose or documentation updates wastes tokens. Verification cannot validate freeform text, so save the pipeline for code backed by concrete tests.

What it helps with

  • execute engineering items from TASKS.md automatically
  • audit generated patches using a clean agent context
  • store discovered project patterns in ~/.foundry/patterns/
  • commit progress to git with per-task status indicators

Example prompts for the agent

  • Run the pending task queue from TASKS.md in sprint mode
  • Audit recent changes with a clean verification agent
  • Extract reusable codebase patterns into .foundry

How to install context-foundry

Platform CLI

claude mcp add context-foundry -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- uvx context-foundry

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from context-foundry <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about context-foundry

How to install context-foundry in Claude Code?

Run claude mcp add context-foundry -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- uvx context-foundry in your shell.

Why does context-foundry isolate context across stages?

Wiping memory between steps keeps agents objective. The auditor inspects fresh files without inheriting the author's assumptions, preventing blind spots from compounding.

When should context-foundry be avoided?

Skip it for documentation, README edits, and brainstorming. The audit gate requires deterministic tests or code assertions, making the pipeline inefficient for pure text.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor