New:Socket for Asana Is Now Available.Learn more
Get Started

@cleocode/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@cleocode/mcp-server

CLEO MCP Server - 2-gateway CQRS interface for CLEO task management

latest
Source
npmnpm
Version
0.98.4
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

CLEO MCP Server

2-gateway CQRS interface for CLEO task management protocol

License: MIT npm version MCP Registry Node.js Version MCP Protocol

📚 Quick Start | Usage Guide | Workflows | API Docs

Overview

CLEO MCP Server exposes CLEO's CLI and library capabilities through two gateway tools using a CQRS (Command Query Responsibility Segregation) pattern:

  • cleo_query - query operations (read-only)
  • cleo_mutate - mutate operations (state-changing)

Current implementation operation matrix is maintained in:

  • src/gateways/query.ts (EXPECTED_QUERY_COUNT=56)
  • src/gateways/mutate.ts (EXPECTED_MUTATE_COUNT=51)

Total implemented operations: 111 (core contract plus parity extensions).

Token efficiency: 2 tools (~1,800 tokens) vs 65 tools (~32,500 tokens) = 94% reduction

Features

  • Full CLEO Access: 111 implemented operations across 9 domains
  • Protocol Enforcement: RCSD-IVTR lifecycle with exit codes 60-70
  • Anti-Hallucination: 4-layer validation (schema → semantic → referential → protocol)
  • Safety by Design: Read operations cannot mutate state
  • Minimal Token Footprint: 0.9% of 200K context window

Installation

npm install @cleocode/mcp-server

Quick Start

CLEO's CLI auto-detects your installed AI tools and writes configs:

cleo mcp-install              # Interactive: detect and configure
cleo mcp-install --all        # Non-interactive: configure all detected tools
cleo mcp-install --dry-run    # Preview changes without writing

Supported tools (12): Claude Code, Claude Desktop, Cursor, Gemini CLI, Kimi, Antigravity, Windsurf, Goose, OpenCode, VS Code, Zed, Codex

See cleo mcp-install --help for all options.

Option B: Manual Configuration

Add to your tool's MCP config:

{
  "mcpServers": {
    "cleo": {
      "command": "npx",
      "args": ["-y", "@cleocode/mcp-server"]
    }
  }
}
ToolConfig Location
Claude Code.mcp.json (project root)
Claude Desktopclaude_desktop_config.json (OS-specific)
Cursor~/.cursor/mcp.json
Gemini CLI~/.gemini/settings.json
VS Code.vscode/mcp.json (key: servers)
Zed~/.config/zed/settings.json (key: context_servers, JSONC)
OpenCode~/.config/opencode/.opencode.json (key: mcp, array command, JSONC)
Goose.goose/config.yaml (YAML format)
Codex~/.codex/config.toml (TOML format)

Goose YAML config example:

# .goose/config.yaml
extensions:
  cleo:
    args:
    - -y
    - '@cleocode/mcp-server'
    cmd: npx
    enabled: true
    name: cleo
    type: stdio

For local development installs:

{
  "mcpServers": {
    "cleo": {
      "command": "node",
      "args": ["/path/to/cleo-todo/mcp-server/dist/index.js"]
    }
  }
}

Usage Examples

Task Management

// Find tasks
await cleo_query({
  domain: "tasks",
  operation: "find",
  params: { query: "authentication" }
});

// Create task
await cleo_mutate({
  domain: "tasks",
  operation: "create",
  params: {
    title: "Implement authentication",
    description: "Add JWT-based auth system",
    priority: 1
  }
});

// Complete task
await cleo_mutate({
  domain: "tasks",
  operation: "complete",
  params: {
    taskId: "T2405",
    notes: "Completed successfully"
  }
});

Session Management

// Start session
await cleo_mutate({
  domain: "session",
  operation: "start",
  params: {
    scope: "epic:T2400",
    name: "Feature Development",
    autoFocus: true
  }
});

// Set focus
await cleo_mutate({
  domain: "session",
  operation: "focus.set",
  params: { taskId: "T2405" }
});

Orchestration

// Initialize orchestration
await cleo_mutate({
  domain: "orchestrate",
  operation: "startup",
  params: { epicId: "T2400" }
});

// Generate spawn prompt
await cleo_mutate({
  domain: "orchestrate",
  operation: "spawn",
  params: {
    taskId: "T2405",
    skill: "ct-task-executor"
  }
});

Domains

cleo_query (Read-Only)

  • tasks - get, list, find, exists, tree, blockers, deps, analyze, next, relates
  • session - status, list, show, focus.get, history
  • orchestrate - status, next, ready, analyze, context, waves, skill.list
  • research - show, list, query, pending, stats, manifest.read
  • lifecycle - check, status, history, gates, prerequisites
  • validate - schema, protocol, task, manifest, output, compliance.*
  • system - version, doctor, config.get, stats, context, metrics, health, config, diagnostics, help, job.*, dash, roadmap, labels, compliance, log, archive-stats, sequence

cleo_mutate (Write Operations)

  • tasks - create, update, complete, delete, archive, unarchive, reparent, promote, reorder, reopen, relates.add
  • session - start, end, resume, suspend, focus.set, focus.clear, gc
  • orchestrate - startup, spawn, validate, parallel.*
  • research - inject, link, manifest.*
  • lifecycle - progress, skip, reset, gate.*
  • validate - compliance.record, test.run
  • release - prepare, changelog, commit, tag, push, gates.run, rollback
  • system - init, config.set, backup, restore, migrate, sync, cleanup, audit, job.cancel, safestop, uncancel

Configuration

Create .cleo/config.json in your project:

{
  "mcp": {
    "enabled": true,
    "transport": "stdio",
    "features": {
      "queryCache": true,
      "queryCacheTtl": 30000,
      "auditLog": true,
      "strictValidation": true
    }
  },
  "lifecycleEnforcement": {
    "mode": "strict",
    "allowSkip": ["consensus"]
  }
}

Protocol Enforcement

CLEO enforces the RCSD-IVTR lifecycle pipeline:

Research → Consensus → Specification → Decomposition
    ↓
Implementation → Validation → Testing → Release

Exit codes 60-70 indicate protocol violations:

  • 60: Research protocol
  • 61: Consensus protocol
  • 62: Specification protocol
  • 63: Decomposition protocol
  • 64: Implementation protocol
  • 65: Contribution protocol
  • 66: Release protocol
  • 68: Validation protocol
  • 69/70: Testing protocol

Error Handling

All responses include actionable error information:

{
  "success": false,
  "error": {
    "code": "E_VALIDATION_FAILED",
    "exitCode": 6,
    "message": "Title and description must be different",
    "fix": "Provide a unique description",
    "alternatives": [
      {
        "action": "Use generated description",
        "command": "..."
      }
    ]
  }
}

Requirements

  • Node.js: >=18.0.0
  • CLEO: v0.70.0+ installed and initialized
  • Project: .cleo/ directory must exist

Documentation

Getting Started

Complete API Documentation

API Reference

External Resources

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Test
npm test

# Lint
npm run lint

License

MIT License - see LICENSE file for details.

Support

Credits

Built by the CLEO Development Team for solo developers and AI coding agents.

Keywords

mcp

FAQs

Package last updated on 19 Feb 2026

Related posts