Skip to main content
Glama
job-search-mcp

job-search-mcp

README.md
# job-search-mcp

An MCP server that lets Claude (or any MCP client) search remote jobs on four public job boards at once, read full postings, compute salary stats, score how well a job fits your profile and keep an application tracker. It's tested end to end with the official MCP client SDK.

> **MCP in one line:** the [Model Context Protocol](https://modelcontextprotocol.io) is an open standard that lets an AI assistant call external tools and read data through one common interface. You write a server like this one once, and Claude Desktop, Claude Code and other MCP clients can use it.

- **Sources:** [Himalayas](https://himalayas.app), [Remotive](https://remotive.com), [Jobicy](https://jobicy.com), [Remote OK](https://remoteok.com). They're fetched concurrently and results are normalized and deduplicated.
- **Works offline where it can:** fit scoring is a deterministic keyword/skill matcher with no LLM and no API key, and the tracker is local SQLite.
- **Polite:** it sends an identifying User-Agent and uses a TTL cache. Remotive is cached for at least 6 h because they ask for no more than 4 requests a day, and the Remote OK feed is fetched once per TTL and filtered locally.
- **Tested:** 43 tests. 40 offline unit tests run on recorded API fixtures, and 3 end-to-end tests launch the real server over stdio and streamable HTTP. Results are below.

## Tools

| Tool | What it does |
|---|---|
| `search_jobs(query, remote_only=True, country=None, limit=20)` | Queries all 4 boards concurrently, normalizes results to `{id, source, title, company, location, salary_min, salary_max, currency, url, posted_at, tags}`, deduplicates across boards (`also_on` lists the duplicate URLs) and ranks by relevance, then recency. A per-source `sources` report shows ok/error/count/ms/cached, so a board that's down never breaks the search. |
| `get_job(id, max_chars=8000)` | Full posting with the HTML description converted to clean text. Looks the job up in memory, then SQLite, then re-fetches it (Remote OK). |
| `salary_stats(query, country=None)` | Min, median and max salary in **USD per month** over the matching jobs that publish a salary, with a per-source median and the assumptions it used. |
| `score_fit(job_id, profile_text)` | Deterministic 0–100 score: matched and missing skills, red flags with evidence (US-only, *N*+ years, degree required, security clearance, on-site/hybrid, commission-only) and a point breakdown. |
| `track_application(job_id, status, note="")` | Upserts a job into the SQLite tracker. Status is one of `saved, applied, interview, offer, rejected, withdrawn, ghosted`. Every change is kept in `history`. |
| `list_applications(status=None)` | Tracked applications (newest first) with counts by status. |

**Resource:** `jobs://saved` returns the tracked applications as JSON.
**Prompt:** `cover_letter(job_id, profile)` is a template that includes the posting text and the deterministic fit check, and tells the model not to invent experience.

## Example conversation (Claude Desktop / Claude Code)

> **You:** Find remote AI automation jobs open to people in Vietnam and tell me which one fits me best. Profile: Python, 6 years, n8n, Make, Zapier, LLM agents, Docker.
>
> **Claude:** *(calls `search_jobs("ai automation", country="Vietnam")`, then `score_fit` on the top results)*
> The best match is **AI Automation Expert (n8n / Make / Zapier / AI Agents)** at Kreative Media. It's worldwide and pays $84k–$132k a year. Fit score is **77/100 (strong fit)**: it matches n8n, Zapier, AI agents, Python, LLM and Docker, with gaps in JavaScript, webhooks and SEO, and no red flags. *Source: Himalayas.*
>
> **You:** Save it as applied, note "sent CV + Loom demo", and draft a cover letter.
>
> **Claude:** *(calls `track_application(..., "applied", ...)` and uses the `cover_letter` prompt)*

The full recorded session, with real tool calls and outputs, is in [docs/demo_session.md](docs/demo_session.md).

## Install & run

```bash
pip install -e .            # or: pip install mcp httpx  and run from the repo with PYTHONPATH=src
python -m job_search_mcp    # stdio (what Claude Desktop / Claude Code use)
python -m job_search_mcp --http --port 8000   # streamable HTTP at http://127.0.0.1:8000/mcp
```

It requires Python 3.10 or newer. It works with the official `mcp` SDK **1.x** (`FastMCP`) and **2.x** (`MCPServer`, FastMCP's new name). Both were tested: mcp 1.30.0 and 2.3.0.

### Register in Claude Code

```bash
claude mcp add job-search -- python -m job_search_mcp
# with a fixed DB location:
claude mcp add job-search -e JOB_SEARCH_DB=$HOME/.job-search/applications.db -- python -m job_search_mcp
```

### Register in Claude Desktop

Add this to `claude_desktop_config.json` (Windows: `%APPDATA%\Claude\`, macOS: `~/Library/Application Support/Claude/`):

```json
{
  "mcpServers": {
    "job-search": {
      "command": "python",
      "args": ["-m", "job_search_mcp"],
      "env": {
        "JOB_SEARCH_DB": "C:/Users/you/.job-search/applications.db",
        "PYTHONUTF8": "1"
      }
    }
  }
}
```

If you didn't `pip install` the package, add `"cwd": "/path/to/job-search-mcp"` and `"PYTHONPATH": "src"`. Set `JOB_SEARCH_DB` to an absolute path, because Claude Desktop starts servers from an arbitrary working directory.

## Configuration

| Env var | Default | Meaning |
|---|---|---|
| `JOB_SEARCH_DB` | `./data/applications.db` | SQLite file for the tracker and the seen-jobs cache |
| `JOB_SEARCH_CACHE_TTL` | `1800` | API cache TTL in seconds (Remotive always uses at least 6 h) |
| `JOB_SEARCH_TIMEOUT` | `15` | HTTP timeout per board in seconds. Each board also has a hard deadline of timeout + 5 s |
| `JOB_SEARCH_DISABLE_SOURCES` | *(empty)* | Comma-separated list, e.g. `remoteok,remotive` |
| `JOB_SEARCH_FX` | *(built-in table)* | JSON object of extra or overridden FX rates to USD, e.g. `{"VND": 0.00004}` |
| `JOB_SEARCH_OFFLINE` | – | `1` skips the live end-to-end test |

## Architecture

```
MCP client (Claude Desktop / Claude Code / tests)
        |  stdio  or  streamable HTTP (--http)
        v
server.py      MCPServer/FastMCP: 6 tools, jobs://saved resource, cover_letter prompt
        |
service.py     JobService: asyncio.gather over the boards, per-source wait_for deadline + try/except,
        |      TTL cache, cross-board dedupe, remote/country filters, relevance ranking, salary stats
        |
        +-- sources.py   one fetcher + one *pure* normalizer per board (testable on fixtures)
        +-- salary.py    free-text salary parser ("$35,3k- $52k", "$50-$75 /hour"), period + FX -> USD/month
        +-- scoring.py   skill vocabulary (65 skills with aliases), title/seniority/location points, red flags
        +-- store.py     SQLite: jobs (so get_job/score_fit survive restarts), applications, application_events
        +-- cache.py     in-process TTL cache with injectable clock
        +-- textutil.py  stdlib HTML -> text (lists, paragraphs, no script/style)
```

**Deduplication.** The key is the normalized company plus title (legal suffixes and punctuation are dropped). The copy from the higher-priority board is kept (Himalayas > Remotive > Jobicy > Remote OK). If the kept copy has no salary or a shorter description, those are taken from the duplicate.

**Salary conversion.** All figures are converted to USD per month:

- Yearly is divided by 12, weekly is multiplied by 52/12, daily by 21.67 (260 working days / 12) and hourly by 173.33 (40 h × 52 weeks / 12, the full-time equivalent).
- When no period is given, it's inferred from the size of the number: under 500 is hourly, under 25k is monthly, anything larger is yearly. A "k" range such as "$20k–$35k" counts as yearly when it's 15k or more.
- Currencies other than USD use a static, approximate FX table. Unknown currencies are skipped.
- Converted values outside 200–100,000 USD a month are discarded as data errors.
- Each job's range midpoint goes into the median, and the range ends give the min and max.

**Fit score.** It starts from 100 points: skills 60, title 20, seniority 10, location 10.

- **Skills:** the share of the job's detected skills that appear in the profile. Skills in the title and tags count double.
- **Title:** the share of meaningful title words that appear in the profile.
- **Seniority:** the years required by the posting, or implied by the level in the title, compared with the years stated in the profile.
- **Location:** full points if the job is worldwide or the profile mentions the allowed country.
- **Red flags:** each one subtracts points and comes with the matching text as evidence. A flag is dropped when the profile covers it, for example a profile that says "US citizen" or "BSc".

The same input always gives the same score.

## Testing

```bash
pip install -e ".[dev]"
python -X utf8 -m pytest -v              # everything (live test needs internet)
python -X utf8 -m pytest -m "not live"   # fully offline
python -X utf8 scripts/demo_session.py   # re-record docs/demo_session.md
python -X utf8 scripts/record_fixtures.py  # re-capture tests/fixtures from the live APIs
```

- `tests/test_tools.py` has **40 offline tests**:
  - normalizers for all 4 boards, run on real recorded responses in `tests/fixtures/*.json` (105 jobs)
  - the free-text salary parser (9 formats) and period/FX conversion
  - dedupe and ranking, country matching
  - scoring: determinism, red flags, flags neutralized by the profile, strong vs. weak candidate ordering
  - the SQLite tracker: round trip, history, persistence, env path
  - the TTL cache: expiry and eviction
  - the full `JobService.search` over an `httpx.MockTransport` that serves the fixtures: User-Agent sent, second search served from cache with zero HTTP calls, get_job after a restart, **two boards returning 503**, **one board timing out**
- `tests/test_mcp_e2e.py` has **3 end-to-end tests** that use the official client (`ClientSession` + `stdio_client`, and `streamable_http_client`):
  - protocol and tracker checks offline over stdio, including that error results come back for bad input
  - a live flow over stdio: `search_jobs("ai automation")` → `get_job` → `score_fit` → `salary_stats` → `track_application` → `list_applications` → `cover_letter` prompt. It's marked `live` and skips itself when offline.
  - the same server started with `--http` and called over streamable HTTP

Results on 2026-12-05 (Windows 11, Python 3.14.5):

| Run | mcp SDK | Result |
|---|---|---|
| `pytest` (all, live APIs) | 2.3.0 | **43 passed** in 25.8 s |
| `JOB_SEARCH_OFFLINE=1 pytest` | 2.3.0 | **42 passed, 1 skipped** (live) in 16.6 s |
| `pytest` (all, live APIs, clean venv, `pip install -e .`) | 1.30.0 | **43 passed** in 19.2 s |

In the recorded live session, `search_jobs("ai automation")` returned 24 unique jobs from all 4 boards in about 3.6 s on a cold cache. Cached repeats and local tools answer in under 50 ms.

## Limits & notes

- **Coverage depends on what each board serves for free.** As of Dec 2026 the free Remotive feed ignores `search` and returns a small, 24 h-delayed sample, so it's filtered client-side and often contributes 0–2 jobs. Jobicy's `tag` filter is loose, so results are re-filtered locally. Himalayas returns 20 results per page and only page 1 is fetched.
- The salary FX table is approximate and static, and many postings publish no salary. Treat `salary_stats` as a ballpark figure.
- Fit scoring is keyword-based. It can't tell "nice to have" from "must have", and its skill vocabulary is finite (see `scoring.SKILLS`). That's the trade-off for a score that is deterministic, free and offline. For nuance, use the `cover_letter` prompt or ask the model to read the posting with `get_job`.
- `remote_only` drops postings that mention hybrid or on-site, since all four boards are remote boards already.
- **Attribution:** keep the job URLs pointing to the original boards and credit them when you display results. Remote OK jobs carry a `credit` field as their API terms require, and every search response includes an `attribution` list. Remotive's terms forbid re-publishing their jobs on third-party job sites. This tool is for personal job search.

## License

MIT © Deidei Corp

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct action in the job-search workflow: discovery, detail retrieval, salary analysis, fit scoring, and application tracking. There is no meaningful overlap between search_jobs, get_job, salary_stats, score_fit, and the tracker tools.

Naming Consistency4/5

All names use consistent snake_case and are readable, but salary_stats and score_fit are noun/adjective-style names rather than the verb_noun pattern used by search_jobs, get_job, track_application, and list_applications. The deviation is minor and still intuitive.

Tool Count5/5

Six tools is well-scoped for a focused job-search server. Each tool earns its place, covering search, detail, analytics, evaluation, and tracking without bloat.

Completeness4/5

The surface covers the core lifecycle from job discovery through fit scoring and application tracking. Minor gaps exist, such as deleting/removing tracked applications or retrieving a single application record directly, but these are workaroundable.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues