Context Engineering MCP Server
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., "@Context Engineering MCP Server Generate a PRP for a new authentication feature based on my project context"
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.
Context Engineering MCP Server
π A comprehensive MCP server that automates Cole Medin's context engineering methodology for creating high-quality Product Requirements Prompts (PRPs).
π― Overview
This MCP server implements the context engineering methodology created by Cole Medin in his Context Engineering Introduction repository. It provides intelligent automation for creating comprehensive Product Requirements Prompts that account for your existing codebase context.
What This Server Does
The Context Engineering MCP Server intelligently analyzes your existing codebase and automatically generates:
π Contextual Questions based on detected patterns and frameworks
π Comprehensive INITIAL.md documentation following Cole's methodology
π Product Requirements Prompts (PRPs) using proven templates
π― Execution Guidance with agent recommendations and task breakdowns
πΎ Persistent Storage for managing PRPs and project context
π Archon Integration for seamless task and knowledge management
Why Use This Server?
Instead of starting with blank requirements documents:
Analyzes your existing code to understand architecture and patterns
Asks intelligent questions specific to your tech stack and domain
Synthesizes insights into comprehensive documentation
Generates actionable PRPs that account for your current context
Provides storage and versioning for long-term project management
Related MCP server: MCP Prompt Enhancer
π MCP Tools (9 Available)
Core Context Engineering Tools
list_templates- List all available PRP templates with optional category filteringgenerate_prp- Generate a Product Requirements Prompt based on a template and project contextvalidate_prp- Validate a PRP against context engineering best practicessearch_templates- Search for templates by name, description, or tagscreate_custom_template- Create new custom PRP templatesanalyze_context- Analyze project context to recommend suitable templates and improvements
Storage & Management Tools
list_prps- List all stored PRPs with filtering and search capabilitiesupdate_prp- Update existing PRPs with version trackingmanage_storage- Manage storage operations, backup, and maintenance
π MCP Resources (5 Available)
Templates (
context-engineering://templates) - Collection of PRP templatesPatterns (
context-engineering://patterns) - Code analysis patterns and rulesInitial (
context-engineering://initial) - INITIAL.md generation templatesRules (
context-engineering://rules) - Global context engineering rulesPRPs (
context-engineering://prps) - Stored Product Requirements Prompts
π Quick Start
Installation
# Clone the repository
git clone https://github.com/locomotive-agency/context-engineering-mcp.git
cd context-engineering-mcp
# Install dependencies
npm install
# Build the TypeScript code
npm run build
# Start the MCP server
npm startDemo Integration
# Run the comprehensive demo
node demo-integration.jsβοΈ Claude Desktop Configuration
Add this configuration to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"context-engineering": {
"command": "node",
"args": ["/path/to/context-engineering-mcp-server/dist/index.js"],
"env": {
"TEMPLATES_DIR": "/path/to/context-engineering-mcp-server/templates",
"EXTERNAL_TEMPLATES_DIR": "/path/to/context-engineering-mcp-server/external/context-engineering-intro",
"DATA_DIR": "/path/to/context-engineering-mcp-server/data"
}
}
}
}Claude Code Integration
# Add to Claude Code via MCP
claude-code mcp add context-engineering /path/to/context-engineering-mcp-server/dist/index.jsπ§ Configuration Options
Environment Variables
TEMPLATES_DIR- Directory containing internal templates (default:./templates)EXTERNAL_TEMPLATES_DIR- Directory for Cole's external templates (default:./external/context-engineering-intro)DATA_DIR- Directory for persistent storage (default:./data)NODE_ENV- Environment mode (development,production,test)
Server Capabilities
Archon Integration - Automatic integration with Archon MCP for task and knowledge management
Version Control - Full version tracking for PRPs with diff generation
Concurrent Operations - Supports up to 10 concurrent storage operations
Template Synchronization - Automatic syncing with Cole's upstream templates
π Usage Examples
Basic PRP Generation
// List available templates
const templates = await mcp.call('list_templates', { category: 'web-app' });
// Generate a PRP for a Next.js project
const prp = await mcp.call('generate_prp', {
templateId: 'nextjs-app-template',
projectContext: {
name: 'E-commerce Platform',
domain: 'retail',
stakeholders: ['Product Manager', 'Engineering Team', 'Design Team'],
objectives: ['Build scalable e-commerce platform', 'Implement modern UX'],
constraints: ['Budget: $50k', 'Timeline: 3 months']
},
saveToStorage: true,
outputFormat: 'markdown'
});Context Analysis Workflow
// Analyze project context
const analysis = await mcp.call('analyze_context', {
projectContext: {
name: 'Mobile Banking App',
domain: 'fintech',
description: 'Secure mobile banking application with real-time transactions',
stakeholders: ['Bank Executives', 'Compliance Team', 'Customers'],
constraints: ['PCI DSS Compliance', 'SOX Compliance', 'High Security Requirements']
}
});
// Use recommended template
const prp = await mcp.call('generate_prp', {
templateId: analysis.recommendedTemplates[0].id,
projectContext: analysis.enhancedContext
});Storage Management
// List stored PRPs
const prps = await mcp.call('list_prps', {
category: 'fintech',
status: 'active',
limit: 10
});
// Update a PRP
const updated = await mcp.call('update_prp', {
id: 'prp-123',
updates: {
status: 'completed',
metadata: { version: '2.0' }
},
comment: 'Updated requirements based on stakeholder feedback'
});ποΈ Architecture
Transport & Protocol
Protocol: MCP (Model Context Protocol) v0.6.0
Transport: StdioServerTransport for client communication
Security: Input validation with Zod schemas
Core Components
TemplateManager
Loads templates from internal and external directories
Provides search, filtering, and categorization
Handles template validation and caching
Syncs with Cole Medin's upstream repository
PRPGenerator
Generates PRPs from templates with context substitution
Supports multiple output formats (Markdown, JSON, HTML)
Handles custom sections and metadata
Integrates with storage and version control
StorageSystem
Persistent storage for PRPs and project context
Version tracking with diff generation
Concurrent operation management
Backup and recovery capabilities
IntegrationsManager
Seamless integration with Archon MCP server
Automatic task creation from PRP sections
Knowledge synchronization
Health monitoring and fallback handling
External Integration
The project uses git subtree to integrate Cole Medin's original templates:
# Sync with upstream templates
./scripts/sync-templates.shπ§ͺ Testing
The project follows Test-Driven Development (TDD) principles:
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run specific test suites
npm run test:unit # Unit tests
npm run test:integration # Integration tests
npm run test:e2e # End-to-end tests
npm run test:performance # Performance tests
# Watch mode for development
npm run test:watchTest Coverage
Project Structure Tests: Validate directory structure and configuration
Unit Tests: Test individual components and functions
Integration Tests: Test MCP tool and resource handlers
End-to-End Tests: Test complete workflows
Performance Tests: Test under load and stress conditions
Current test status: 58 tests passing with comprehensive coverage.
π οΈ Development
Prerequisites
Node.js 18+
npm or yarn
TypeScript 5.3+
Development Commands
# Watch mode for development
npm run dev
# Type checking
npm run type-check
# Linting and formatting
npm run lint
npm run lint:fix
npm run format
npm run format:check
# Validation pipeline
npm run validate # Runs lint + type-check + all tests
# Template synchronization
npm run sync-templatesProject Structure
βββ src/
β βββ tools/ # MCP tool implementations (9 tools)
β β βββ generate-prp.ts
β β βββ validate-prp.ts
β β βββ list-templates.ts
β β βββ search-templates.ts
β β βββ create-custom-template.ts
β β βββ analyze-context.ts
β β βββ list-prps.ts
β β βββ update-prp.ts
β β βββ manage-storage.ts
β βββ resources/ # MCP resource handlers (5 resources)
β β βββ handlers/
β β βββ resource-manager.ts
β βββ lib/ # Core logic components
β β βββ template-manager.ts
β β βββ prp-generator.ts
β β βββ storage.ts
β β βββ change-tracker.ts
β β βββ integrations.ts
β β βββ execution-guidance.ts
β βββ types/ # TypeScript type definitions
β βββ index.ts # Main server entry point
βββ templates/ # Internal PRP templates
βββ external/ # Git subtree for Cole's templates
β βββ context-engineering-intro/
βββ data/ # Persistent storage directory
βββ scripts/ # Utility scripts
β βββ sync-templates.sh # Template synchronization
β βββ test-coverage-report.js
βββ test/ # Test suites
β βββ unit/
β βββ integration/
β βββ e2e/
β βββ performance/
βββ dist/ # Built JavaScript outputπ€ Contributing
We welcome contributions! This project builds upon Cole Medin's excellent foundation.
Development Workflow
Follow TDD approach - write tests first
Use TypeScript with strict mode
Follow ESLint and Prettier configurations
Update tests when adding new features
Keep external templates synced via git subtree
Ensure all CI checks pass
Code Style
TypeScript strict mode enabled
ESLint + Prettier for consistent formatting
Comprehensive type definitions
Extensive test coverage required
Documentation for all public APIs
π Credits & Attribution
This project is built upon the excellent context engineering methodology created by Cole Medin:
Original Repository: context-engineering-intro
Methodology: Cole Medin's context engineering approach for PRP generation
Templates: Integrated via git subtree from Cole's repository
Inspiration: Cole's systematic approach to requirements engineering
Contributors
Cole Medin - Original context engineering methodology and templates
Claude/Anthropic - MCP server implementation and automation
croakingtoad - Project coordination and testing
π License
MIT License - see LICENSE file for details.
This project incorporates templates and methodology from Cole Medin's context-engineering-intro repository, used with attribution under open source principles.
π Related Resources
MCP Specification - Model Context Protocol documentation
Cole's Context Engineering - Original methodology
Archon MCP - Task and knowledge management integration
Claude Desktop - Primary MCP client
π Support & Issues
Issues: Report bugs and feature requests via GitHub Issues
Discussions: Use GitHub Discussions for questions and ideas
Documentation: Comprehensive docs in the
/docsdirectory (coming soon)
Made with β€οΈ by the Locomotive Agency team, built upon Cole Medin's excellent foundation
Available Tools
9 toolsanalyze_contextC
Analyze project context to recommend suitable templates and improvements
Inputs: projectContext (required).
create_custom_templateC
Create a new custom PRP template
Inputs: name (required), category (required), sections (required), description (required), +1 more.
generate_prpA
Generate a Product Requirements Prompt based on a template and project context with storage integration
Inputs: templateId (required), projectContext (required), tags, author, +8 more.
list_prpsC
List and search PRPs with advanced filtering and sorting capabilities
Inputs: tags, limit, query, offset, +6 more.
list_templatesA
List all available PRP templates with optional filtering by category
Inputs: category.
manage_storageC
Manage storage operations including versioning, change tracking, conflicts, and integrations
Inputs: action (required), author, fileId, toDate, +15 more.
search_templatesA
Search for templates by name, description, or tags
Inputs: query (required), category.
update_prpB
Update an existing PRP with change tracking and optional Archon synchronization
Inputs: id (required), content (required), tags, author, +5 more.
validate_prpC
Validate a PRP against context engineering best practices
Inputs: prpContent (required), templateId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 9 tools
Most tools have distinct purposes: analyze_context, generate_prp, validate_prp, etc. The only overlap is between list_templates and search_templates, which could cause confusion, but descriptions help differentiate browsing vs. searching.
All tool names follow a consistent verb_noun pattern (analyze_context, list_templates, generate_prp, etc.). No mixed conventions or vague verbs.
9 tools is well within the ideal 3-15 range and each tool contributes to the template and PRP lifecycle. The count feels appropriate for the server's scope.
The tool surface covers template listing/searching/creation and PRP generation/validation/listing/update, but lacks delete operations for both templates and PRPs. Also, there is no direct 'get_prp' by ID, though list_prps may suffice. These are notable gaps for a management server.
Maintenance
Related MCP Connectors
Turn PRDs and product ideas into structured specs so coding agents build your intent, not theirs.
Context engineering for AI coding agents: product context, project missions, and 360 memory.
Turns vague automation requests into tool stacks, prompts, QA checks, and human boundaries.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.β¦
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA code ingestion tool that transforms your code into AI-optimized prompts instantly. Gather the relevant context with code2prompt under the hood. Learn more at code2prompt.dev7,752MIT
- AlicenseNot gradedqualityDmaintenanceIntelligently analyzes codebases to enhance LLM prompts with relevant context, featuring adaptive context management and task detection to produce higher quality AI responses.2MIT
- FlicenseAqualityCmaintenanceRefines and improves AI prompts using workspace-aware context from your project's tech stack, structure, and dependencies. Includes tools to analyze prompt quality and generate well-structured prompts from raw ideas.4209 npm5-
- AlicenseAqualityDmaintenanceAutomatically generates and manages a prompts system for software projects, enabling persistent context for AI coding assistants through project scanning, requirement clarification, and module tracking.831 npmMIT