Skip to main content
Glama
AgnesMuita

Request Triage MCP Server

by AgnesMuita
README.md
# Request Triage Agent

Most of the "AI agent" projects I'd built before this were really just RAG pipelines with extra steps; just  ask a question, retrieve some context, get an answer back. Nothing was actually *deciding* anything. This one does: give it a pile of automation requests from different teams and it works out, on its own, which ones matter most and why.

## What it does

Feed it a backlog of requests sitting in a Notion database eg "Sales wants X," "Support wants Y," each tagged with a rough urgency and effort. Point the agent at it, and it scores every request, writes a short rationale for each score, and hands back a ranked list. Nobody told it the order of operations, it figures out by itself.

## How it works

Three tools, exposed through an MCP server:

- `list_pending_requests` — pull everything still waiting to be triaged
- `save_priority_score` — write a score (1-100) and a one-line rationale back to a request
- `get_ranked_backlog` — pull the final ranked list once everything's scored

Claude gets the goal and those three tools, nothing else. It calls whichever one it needs, looks at what comes back, and decides the next move. This loop is the whole project. `agent.py` is basically that loop and nothing more.

Notion is just the system of record here, not the point. Swap it for a database or a Slack channel and the agent logic doesn't change. This is the actual value of building it on MCP instead of writing one-off glue code to Notion's API directly in the agent.

## Stack

- Claude (Sonnet) for the reasoning
- MCP (`mcp` Python SDK) for the tool layer; server in `mcp_server.py`, client/loop in `agent.py`
- Notion API for storage (raw REST calls in `notion_helper.py`, no SDK; wanted to see the actual request/response shape)

## Running it

```bash
pip install -r requirements.txt
cp .env.example .env   # fill in your Anthropic key + Notion integration token + database ID
python notion_helper.py   # seeds a handful of sample requests
python agent.py            # watch it triage them
```

You'll need a Notion integration with access to a database that has these columns: `Request` (title), `Team` (select), `Urgency` (select), `Effort` (select), `Status` (select: Pending/Scored), `Priority Score` (number), `Rationale` (text).

## Why

I wanted to actually build something that takes actions instead of just answering questions, and prioritization-under-competing-demands felt like the most honest test of that; it's a real problem and "here's my reasoning for the ranking" is a much better answer than a black-box score.

Maintenance

ActivityStale
ResponsivenessNo issues