ensemble-mcp docs
Presentation GitHub

Troubleshooting

Common issues and solutions for ensemble-mcp.

Installation Problems

pip install fails with dependency conflicts

Symptoms: Dependency resolver errors, version conflicts with numpy, onnxruntime, or mcp.

Solutions:

ensemble-mcp: command not found

Solutions:


ONNX Model Download Issues

Model download fails or is slow

Symptoms: First run hangs or fails with network errors. The model is ~22 MB from Hugging Face.

Model URLs:

Solutions:

  1. Check network connectivity to huggingface.co
  2. Manually download and place files:
    mkdir -p ~/.cache/ensemble-mcp/models
    curl -L -o ~/.cache/ensemble-mcp/models/model.onnx \
      "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/onnx/model.onnx"
    curl -L -o ~/.cache/ensemble-mcp/models/tokenizer.json \
      "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/tokenizer.json"
  3. If behind a proxy, set HTTP_PROXY / HTTPS_PROXY environment variables

ONNX Runtime errors

Symptoms: onnxruntime import errors or inference failures.

Solutions:


MCP Registration Failures

ensemble-mcp install finds no tools

Symptoms: “Nothing to do — ensemble-mcp is already registered in all detected AI tools.”

Solutions:

Config file backup/permission errors

Symptoms: Permission denied when writing to AI tool config files.

Solutions:

Unknown tool name error

Symptoms: Unknown tool(s): <name>

Solutions:


SQLite Lock Errors

Database is locked

Symptoms: sqlite3.OperationalError: database is locked

Cause: Multiple processes writing to the same database simultaneously. The database uses WAL (Write-Ahead Logging) mode for better concurrency, but heavy concurrent writes can still cause contention.

Solutions:

  1. Ensure only one MCP server instance is running per database
  2. The dashboard opens separate connections — this is normal and handled correctly
  3. If the database is corrupted, reset it:
    rm ~/.cache/ensemble-mcp/data.db
    # The database is recreated automatically on next start

Database file not found

Solutions:


Dashboard Issues

Dashboard won't start

Symptoms: Port already in use error.

Error: Port 8787 is already in use.
Try: ensemble-mcp web --port 8788

Solutions:

Dashboard shows no data

Solutions:

Browser doesn't open

Solutions:


Tool Errors

VALIDATION_* errors

These indicate bad input — never retry automatically.

Error CodeMeaningFix
VALIDATION_MISSING_FIELDRequired parameter not providedCheck tool documentation for required params
VALIDATION_INVALID_VALUEParameter value is invalidCheck type, range, or allowed values
VALIDATION_INVALID_TYPEWrong parameter typeCheck expected types in tool reference
VALIDATION_CONSTRAINTBusiness rule violatione.g., reset requires confirm=true

NOT_FOUND_* errors

Resource not found — never retry.

Error CodeFix
NOT_FOUND_SESSIONCheck session_id exists
NOT_FOUND_PATTERNPattern may have been pruned or deleted
NOT_FOUND_PROJECTRun project_index first, or check path
NOT_FOUND_SKILL_SUGGESTIONSuggestion ID doesn't exist

CONFLICT_* errors

Concurrency conflicts — retry after refreshing state.

Error CodeMeaningFix
CONFLICT_VERSION_MISMATCHOptimistic lock failureRe-load the session, get current version
CONFLICT_ALREADY_RESOLVEDSkill suggestion already accepted/dismissedNo action needed

IO_* errors

Transient I/O errors — retry with backoff.

Error CodeFix
IO_DATABASECheck SQLite file permissions and disk space
IO_FILESYSTEMCheck directory permissions
IO_MODEL_DOWNLOADCheck network connectivity

Resetting Everything

Reset database (keep model)

# Via MCP tool (from AI agent)
# Call the `reset` tool with confirm=true

# Via dashboard
# POST /api/reset with {"confirm": true}

# Via filesystem
rm ~/.cache/ensemble-mcp/data.db

Full clean reset

# Remove all cached data and config
ensemble-mcp uninstall --clean-data --remove-agents --yes

# Or manually
rm -rf ~/.cache/ensemble-mcp
rm -rf ~/.config/ensemble-mcp

Re-download model

rm -rf ~/.cache/ensemble-mcp/models
# Model is re-downloaded on next server start

Debugging

Check server health

# Via dashboard API
curl http://127.0.0.1:8787/api/health

Inspect database

sqlite3 ~/.cache/ensemble-mcp/data.db ".tables"
sqlite3 ~/.cache/ensemble-mcp/data.db "SELECT COUNT(*) FROM patterns"

Logging

The server uses Python's logging module, hardcoded to INFO level. There is no ENSEMBLE_MCP_LOG_LEVEL environment variable — the Settings dataclass does not have a log_level field, so it would be silently ignored.

Supported ENSEMBLE_MCP_* environment variables map directly to Settings fields:

# Override storage paths
ENSEMBLE_MCP_CACHE_DIR=~/.my-cache/ensemble-mcp ensemble-mcp
ENSEMBLE_MCP_DB_PATH=/tmp/ensemble-debug.db ensemble-mcp

# Tune pattern matching
ENSEMBLE_MCP_MAX_PATTERNS=2000 ensemble-mcp
ENSEMBLE_MCP_DEFAULT_TOP_K=10 ensemble-mcp
ENSEMBLE_MCP_DEFAULT_MIN_SCORE=0.5 ensemble-mcp

# Adjust drift thresholds
ENSEMBLE_MCP_DRIFT_THRESHOLD_ALIGNED=0.15 ensemble-mcp
ENSEMBLE_MCP_DRIFT_THRESHOLD_MINOR=0.4 ensemble-mcp

Check config sources

# Via dashboard API — shows where each setting came from
curl http://127.0.0.1:8787/api/settings | python -m json.tool

Next Steps