# casemargin-mcp-server

Turns a support thread into a structured case brief and scores how ready a ticket is for L2 escalation. Handy when cases change hands.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: Casemargin
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Casemargin/casemargin-mcp-server
- Updated: 2026-08-05
- HTML: https://affpapa.org/en/nevibecode/mcp/casemargin-mcp-server

## What it does

Two tools ship with this server. `generate_case_brief` takes ticket text between 10 and 50,000 characters and returns JSON: a quick assessment, the next step, status, the current problem, actions already taken with their outcomes, and key context. `check_escalation_readiness` scores a ticket from 0 to 100, breaks the score into dimensions, predicts what L2 will ask, and lists what is missing.

It does not pull tickets from anywhere. Zendesk and other helpdesks are out of scope — you paste or pipe the thread in yourself. The server reasons over data you hand it.

An API key is optional. Without one, brief generation falls back to an anonymous per-IP tier, and the escalation check is free either way. When a key is present it travels as a request header, so the server refuses to start if `CASEMARGIN_API_URL` points at a non-`https` origin outside loopback. `npx` fetches the package on first run, so there is nothing to install beforehand.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CASEMARGIN_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add casemargin-mcp-server -e CASEMARGIN_API_KEY=<CASEMARGIN_API_KEY> -- npx -y casemargin-mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add casemargin-mcp-server --env CASEMARGIN_API_KEY=<CASEMARGIN_API_KEY> -- npx -y casemargin-mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "casemargin-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "casemargin-mcp-server"
            ],
            "env": {
                "CASEMARGIN_API_KEY": "<CASEMARGIN_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "casemargin-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "casemargin-mcp-server"
            ],
            "env": {
                "CASEMARGIN_API_KEY": "<CASEMARGIN_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CASEMARGIN_API_KEY=<CASEMARGIN_API_KEY> casemargin-mcp-server npx -y casemargin-mcp-server
```
Replace <…> with your own values

## When to use it
- condense a long ticket thread into a short brief for the next agent
- judge whether a ticket has enough evidence to escalate to L2
- see which questions the second line will ask
- pull the actions already taken and their outcomes out of a thread
- check whether business impact is quantified in the ticket

## Example prompts
- What's happening with this ticket? Here's the thread: customer reports VPN drops every 30 minutes since Monday
- Is this ticket ready to escalate to L2? Score it and tell me what's missing
- Write a case brief for this ticket and give the next step for the receiving agent

## Similar
- [Zendesk Automation](https://affpapa.org/en/nevibecode/skills/zendesk-automation.md) — skill · 4600 installs
- [ticket-resolution](https://affpapa.org/en/nevibecode/skills/ticket-resolution.md) — skill · 2000 installs
- [Help Scout MCP Server](https://affpapa.org/en/nevibecode/mcp/help-scout-mcp-server.md) — MCP server · ★ 45
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [knowledge-base-builder](https://affpapa.org/en/nevibecode/skills/knowledge-base-builder.md) — skill · 667 installs
- [spark-persona-support-agent](https://affpapa.org/en/nevibecode/skills/spark-persona-support-agent.md) — skill · 307 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
