Skip to main content
Glama

job-copilot-mcp

CI Python License

Local-first Model Context Protocol (MCP) Server and Human-in-the-Loop (HITL) Job Application Copilot for automating job discovery, semantic ranking, and tailored application drafting across Indonesian job portals (JobStreet & Glints).

Designed with a zero-API-cost, hardware-aware architecture that combines CPU semantic filtering with a rate-limit-resilient LLM cascade router (Cloud Free-Tier APIs with automatic fallback to quantized local models on 4GB VRAM GPUs).


System Architecture

flowchart TD
    A[Playwright Persistent Session] -->|Scrape & Regex Filter| B[(SQLite + SHA-256 Dedup)]
    B -->|Filter NEW Jobs| C[CPU Semantic Ranker<br/>multilingual-e5-small]
    C -->|Top-K Relevant Jobs| D[Pydantic AI Cascade Router]
    D -->|Primary| E[Gemini / Groq Free Tier]
    D -->|Fallback on 429 / Offline| F[Local Ollama qwen2.5:3b<br/>4GB VRAM]
    E & F -->|Structured ApplicationKit| B
    B -->|Expose 6 MCP Tools| G[FastMCP Server]
    B -->|Visual Pipeline Tracker| H[Streamlit Dashboard]
    G -->|HITL Form Prefill| A

Related MCP server: job-search-copilot

Key Engineering Highlights

  • Zero-Token Funnel & Role Filtering: Eliminates duplicate postings via deterministic SHA-256 content hashing (company | title | description[:500]), filters out senior/managerial roles via regex rules in selectors.py, and scores entry/mid-level listings locally on CPU using intfloat/multilingual-e5-small before invoking any LLM.

  • Anti-Hallucination Grounding: Enforces strict structured outputs (ApplicationKit via Pydantic AI) anchored exclusively to verified candidate facts in data/profile_facts.json—preventing fabricated metrics, degrees, or work experience.

  • Rate-Limit Resilient Cascade Router: Prioritizes fast cloud free-tier models (Gemini / Groq) and seamlessly falls back to a quantized local qwen2.5:3b model via Ollama (http://localhost:11434/v1) when encountering 429 Too Many Requests or offline conditions.

  • Decoupled DOM Selectors: Centralizes portal CSS/XPath locators in src/browser/selectors.py for rapid maintenance against portal UI changes.

  • Human-in-the-Loop (HITL) Browser Safety: Uses Chromium persistent browser profiles (launch_persistent_context) to preserve authenticated sessions without repeated login/CAPTCHA friction, auto-fills cover letters, and intentionally pauses before employer knockout questions and final submission.


Dashboard Preview

Job Copilot MCP Dashboard


Project Structure

job-copilot-mcp/
├── .github/
│   └── workflows/
│       └── ci.yml                 # Matrix CI testing across Python 3.11–3.13
├── pyproject.toml                 # Dependencies (uv) and pytest configuration
├── README.md                      # Architecture and setup documentation
├── LICENSE                        # MIT License
├── assets/
│   └── dashboard.png              # Streamlit application tracker preview
├── data/
│   └── profile_facts.example.json # Ground-truth candidate profile template
├── src/
│   ├── server.py                  # FastMCP Server exposing 6 pipeline tools
│   ├── dashboard.py               # Streamlit pipeline tracker & draft inspector
│   ├── browser/
│   │   ├── session.py             # Persistent Playwright browser context
│   │   ├── selectors.py           # Centralized DOM locators & negative title filters
│   │   ├── scraper.py             # JobStreet & Glints job extractor
│   │   └── prefill.py             # HITL cover letter auto-filler
│   ├── intelligence/
│   │   ├── ranker.py              # Local CPU cosine-similarity ranker
│   │   └── agent.py               # Pydantic AI structured drafting & fallback router
│   └── storage/
│       └── db.py                  # SQLite schema and SHA-256 deduplication
└── tests/
    ├── test_pipeline.py           # Unit tests for hashing, DB deduplication, and schemas
    └── test_mcp_and_security.py   # MCP stdio handshake & gitignore privacy guard tests

Setup & Installation

1. Clone & Install Dependencies

Requires Python 3.11+ and uv:

git clone https://github.com/MLwithDyy/job-copilot-mcp.git
cd job-copilot-mcp

uv venv
# Windows PowerShell:
.\.venv\Scripts\Activate.ps1

uv sync --locked
uv run playwright install chromium

2. Configure Profile Ground Truth & Environment

  1. Copy the profile template and fill in your verified CV facts (including target_roles used automatically by the scraper):

    cp data/profile_facts.example.json data/profile_facts.json
  2. (Optional) Create a .env file if you want to prioritize cloud free-tier LLMs before falling back to local Ollama:

    GEMINI_API_KEY=your_gemini_api_key
    GROQ_API_KEY=your_groq_api_key
  3. (Optional) Pull the local fallback model via Ollama:

    ollama pull qwen2.5:3b

Usage

Step 1: Authenticate Portal Sessions Once

Launch the persistent browser context and manually log in to your JobStreet and Glints accounts (cookies are saved locally in data/browser_profile/):

uv run python -m src.browser.session login

Step 2: Run the Discovery & Drafting Pipeline

# 1. Scrape latest postings based on target_roles in profile_facts.json
uv run python -m src.browser.scraper

# 2. Score all NEW jobs locally on CPU
uv run python -m src.intelligence.ranker

# 3. Generate tailored cover letters & screening Q&A for Top-K matches
uv run python -m src.intelligence.agent

Step 3: Review & Apply (HITL) or Open Dashboard

  • Launch the Streamlit Pipeline Tracker:

    uv run streamlit run src/dashboard.py
  • Open a prepared job (job_id=24) in browser with cover letter prefilled:

    uv run python -m src.browser.prefill 24

Step 4: Connect as an MCP Server

Add the following entry to your MCP client configuration (VS Code GitHub Copilot / Claude Desktop):

{
  "mcpServers": {
    "job-copilot": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/job-copilot-mcp",
        "run",
        "python",
        "-m",
        "src.server"
      ]
    }
  }
}

