MCP server for Purple Codens — AI Development Orchestration. Lets coding agents (Claude Code etc.) initialize projects, link repositories, and manage workflows.
Project description
Purple Codens MCP Server
MCP (Model Context Protocol) server for Purple Codens — AI Development Orchestration.
Install this package to manage Purple Codens projects from any repository using Claude Code.
Installation
pip install purple-codens-mcp
Or from source:
cd purple-codens/purple-codens-mcp
pip install -e .
Claude Code Integration
Add to .claude/settings.json in your repository:
{
"mcpServers": {
"purple-codens": {
"command": "purple-codens-mcp",
"args": ["--api-url", "https://api.purple.codens.ai"]
}
}
}
Available Tools
Auth
| Tool | Description |
|---|---|
purple_login(api_url, email, password) |
Log in and store JWT in ~/.purple-codens/credentials.json |
purple_whoami(api_url) |
Return current user and organization info |
Project Setup
| Tool | Description |
|---|---|
purple_analyze_repo(cwd?) |
Scan local repo: detect CLAUDE.md, rules, test commands, CI workflows, git remote |
purple_init_project(api_url, name, ...) |
Create project, link repo, import instructions — all in one call |
purple_list_projects(api_url) |
List all projects in the organization |
Repository
| Tool | Description |
|---|---|
purple_add_repository(api_url, project_id, github_owner, github_repo, branch, workflow_type) |
Link a GitHub repository to a project |
purple_list_repositories(api_url, project_id) |
List repositories linked to a project |
Instruction Files
| Tool | Description |
|---|---|
purple_import_instructions(api_url, project_id, repository_id) |
Pull CLAUDE.md + .claude/rules/ from GitHub into Purple Codens |
purple_list_instructions(api_url, project_id) |
List instruction files for a project |
purple_sync_instructions(api_url, project_id, cwd?) |
Diff local files with Purple Codens and update changed ones |
Workflow & Run Management
| Tool | Description |
|---|---|
purple_create_workflow(api_url, organization_id, project_id, name, spec) |
Create a new workflow |
purple_get_run_status(api_url, organization_id, run_id) |
Get current status of a workflow run |
purple_subscribe_run_events(api_url, run_id, max_events?, timeout_seconds?) |
Subscribe to SSE events for a run (org_id resolved from auth token) |
purple_inject_message(api_url, organization_id, project_id, run_id, message) |
Inject an instruction into a heartbeat run |
purple_list_runs(api_url, organization_id, project_id?, status?) |
List workflow runs scoped to org, optionally filtered |
purple_cancel_run(api_url, organization_id, run_id, reason?) |
Cancel a running workflow |
Typical Workflow
# In Claude Code, after adding the MCP server to settings.json:
1. purple_login → authenticate
2. purple_analyze_repo → inspect current repo
3. purple_init_project → create project + link repo + import instructions
4. purple_list_projects → confirm project created
5. purple_sync_instructions → keep instructions in sync as CLAUDE.md evolves
Credential Storage
JWT tokens are stored in ~/.purple-codens/credentials.json with 0600 permissions (owner read/write only). Tokens are keyed by api_url so multiple Purple Codens instances are supported.
On 401 responses, credentials are automatically cleared and an AuthenticationError is raised prompting re-login.
Development
cd purple-codens/purple-codens-mcp
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=src --cov-report=term
Changelog
See CHANGELOG.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file purple_codens_mcp-0.2.0.tar.gz.
File metadata
- Download URL: purple_codens_mcp-0.2.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b6502152eab90b714bd3d700c3ad173710ec03c82f8018317d64168e51a7eae
|
|
| MD5 |
61c557960615f73f67c118feec881e27
|
|
| BLAKE2b-256 |
c6fb12d9ffc556d2c1949ba93f8e663ac6f6aa1254b2a0ced329c9121c6656b7
|
File details
Details for the file purple_codens_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: purple_codens_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c477e515d10ff95b07d6168bb8d099f9f6cdde6b244c1eb1861fc89d524a2653
|
|
| MD5 |
82834d6defdbed2a5807b2b1923cb9dd
|
|
| BLAKE2b-256 |
824b92402bfe9f6b63cc3bbca53c6157aa4eaf521586da38d138e2895aacb2cb
|