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-engine/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-engine/
└── 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-engine/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.7.tar.gz (27.4 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.7-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: context_engine_mcp-1.0.7.tar.gz
  • Upload date:
  • Size: 27.4 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.7.tar.gz
Algorithm Hash digest
SHA256 1c44b28f756b6fe9dc14578452a92d755b83747979e087c4df8eacba533d458f
MD5 d1de8af3301610f8ea5fe90576d873da
BLAKE2b-256 64d89e89b44e879a10b5149805c1f641695b99b8270c787cbf44be8ca5deca0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for context_engine_mcp-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9c19bcc3ba03e27183dd66fb05bba759105dc3c4deb4a473dd9c1eff7ad64696
MD5 776f6e7d885c761d34c8a83be5686797
BLAKE2b-256 3d23b147d619e0dceff83e586f248343c12e0fdad53e0034dde016296bfe0778

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