ContextBuilder (ctx)
Provides structured, provenance-backed context for Shopify applications by ingesting and analyzing data from app listings, websites, and help centers into a graph-based memory system.
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., "@ContextBuilder (ctx) get the starter context for the Notify Me! app"
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.
ContextBuilder (ctx)
Context-as-a-Service MCP server for Hengam's multi-agent system. Maintains app-isolated, structured, provenance-backed context for Shopify apps and delivers "just enough context" to other agents.
Features
App-scoped context: Isolated context for 4 Shopify apps (Notify Me!, Subi, Discounty, Convi)
Agentic Graph Memory: Graph-based retrieval with multi-hop traversal, not just vector search
Hybrid delivery: Push starter context bundles + Pull targeted context slices
Observation Masking: Budget-aware compression with full transparency on what was included/excluded
Provenance tracking: Every statement traceable to source URL + snapshot timestamp + content hash
Configurable LLM: Provider-agnostic (OpenAI, Anthropic, Gemini) with editable prompt templates
Schema-validated: All data objects validated with Zod at boundaries
Quick Start
# Install dependencies
pnpm install
# Set up LLM API key (at least one required for refresh)
export OPENAI_API_KEY=sk-...
# or
export ANTHROPIC_API_KEY=sk-ant-...
# Run the MCP server
pnpm dev
# Run tests
pnpm testMCP Tools
Tool | Description |
| Refresh and rebuild context for an app |
| Push compact starter context bundle |
| Pull targeted context slice by intent |
| Get app state summary + refresh status |
| Get provenance for a bundle/slice |
Architecture
Ingestion → Extraction → Graph → Delivery
fetch summarize build push/pull
parse extract traverse mask
snapshot score validate provenancePipeline Flow
Ingestion: Fetch public web sources (listing, website, help center), parse HTML, create snapshots with content hashes
Extraction: LLM-powered structuring — summarize pages, extract concepts/procedures, score observations, detect conflicts
Graph: Build context graph with nodes (features, procedures, constraints, FAQs, entities) and typed edges (explains, depends_on, resolves, etc.)
Delivery: Serve context via push (starter bundles) or pull (targeted slices) with observation masking and provenance
Configuration
All configuration is in config/:
apps.yaml— App source URLs and crawl settingsmodel-profiles.yaml— LLM provider configs (model, temperature, rate limits)settings.yaml— Task bindings, budgets, masking thresholds, graph settingsprompt-templates/*.hbs— Handlebars templates for all 8 LLM tasks
Supported Apps (MVP)
App | Listing | Website | Help Center |
Notify Me! | apps.shopify.com | notify-me.io | help.notify-me.io |
Subi | apps.shopify.com | subi.co | help.subi.co |
Discounty | apps.shopify.com | discounty.ai | help.discounty.ai |
Convi | apps.shopify.com | conviapp.com | help.conviapp.com |
Development
pnpm build # Compile TypeScript
pnpm dev # Run with tsx (dev mode)
pnpm test # Run all tests
pnpm test:unit # Run unit tests only
pnpm test:contract # Run MCP contract tests
pnpm lint # Type checkRequirements Coverage
Implements REQ-CTX-1 through REQ-CTX-38 from the ContextBuilder agent repository spec. See CLAUDE.md for architecture details.
Available Tools
5 toolsctx.get.app_state_summaryB
Get a high-level summary of app context state including refresh status, available sections, and graph stats.
Inputs: app_key (required).
ctx.get.provenanceB
Get provenance details for a delivered context bundle or slice. Returns source snapshot references and statement-level provenance.
Inputs: app_key (required), artifact_id (required).
ctx.pull.context_sliceC
Pull a targeted context slice for an app based on intent, budget, and required sections. Uses graph-based retrieval and observation masking.
Inputs: request_id (required), app_key (required), intent (required), budget (required), +5 more.
ctx.push.starter_contextC
Push a compact starter context bundle for an app. Returns product overview, key concepts, constraints, and a navigation map for deeper slices.
Inputs: app_key (required), target_agent_ids.
ctx.refresh.app_sourcesC
Refresh and rebuild app context state + graph for a given app. Fetches public web sources, extracts structured content, builds context graph.
Inputs: app_key (required), force, idempotency_key.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: get.app_state_summary retrieves status metadata, get.provenance provides source tracking, pull.context_slice fetches targeted content, push.starter_context delivers initial context, and refresh.app_sources rebuilds the underlying data. There is no functional overlap or ambiguity between these operations.
All tools follow a consistent verb.object pattern with dot notation (e.g., get.app_state_summary, pull.context_slice). The naming is uniform across all five tools, using clear action verbs (get, pull, push, refresh) paired with descriptive nouns.
With 5 tools, this server is well-scoped for context management. Each tool serves a specific role in the lifecycle (retrieval, delivery, refresh), and there are no extraneous or missing tools for the apparent domain of building and managing application context.
The tool set provides complete coverage for context lifecycle operations: retrieving state and provenance (get), pulling targeted slices (pull), pushing starter bundles (push), and refreshing sources (refresh). This covers core workflows from initialization to updates without obvious gaps.
Related MCP Connectors
Stop copy-pasting client context into your AI. 48 connectable providers via MCP.
shared AI-context layer for teams — persistent memory your agents search and update over MCP
Shared, permission-aware company context for AI agents, with provenance, approvals and audit.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.