RE-Butler MCP Server
README.md
# RE-Butler MCP Server
Outbound MCP server exposing RE-Butler's knowledge and validation tools to neighbour teams and Azure AI Foundry agents.
## Tools
| Tool | Auth | Description |
|---|---|---|
| `search_re_knowledge` | RE.Read | Hybrid semantic search over LLM Wiki |
| `list_knowledge_areas` | RE.Read | List available knowledge domains |
| `get_requirement_template` | RE.Read | Get User Story / EARS / Gherkin templates |
| `get_re_page` | RE.Read | Fetch a specific wiki page |
| `validate_user_story` | RE.Read | INVEST/QUS/EARS validation |
| `create_work_item` | RE.Admin | Create ADO work item (HITL Gate C) |
## Setup
```bash
pip install -e ".[dev]"
cp .env.example .env # fill in values
python -m re_butler_mcp.server
```
## Tests
```bash
pytest
```
## Smoke Test
```bash
# Against local server
python scripts/smoke_test_client.py
# Against deployed server
python scripts/smoke_test_client.py https://ca-genai4re-mcp-dev.<region>.azurecontainerapps.io/mcp
```
## Infrastructure
```bash
cd infra
az deployment group create \
--resource-group rg-genai4re-dev \
--template-file main.bicep \
--parameters containerImage=myacr.azurecr.io/re-butler-mcp:latest acrName=myacr
```
## Auth
- Callers must present a valid Entra ID Bearer JWT.
- App Roles: `RE.Read` (all reads), `RE.Admin` (write tools).
- Pre-authorize client app registrations in the server's app registration manifest.
- Managed Identity handles all outbound calls (Search, OpenAI, ADO).
## HITL Gate C
`create_work_item` always returns `approval_pending: true`. The calling workflow (Foundry / Durable Functions) must implement the approval step before the work item becomes active. Do not implement Gate C inside Connected Agent tools — keep it in the workflow layer.
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessSyncing