Skip to main content
Glama

Requirements Risk Analyser

An AI-powered requirements risk analysis pipeline built with TypeScript, Claude API, and MCP.

Finds gaps, ambiguities, and missing acceptance criteria in user stories and PRDs — before a single line of code is written.

Architecture

Three specialised agents run in sequence:

  1. Agent 1 — Requirements Analyst: Extracts structured data from raw requirement text — acceptance criteria, user roles, business rules, third-party dependencies, integrations, and data fields

  2. Agent 2 — Risk Identifier: Analyses the structured requirement and identifies gaps across 10 risk categories with HIGH / MEDIUM / LOW severity

  3. Agent 3 — Report Generator: Produces a quality score /100, a markdown risk report, and posts a comment on the Jira ticket if applicable

Related MCP server: Gigaspec

Risk Categories

Category

What it catches

missing_negative_scenario

No sad path defined

undefined_boundary_value

Ranges implied but not specified

missing_error_handling

Network/DB calls with no failure state

ambiguous_language

should, might, fast, valid, strong

missing_user_role

Which user type does this apply to?

missing_acceptance_criteria

No testable given/when/then

security_gap

No auth, rate limiting, or input validation

third_party_dependency

External service with no fallback

integration_assumption

External API with no timeout/retry

data_privacy_gap

PII with no compliance mention

MCP Tools

  • analyse_requirement — full 3-agent pipeline (file or Jira input)

  • extract_requirements — Agent 1 only

  • identify_risks — Agent 2 only

  • get_risk_report — read last generated report

Tech Stack

  • TypeScript + Node.js

  • Anthropic Claude API (Sonnet 4.6 + Haiku 4.5)

  • Ollama (local LLM support — toggle via USE_OLLAMA)

  • Model Context Protocol (MCP) SDK

  • Jira REST API v3


Setup

git clone https://github.com/abchahal/requirements-risk-analyser.git
cd requirements-risk-analyser
npm install
cp .env.example .env
# Add your ANTHROPIC_API_KEY to .env

Running the pipeline

Via terminal

# Analyse input/requirement.md
npm run pipeline

# Analyse a Jira ticket
npm run pipeline -- --jira PROJ-123

# Analyse inline text
npm run pipeline "As a user I want to reset my password..."

Via Claude Desktop / Claude Code

Analyse the requirement in input/requirement.md
Analyse Jira ticket PROJ-123 for requirement risks

Input

Method

How

File

Paste requirement into input/requirement.md

Jira

Pass --jira TICKET-ID or use the MCP tool

Inline

Pass text as CLI argument


Output

output/
├── risk_report.md          ← full risk report with score
└── archive/
    └── 2025-xx-xx/
        └── risk_report.md  ← previous runs archived automatically

Model Strategy

Agent

Model

Reason

Agent 1

Haiku 4.5

Structured JSON extraction

Agent 2

Sonnet 4.6

Risk reasoning — needs quality

Agent 3

Haiku 4.5

Report formatting


MCP Setup via CLI

Step 1 — Update start-mcp.bat with your path

@echo off
cd /d "C:\path\to\requirements-risk-analyser"
node --loader ts-node/esm src/server.ts

Step 2 — Register the MCP server

claude mcp add -s user requirements-risk-analyser "C:\path\to\requirements-risk-analyser\start-mcp.bat"

Step 3 — Verify

claude mcp get requirements-risk-analyser

Switching between Ollama and Claude API

# Claude API
USE_OLLAMA=false
ANTHROPIC_API_KEY=sk-ant-...

# Ollama
USE_OLLAMA=true
OLLAMA_MODEL=qwen2.5-coder:7b

Restart MCP server after changing .env.


Environment Variables

Variable

Required

Description

ANTHROPIC_API_KEY

Yes (if USE_OLLAMA=false)

Anthropic API key

USE_OLLAMA

Yes

true for local, false for Claude API

OLLAMA_MODEL

No

Default: qwen2.5-coder:7b

JIRA_BASE_URL

No

Your Jira instance URL

JIRA_EMAIL

No

Jira account email

JIRA_API_TOKEN

No

Jira API token

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abchahal/requirements-risk-analyser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server