ai-jobs-agent
ai-jobs-agent MCP server: Exposes an autonomous job-detection agent's data to MCP clients, offering tools to search jobs, retrieve job details, view detection-latency statistics, and trigger on-demand sweeps
README
ai-jobs-agent
An autonomous agent that catches job postings at the source, minutes after they go live, and classifies their UK visa sponsorship stance before they ever reach a job board.
Most aggregator sites index postings hours or days after companies publish them. This agent polls the applicant tracking systems directly (Greenhouse, Lever, Ashby, Workable, and SmartRecruiters public APIs) every 30 minutes, so the headline metric is honest and measured: median detection latency, computed as first_seen_at - posted_at for every posting detected after tracking began. Jobs that disappear from their board are marked closed on the next sweep, so "open roles" stays true.
v1 is deliberately scoped to detect-classify-log. CV tailoring and notifications come later.
Browse the live data: FirstSeen, a free explorer over everything the agent finds, with sponsorship tiers, a licensed-UK-sponsor badge (matched against the Home Office register), and region filters. Served from docs/ on this repo via GitHub Pages.
Architecture
flowchart LR
subgraph Schedule["GitHub Actions, every 30 min"]
direction LR
S[poll.yml] --> G
end
subgraph G["LangGraph state machine"]
direction LR
LC[load_companies] --> F[fetch\n30 ATS boards]
F --> SN[store_new\ndiff vs known jobs]
SN -->|new jobs| CL[classify\nrules, then LLM]
SN -->|nothing new| FIN[finalize]
CL --> FIN
end
F -.-> GH[(Greenhouse API)]
F -.-> LV[(Lever API)]
F -.-> AS[(Ashby API)]
CL -.->|grey zone only| LLM[Claude Haiku]
LLM -.-> LF[Langfuse traces]
FIN --> DATA[(data branch\njobs.jsonl + sweeps.jsonl)]
MCP[MCP server] --> DATA
CD[Claude Desktop / any MCP client] --> MCP
The sponsorship classifier
Three tiers, applied in a strict order that keeps LLM spend proportional to genuine ambiguity, not job volume:
| Tier | Meaning | Decided by |
|---|---|---|
sponsors_explicit |
posting explicitly offers sponsorship | regex rules |
no_sponsorship |
posting explicitly refuses, or demands existing right to work | regex rules (checked first: refusals often contain positive-sounding fragments) |
silent_possible |
no stance stated; treated as a partial positive | rules (no mention at all) or LLM (mentions visas ambiguously) |
Only the grey zone reaches the LLM (Claude Haiku), which sees a windowed excerpt around the sponsorship mention rather than the whole description. Every LLM call is traced to Langfuse with model, token usage, and latency. Without an ANTHROPIC_API_KEY, grey-zone jobs are marked pending and everything else still works.
The latency metric
posted_atcomes from the ATS itself (Greenhousefirst_published, LevercreatedAt, AshbypublishedAt)first_seen_atis stamped the moment a sweep first sees the posting- The very first sweep is a baseline: those jobs are flagged
is_backfilland excluded, otherwise the metric would be polluted by postings that predate tracking - Median and p90 are computed over live-tracked jobs only; every sweep publishes them to its GitHub Actions run summary
With a 30-minute cron the theoretical median is ~15 minutes; the observed number appears in the Actions run summaries and via the MCP job_stats tool.
State without a server
Scheduled runs commit their findings to the data branch as append-only JSONL (jobs.jsonl, sweeps.jsonl), which git stores as tiny line diffs. Each run rehydrates a working SQLite database from the JSONL, sweeps, and appends what it found. The run history doubles as a public, timestamped audit log of every detection.
MCP server
Exposes the agent to Claude Desktop or any MCP client with four tools: job_stats, search_jobs, get_job, run_sweep.
// Claude Desktop config
{
"mcpServers": {
"ai-jobs-agent": {
"command": "python",
"args": ["-m", "jobs_agent.mcp_server"],
"cwd": "/path/to/ai-jobs-agent"
}
}
}
Then ask things like "any new ML roles that sponsor visas since yesterday?" or "what's the median detection latency?"
Quickstart
pip install -r requirements.txt
python -m jobs_agent.cli sweep # one detect-classify-log cycle
python -m jobs_agent.cli stats # metrics summary
python -m jobs_agent.cli search --query "machine learning" --tier sponsors_explicit
Docker:
docker build -t ai-jobs-agent .
docker run --rm -e ANTHROPIC_API_KEY ai-jobs-agent
Deployment (GitHub Actions)
poll.yml runs every 30 minutes. Set repo secrets to enable the full pipeline:
| Secret | Purpose |
|---|---|
ANTHROPIC_API_KEY |
grey-zone LLM classification |
LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY |
tracing of every LLM call |
Without secrets the agent still detects, rules-classifies, and logs latency.
The company registry
jobs_agent/companies.yaml: 88 boards across Greenhouse (56), Lever (7), Ashby (21), Workable (2), and SmartRecruiters (2), every slug verified live against its ATS API; 68 are on the Home Office register of licensed Skilled Worker sponsors. Failing boards are skipped and reported per sweep, so pruning is data-driven. Edit the YAML to change coverage; nothing else needs touching.
Two honest data notes: Workable reports publication dates without a time component, so its jobs are excluded from the minutes-level latency metric rather than distorting it; and SmartRecruiters descriptions are fetched only for postings released in the last 21 days (new postings always qualify, so classification quality is unaffected).
CI
Every push: ruff, pytest (offline, fixture-based), Docker build, then a real integration smoke test: the container polls two live ATS boards and must see jobs with zero board failures. Images publish to GHCR.
Repo layout
jobs_agent/
companies.yaml the shortlist (verified slugs)
ats/ greenhouse.py, lever.py, ashby.py pollers
models.py Job, Tier, Classification, SweepReport
classify.py rules + windowed LLM classifier
tracing.py Langfuse integration (no-op without keys)
graph.py LangGraph sweep state machine
store.py SQLite + latency metric
persistence.py append-only JSONL state for the data branch
mcp_server.py FastMCP server (4 tools)
cli.py sweep / stats / search
tests/ 17 tests: parsers, policy, store, graph, MCP
.github/workflows/ ci.yml (lint/test/build/live smoke), poll.yml (cron)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.