Metadata-Version: 2.4
Name: codens-mcp
Version: 0.1.0
Summary: Unified MCP server for Codens family — Red (auto-fix), Blue (QA), Green (PRD), Auth, plus all Purple tools via purple-codens-mcp.
Project-URL: Homepage, https://github.com/Corevice/purple-codens/tree/main/codens-mcp
Project-URL: Repository, https://github.com/Corevice/purple-codens
Project-URL: Issues, https://github.com/Corevice/purple-codens/issues
Project-URL: Changelog, https://github.com/Corevice/purple-codens/blob/main/codens-mcp/CHANGELOG.md
Author-email: Corevice <engineering@corevice.com>
License: MIT
License-File: LICENSE
Keywords: agent,auto-fix,automation,claude,codens,mcp,prd,qa,workflow
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: anyio>=4.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: purple-codens-mcp>=0.2.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# codens-mcp

[![PyPI version](https://img.shields.io/pypi/v/codens-mcp)](https://pypi.org/project/codens-mcp/)
[![Python](https://img.shields.io/pypi/pyversions/codens-mcp)](https://pypi.org/project/codens-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Unified MCP server for the **Codens family** — lets Claude Code and other AI agents operate all Codens services through a single package.

Includes all 16 **Purple** tools (re-exported from `purple-codens-mcp`) plus new tools for **Red** (auto-fix), **Blue** (QA), **Green** (PRD), and **Auth Codens**.

## Installation

```bash
pip install codens-mcp
```

## Quick Start (Claude Code)

Add to your `.claude/settings.json`:

```json
{
  "mcpServers": {
    "codens": {
      "command": "codens-mcp",
      "args": []
    }
  }
}
```

Then log in once via `purple_login` — the JWT issued by Auth Codens is accepted by all family backends.

## Available Tools (30 total)

### Auth / Session (Purple)
| Tool | Description |
|------|-------------|
| `purple_login` | Log in via browser OAuth, device code, or email+password |
| `purple_whoami` | Show current authenticated user and organization |

### Project Setup (Purple)
| Tool | Description |
|------|-------------|
| `purple_analyze_repo` | Scan local repo and return structured analysis |
| `purple_list_projects` | List all projects in the organization |
| `purple_init_project` | Full project setup: create → link repo → import instructions |

### Repository (Purple)
| Tool | Description |
|------|-------------|
| `purple_add_repository` | Link a GitHub repository to a project |
| `purple_list_repositories` | List repositories linked to a project |

### Instruction Files (Purple)
| Tool | Description |
|------|-------------|
| `purple_import_instructions` | Import CLAUDE.md + .claude/rules/ from GitHub |
| `purple_list_instructions` | List instruction files for a project |
| `purple_sync_instructions` | Diff local vs remote, update changed files |

### Workflow & Runs (Purple)
| Tool | Description |
|------|-------------|
| `purple_create_workflow` | Create a new workflow |
| `purple_get_run_status` | Get current status of a workflow run |
| `purple_list_runs` | List workflow runs (filter by project/status) |
| `purple_cancel_run` | Cancel a running workflow |
| `purple_inject_message` | Inject a message into a heartbeat run |
| `purple_subscribe_run_events` | Stream SSE events for a workflow run |

### Red Codens — Auto-Fix
| Tool | Description |
|------|-------------|
| `red_create_bug_report` | Create a bug report (agent endpoint) |
| `red_get_bug_report` | Get a bug report by ID |
| `red_analyze_bug_report` | Trigger AI analysis for a bug report |
| `red_submit_bug_fix_plan_to_purple` | Submit a fix plan to Purple for execution |

### Blue Codens — QA Automation
| Tool | Description |
|------|-------------|
| `blue_list_e2e_tests` | List E2E tests |
| `blue_generate_e2e_test` | Generate an E2E test from a natural-language requirement |
| `blue_run_e2e_test` | Trigger a run for an existing E2E test |
| `blue_get_e2e_test_results` | Get results for an E2E test (latest run) |

### Green Codens — PRD Management
| Tool | Description |
|------|-------------|
| `green_create_consultation_with_message` | Start a consultation and send the first message |
| `green_send_consultation_message` | Send a message in an existing consultation |
| `green_convert_consultation_to_prd` | Convert a consultation into a PRD |
| `green_create_kickoff` | Create a Kickoff in Green Codens |

### Auth Codens
| Tool | Description |
|------|-------------|
| `auth_agent_signup` | Issue capability_token via existing user's API key |
| `auth_get_pricing` | Public pricing.json (no auth required) |

## Changelog

See [CHANGELOG.md](CHANGELOG.md).

## License

MIT — Copyright 2026 Corevice Inc.
