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

# Complete uninstall from all environments (Claude Code + Continue)
context-engine uninstall

# Remove Python package
pipx uninstall context-engine-mcp

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.3.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.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: context_engine_mcp-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 b0a16e448de285e5e0b8d80d5a0fa8a920677fb3b8b5204cbd9a3b996e92a2e6
MD5 38398a6932a68b20175d882bf4258c65
BLAKE2b-256 b04ba6a2c73e5a8bdb635e8248830e652c6143302c799890dcf4406a027bbf72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for context_engine_mcp-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 15a62e2bc5200bf184531672e2dfc4d535fea56ecd3c7e097e985de97e29f501
MD5 0a865873decddb029e31212b77e2c440
BLAKE2b-256 00047c768e2b149c6740222c5f0fa875c3409abaa6d40e55d337e38f8b5ca49c

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