Skip to main content
Glama
briznap

resume-admin

by briznap
README.md
# resume-admin MCP server

A small, local, stdio-based [MCP](https://modelcontextprotocol.io) server that
wraps the admin sign-in API on [resume.naplab.org](https://resume.naplab.org),
so you can ask Claude Code things like *"who last signed in?"* or *"how many
sign-ins in the past week?"* without running `curl` by hand.

It's a thin client: each tool calls the deployed admin API over HTTPS and hands
the JSON back to Claude. All read-only — no write tools, no summarization logic.

## Tools

| Tool | Call | Description |
| --- | --- | --- |
| `last_signin()` | `GET /api/admin/signins?limit=1` | Most recent sign-in row |
| `signin_count(days)` | `GET /api/admin/signins/count?days=N` | Count of sign-ins in the past `days` days |
| `signin_history(email, days=None)` | `GET /api/admin/signins?email=…[&days=N]` | Sign-in rows for an email, optionally time-boxed |

## Setup

```sh
cd ~/Documents/claude/resume-ai-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```

## Configuration

Two environment variables are required; the server fails fast at startup if
either is missing:

| Variable | Example | Purpose |
| --- | --- | --- |
| `ADMIN_API_KEY` | `sk-…` | Secret, sent as the `X-Admin-Key` header on every request |
| `ADMIN_API_BASE_URL` | `https://resume.naplab.org` | Base URL of the admin API |

## Register with Claude Code

Run the server through the venv's Python so the `mcp`/`httpx` deps are on the
path (adjust the interpreter path if you didn't use `.venv`):

```sh
claude mcp add --transport stdio resume-admin \
  --env ADMIN_API_KEY=<your_admin_api_key> \
  --env ADMIN_API_BASE_URL=https://resume.naplab.org \
  -- ~/Documents/claude/resume-ai-mcp/.venv/bin/python ~/Documents/claude/resume-ai-mcp/server.py
```

> If `python` on your `PATH` already has `mcp` and `httpx` installed, you can
> substitute `-- python ~/Documents/claude/resume-ai-mcp/server.py` instead.

Once registered, this config (including your real key) lives in a local Claude
Code config file (`~/.claude.json` or a project `.mcp.json`) — **do not commit
it anywhere**.

## Errors

Failures come back as short messages, not stack traces — e.g. a bad key returns
*"Authentication failed — check ADMIN_API_KEY."*, and a network problem returns
a one-line reachability message. Requests time out after 10s. No retries.