Skip to main content

MCP-based contextual flag system for AI assistants

Project description

Context Engine MCP

17 contextual flags for AI assistants. Control how AI thinks and works.

What it does

Gives AI specialized working modes through flags. Like --strict for zero errors or --auto for automatic flag selection.

Quick Start

# Install (recommended)
pipx install context-engine-mcp

# For Claude Code
context-engine-install

# For Continue 
context-engine-install --target cn

Then use in AI:

  • "Fix this bug --auto" → AI selects best flags
  • "--save" → Creates handoff documentation
  • "Analyze --strict" → Multi-angle analysis with zero errors

Note: Manual MCP server setup required after installation (see details below).

17 Flags

Flag Purpose
--analyze Multi-angle systematic analysis
--auto AI selects optimal flag combination
--concise Minimal communication
--explain Progressive disclosure
--git Version control best practices
--lean Essential focus only
--load Load handoff documentation
--parallel Multi-agent processing
--performance Speed and efficiency optimization
--readonly Analysis only mode
--refactor Code quality improvement
--research Technology investigation
--reset Reset session flag state
--save Handoff documentation
--seq Sequential thinking
--strict Zero-error enforcement
--todo Task management

Installation Details

Claude Code

# Install package
pipx install context-engine-mcp

# Install configuration files
context-engine-install

⚠️ Important: After installation, you must manually add the MCP server:

# Choose ONE of these commands:

# Standard Python installation
claude mcp add -s user -- context-engine context-engine-mcp

# UV installation  
claude mcp add -s user -- context-engine uv run context-engine-mcp

# Custom command
claude mcp add -s user -- context-engine <your-command>

This creates MCP server configuration and installs to ~/.claude/.

Continue Extension

# Install package
pipx install context-engine-mcp

# Install configuration files
context-engine-install --target cn

⚠️ Configuration Required: Edit ~/.continue/mcpServers/context-engine.yaml and uncomment ONE option:

# Option 1: Standard Python (most common)
name: Context Engine MCP
command: context-engine-mcp

# Option 2: UV installation  
# name: Context Engine MCP
# command: uv
# args: ["run", "context-engine-mcp"]

# Option 3: Custom installation
# name: Context Engine MCP  
# command: <your-custom-command>

Then restart VS Code and type @ in Continue chat to access MCP tools.

How to Use

In AI Chat

# Auto mode - AI selects flags
"Refactor this code --auto"

# Direct flags
"--save"  # Creates handoff doc
"--analyze --strict"  # Multi-angle analysis with zero errors
"--reset --analyze"  # Reset session and reapply

# Combined flags
"Review this --analyze --strict --seq"

MCP Tools (Called by AI)

  • list_available_flags() - Shows all 17 flags
  • get_directives(['--flag1', '--flag2']) - Activates flags

Development: For local development, use pip install -e . instead of pipx.

Configuration Updates: Edit ~/.context/flags.yaml and restart MCP server to apply changes.

Optional MCP Servers

For enhanced functionality with specific flags, consider installing these additional MCP servers:

For --research flag:

# Documentation and examples server
claude mcp add -s user -- context7 npx -y @upstash/context7-mcp

For --seq flag:

# Sequential thinking server  
claude mcp add -s user -- sequential-thinking npx -y @modelcontextprotocol/server-sequential-thinking

These servers provide specialized tools that complement the respective flags but are not required for basic functionality.

Session Management

  • Duplicate flags show REMINDER only (saves tokens)
  • Use --reset when changing context
  • AI tracks which flags are active

Special: --auto Workflow

--auto is NOT a flag. It's an instruction for AI to:

  1. Analyze your task
  2. Select appropriate flags
  3. Apply them automatically

Example: "Fix this bug --auto" → AI might choose --analyze, --strict, --seq

Files Created

~/.claude/
├── CLAUDE.md           # References @CONTEXT-ENGINE.md
└── CONTEXT-ENGINE.md   # Flag instructions (auto-updated)

~/.continue/
├── config.yaml         # Contains Context Engine rules
└── mcpServers/
    ├── context-engine.yaml
    ├── sequential-thinking.yaml
    └── context7.yaml

~/.context/
└── flags.yaml          # Flag definitions

Uninstallation

# Uninstall (recommended)
context-engine-install --uninstall

# Remove Python package
pip uninstall context-engine-mcp -y

Note: During uninstallation, ~/.context/flags.yaml is backed up to ~/flags.yaml.backup_YYYYMMDD_HHMMSS before removal. During installation, existing flags.yaml is automatically backed up and updated to the latest version.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

context_engine_mcp-1.0.1.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

context_engine_mcp-1.0.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file context_engine_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: context_engine_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for context_engine_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6add96a4193d2805526389b9e1ae2b4099984604bce1abc66836dc3b601f375b
MD5 152b793e73dec0ba8f118da6c0d8b060
BLAKE2b-256 b0fabbacbedb0a399c258cd9c7eab7e75ce71590cdd9eedbd7bb39c14aa5e61f

See more details on using hashes here.

File details

Details for the file context_engine_mcp-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for context_engine_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9772aac1c329beeace4801833c86c3739cb777c9b51075d5c219c8fb832cba6
MD5 2aeadc3302d571038a8e8d33ef5df94c
BLAKE2b-256 fb1ef4e6ed1fe3f0f52a9f9f3b19c6cbc20cda9edfdfbea98db65545216e239e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page