Metadata-Version: 2.4
Name: elm-alm-py
Version: 0.2.1
Summary: MCP server for IBM Engineering Lifecycle Management (ELM) via OSLC REST API
Author-email: Claudio Ferreira Filho <filhocf@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: doors-next,elm,etm,jazz,mcp,oslc,rtc
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.9.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.22.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Description-Content-Type: text/markdown

# elm-alm-py

MCP server for **IBM Engineering Lifecycle Management (ELM)** — read-only access to DOORS Next (RM), RTC (CCM), and ETM (QM) via OSLC REST APIs.

Tested against ELM 7.0.3.

## Install

```bash
uv pip install -e .
```

## Configuration

### Option 1: Interactive login (recommended)

```bash
elm-alm-py login
```

Saves credentials to `~/.elm_creds.json` (password base64-encoded, chmod 600).

### Option 2: Environment variables

```bash
export ELM_URL=https://your-elm-server.example.com
export ELM_USER=your_username
export ELM_PASSWORD=secret
```

## Usage

### As MCP server (stdio)

```bash
elm-alm-py
```

### MCP client configuration

```json
{
  "mcpServers": {
    "elm-alm": {
      "command": "elm-alm-py",
      "env": {
        "ELM_URL": "https://your-elm-server.example.com",
        "ELM_USER": "your_username",
        "ELM_PASSWORD": "secret"
      }
    }
  }
}
```

## Tools

| Tool | Description |
|------|-------------|
| `list_projects(domain)` | List projects for RM/CCM/QM |
| `search_requirements(project, query?)` | OSLC query on RM requirements |
| `get_requirement(uri)` | Get single requirement by URI |
| `list_workitems(project, query?)` | OSLC query on CCM work items |
| `get_workitem(id)` | Get single work item by ID |
| `search_testcases(project, query?)` | OSLC query on QM test cases |
| `create_workitem(project, title, type?, description?, parent_id?, owner?)` | Create a work item (task/story) |
| `update_workitem(id, title?, description?)` | Update work item fields (ETag-based) |
| `add_child_workitem(parent_id, title, type?, description?, owner?)` | Create a child work item |

### Query syntax

The `query` parameter uses [OSLC query syntax](https://docs.oasis-open-projects.org/oslc-op/query/v3.0/oslc-query.html):

```
dcterms:title="My Requirement"
dcterms:modified>="2024-01-01"
```

## ELM 7.x Compatibility

Each domain uses a different OSLC variant:

| Domain | Application | API Pattern |
|--------|-------------|-------------|
| CCM | RTC (Work Items) | OSLC Core 2.0, JSON responses |
| RM | DOORS Next (Requirements) | Discovery 1.0, /views endpoint |
| QM | ETM (Test Cases) | OSLC Core 2.0, XML responses |

## Development

```bash
uv sync --group dev
uv run pytest tests/ -v --cov=elm_alm_py
uv run ruff check src/ tests/
```

## License

MIT
