[Feature]: MCP Server + ATS Parse-Check + Optional PostgreSQL Backend
Problem
Resume-Matcher has no programmatic interface for agents, and no deterministic check that a resume file (uploaded or rendered by Resume-Matcher) survives ATS-style text extraction. The keyword ATS score (#813) measures content relevance, not parseability:
- Keyword score (existing): does the resume contain relevant terms for the job?
- Parse-check (proposed): can an ATS text extractor recover the resume's content, structure, and order?
A resume can score well on keywords yet fail to parse.
Solution
Three independent features, each split into small PRs.
1. MCP Server
Exposes Resume-Matcher's core operations (22 tools, see appendix) over stdio for local MCP clients and optional Streamable HTTP (off by default) for running apps and Docker. Targets MCP spec 2026-07-28 via the official SDK mcp==2.2.0, backward compatible with handshake-era clients. HTTP requires a token and validates Host/Origin. No destructive tools; no /config/* or delete routes.
The MCP work was built against the pre-#1010 single-master model. I will follow up with a separate PR adapting the MCP tools to master tracks, and will rebase all branches onto current main before opening PRs.
2. ATS Parse-Check
A deterministic engine (no LLM) with two paths:
- File upload (PDF/DOCX): bounded
pdfminer.sixandpython-docxextraction. - Resume-Matcher output: extracts the exact bytes
/api/v1/resumes/{id}/pdfreturns for a template and settings, then compares against the rendered payload.
The report contains extractability, a parseability score (extraction + layout checks) and a separate content score, per-check IDs and parameters (text rendered from locale files, all 7 locales), a round-trip result (content_recall, order_fidelity via Kendall tau), and heuristic vendor profiles (Workday, Taleo, iCIMS, Greenhouse, Lever, SuccessFactors) labeled as approximations. Round-trip is self-consistency, not real ATS accuracy, and is labeled so. Portions are ported from MIT-licensed sunnypatell/ats-screener and hugounoclaw/ats-checker, with attribution in THIRD_PARTY_NOTICES.md.
Evidence: Raw pdfminer.six (a plain ATS-style extractor) splits the clean template's letter-spaced headings ("SU M M A R Y"); the parse check's extractor rejoins gap-split words, so it does not penalize clean for this. The two-column templates interleave columns, garbling the summary and an education entry (content recall 0.947 on the test fixture). I will file details separately.
3. Optional PostgreSQL Backend
For durability, backups, and remote/shared hosting, enabled via DATABASE_URL. SQLite remains the unchanged default.
- Writes are serialized per database schema via a transaction-scoped advisory lock under READ COMMITTED, with the same invariants as SQLite's
BEGIN IMMEDIATE. No write-throughput gain; app instances in different schemas of one database do not block each other. - Opt-in
docker-compose.postgres.ymloverride; the defaultdocker compose upis unchanged. - The most likely candidate to stay fork-only.
Proposed PR Sequence
1a. feat/mcp-stdio: MCP core, bridge, tools, stdio entry
1b. feat/mcp-http: Streamable HTTP transport + auth
2a-i. feat/ats-parse-engine: engine + POST /ats/parse-check
2a-ii. feat/ats-parse-own-output-clean: POST /resumes/{id}/parse-check, round-trip, all templates (MCP-free, so parse-check does not depend on the MCP PRs)
2b. feat/ats-parse-ui: UI panel + 7-locale i18n
3. feat/mcp-ats-tools: parse-check MCP tools + tailor_and_verify
4. feat/postgres-backend: optional PostgreSQL
1b and 2a-i/2a-ii touch the same lines in main.py and pyproject.toml; whichever lands second needs a trivial rebase.
Questions
- MCP: In-repo as proposed, or a separate package?
- Postgres: Worth reviewing upstream, or keep it fork-only?
- Naming/placement: Preferences for router names, module structure, or doc paths?
If this direction works, I am ready to open the PRs, and happy to scope any part down first.
Appendix: MCP Tools
| Tool | Purpose | Backing route |
|---|---|---|
get_status |
LLM config, DB stats, render path | In-process |
upload_resume |
Upload a resume file | POST /resumes/upload |
list_resumes, get_resume |
Fetch resumes | GET /resumes, /resumes/list |
update_resume, set_resume_title |
Edit content / rename | PATCH /resumes/{id}, /title |
add_jobs, get_job |
Jobs | jobs.py endpoints |
tailor_resume_preview, tailor_resume_confirm |
Tailor | POST /resumes/improve/{preview,confirm} |
generate_cover_letter/outreach/interview_prep |
Generators | POST /resumes/{id}/generate-* |
export_resume_pdf |
Render PDF | GET /resumes/{id}/pdf |
ats_parse_check_file |
Parse-check an uploaded file | POST /ats/parse-check |
ats_parse_check_resume |
Parse-check own render | POST /resumes/{id}/parse-check |
tailor_and_verify |
Tailor, render, parse-check | Composed |
list/create/update_application |
Tracker | GET/POST/PATCH /applications |
get_task, cancel_task |
Long-running tasks | In-process registry |
Appendix: Report Excerpt (schema 2.0)
Real output for the swiss-two-column fixture render, trimmed (evidence and most entries omitted). overall_score is parseability; content quality is content_score.
{
"schema_version": "2.0",
"extractability": "full",
"overall_score": 90,
"content_score": 90,
"checks": [
{"id": "multi_column", "category": "layout", "severity": "medium", "status": "fail",
"params": {"pages": [1], "expected_by_template": true}},
{"id": "section_headings", "category": "content", "severity": "medium", "status": "fail",
"params": {"found": ["experience", "skills"], "missing": ["education"], "render_locale": "any"}}
],
"roundtrip": {
"content_recall": 0.947,
"order_fidelity": 0.729,
"truncated": false,
"fields": [
{"field": "summary", "status": "garbled", "score": 0.783},
{"field": "heading.additional", "status": "not_rendered", "score": 0.0},
{"field": "heading.volunteering", "status": "hidden", "score": 0.0}
]
},
"profiles": [{"id": "workday", "kind": "heuristic", "score": 81, "passes": true}],
"extracted_text_preview": "JORDAN RIVERA\nSENIOR BACKEND ENGINEER\n..."
}Source: srbhr/Resume-Matcher