Exposed MCP Tools

Tool

Description

scrape_jobs

Scrapes JobStreet & Glints postings by keyword into local SQLite.

rank_jobs

Computes CPU semantic similarity scores for all NEW listings.

generate_application_kits

Runs the Pydantic AI cascade router to draft cover letters & screening answers.

list_jobs

Lists stored jobs filtered by pipeline status (NEW, RANKED, PREPARED, APPLIED).

get_job_kit

Retrieves full job details, match reasoning, cover letter, and screening Q&A.

update_job_status

Updates the tracking status of a job posting.


Testing

uv run pytest -v

Responsible Automation & Privacy

  • Human-in-the-Loop Enforcement: Never performs unattended mass submissions; every application requires explicit human review of employer screening questions and final submission.

  • Conservative Rate Limiting: Uses randomized human-like navigation delays and local deduplication to minimize portal requests.

  • Local-First Data Isolation: Browser sessions (data/browser_profile/), SQLite records (data/jobs.db), API keys (.env), and personal CV facts (data/profile_facts.json) remain strictly local and excluded from version control.


License

MIT License — Copyright (c) 2026 Mahdy Firmansyah.

Available Tools

6 tools
generate_application_kitsGenerate Application KitsC

Membuat analisis kecocokan, cover letter, dan jawaban screening untuk top K lowongan.

Inputs: top_k. Returns: result

get_job_kitGet Job KitA

Membaca detail deskripsi, cover letter, dan jawaban screening untuk satu job_id.

Inputs: job_id (required). Returns: result

list_jobsList JobsB

Melihat daftar lowongan berdasarkan status (NEW, RANKED, PREPARED, APPLIED, SKIPPED).

Inputs: limit, status. Returns: result

rank_jobsRank JobsA

Menilai seluruh lowongan baru menggunakan local CPU embedding (0 kuota API).

Inputs: no named parameters. Returns: result

scrape_jobsScrape JobsC

Mengambil lowongan terbaru dari JobStreet dan Glints ke database SQLite lokal.

Inputs: keywords, max_per_source. Returns: result

update_job_statusUpdate Job StatusC

Mengubah status lowongan (APPLIED, SKIPPED, PREPARED).

Inputs: job_id (required), status (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool maps to a clearly distinct stage or operation in the job-application workflow: scraping, ranking, generating kits, listing, reading details, and updating status. There is no meaningful overlap between tools, and an agent can confidently select the right one.

    Naming Consistency5/5

    All tool names use a consistent snake_case verb_noun pattern, such as scrape_jobs, rank_jobs, list_jobs, get_job_kit, and update_job_status. The convention is predictable throughout.

    Tool Count5/5

    Six tools are well-scoped for a job-copilot pipeline. Each tool corresponds to a necessary workflow step without redundant operations or excessive surface area.

    Completeness4/5

    The surface covers the core lifecycle from scraping through ranking, kit generation, inspection, and status updates. Minor gaps exist, such as no explicit delete/archive operation, search/filtering, or way to re-rank or regenerate a single job kit, but these are workaroundable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables automated job searching from multiple boards, filtering matches against saved criteria, deduplicating seen postings, and tracking application statuses. Runs locally and integrates with Claude Desktop for natural-language queries and updates.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an MCP-capable coding agent to run a local-first job search: recording verified opportunities in a private SQLite tracker, tracking follow-ups and outcomes, and preparing evidence-based resumes, application answers, and outreach drafts. It keeps all personal data on the user's machine and stops before submitting applications, uploading documents, or contacting anyone.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to discover postings from watched company boards ranked by keyword fit, tailor and fact-check resumes against a source-cited profile, render ATS-readable PDFs, submit applications through the user's own browser, and track replies and follow-ups. All ranking, claim checking and email classification run as plain code, so LLM tokens are spent only on writing.
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables job seekers to structure job descriptions, search a personal Markdown profile with hybrid BM25/dense retrieval, and compare a posting against that profile to see which requirements are supported, weak, or missing evidence. It also tracks applications and follow-up deadlines through JSON-backed tools whose writes stay as previews until a human turn confirms them.
      1
      MIT