2hr-jobs-mcp-server
MCP server for Polish IT job board 2hr.pl, enabling job search, salary analysis, and market analytics via natural language.
README
2hr-jobs-mcp-server
MCP server for Polish IT job board 2hr.pl — search IT jobs, salary data and market analytics via Model Context Protocol.
Built with FastMCP and Python 3.12. Works with Claude Desktop, Cursor, Windsurf, VS Code, and any MCP-compatible AI client.
What is MCP?
Model Context Protocol (MCP) is an open standard by Anthropic that allows AI models like Claude to securely call external APIs and databases in real time. Instead of pasting data manually into a chat, your AI agent fetches live data automatically.
This server connects Claude (or any MCP-compatible client) to the 2hr.pl job board — so you can ask:
- "Find remote Python senior jobs above 20 000 PLN B2B"
- "Is 18 000 PLN fair for a mid React developer in Warsaw?"
- "Compare salaries: PHP vs Go for a senior in Poland"
- "What skills do I need to become a DevOps engineer?"
- "Which technologies are trending in Poland right now?"
Tools
Job search
| Tool | Description |
|---|---|
search_jobs |
Search IT jobs by keyword, city, salary range, experience level, contract type |
find_remote_jobs |
Remote-only positions, optional keyword and salary filter |
find_jobs_in_city |
Jobs in a specific Polish city (Warsaw, Krakow, Wroclaw, Gdansk, Poznan...) |
get_latest_jobs |
Newest job listings added to the board |
Salary analysis
| Tool | Description |
|---|---|
get_salary_report |
Full salary report for a technology: median, p25/p75/p90, B2B vs UoP, by city, trend |
compare_salaries |
Side-by-side salary comparison of two technologies |
check_salary_fairness |
Assess whether a job offer salary is fair vs current market data |
Market analytics
| Tool | Description |
|---|---|
get_top_technologies |
Technology ranking by active job count with monthly trend |
compare_roles |
Compare two IT roles: jobs count, salary, required skills, remote availability |
get_market_trends |
IT job market trends for 1m / 3m / 6m / 1y periods |
get_required_skills |
Must-have, nice-to-have, and differentiating skills for a role |
get_top_employers |
Companies with most active IT job listings, filterable by tech and city |
Quick start
Prerequisites
- Python 3.10+
- Redis (for caching)
- A jobs REST API backend (configure in
.env)
Install
git clone https://github.com/your-username/2hr-jobs-mcp-server.git
cd 2hr-jobs-mcp-server
python3 -m venv venv
source venv/bin/activate # Linux/macOS
# .\venv\Scripts\activate # Windows
pip install -r requirements.txt
cp .env.example .env
# Edit .env — set JOBS_API_URL, JOBS_API_KEY, REDIS_URL
Run locally (stdio transport)
python server.py
Run as HTTP server
python server_http.py
# Starts on http://0.0.0.0:8765
Test with MCP Inspector
npx @modelcontextprotocol/inspector python server.py
# Opens http://localhost:5173 — call any tool interactively
Claude Desktop integration
Edit the Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"2hr-jobs": {
"command": "/path/to/venv/bin/python",
"args": ["/path/to/2hr-jobs-mcp-server/server.py"],
"env": {
"JOBS_API_URL": "https://api.2hr.pl/v1",
"JOBS_API_KEY": "your_api_key",
"REDIS_URL": "redis://localhost:6379/0"
}
}
}
}
Restart Claude Desktop. The server appears in the tools panel — Claude will automatically call the right tool based on your questions.
Cursor integration
Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
{
"mcpServers": {
"2hr-jobs": {
"command": "python",
"args": ["/path/to/server.py"],
"env": {
"JOBS_API_URL": "https://api.2hr.pl/v1",
"JOBS_API_KEY": "your_api_key"
}
}
}
}
In Cursor's Agent Mode (Ctrl+Shift+I), the tools are available automatically.
Remote HTTP server (production)
For production use, configure the client with the remote URL:
{
"mcpServers": {
"2hr-jobs-remote": {
"url": "https://mcp.your-domain.com/sse",
"transport": "sse"
}
}
}
Docker deployment
cp .env.example .env
# Fill in JOBS_API_URL and JOBS_API_KEY
docker compose up -d
# Check status
docker compose ps
docker compose logs mcp-server
For HTTPS, use the included nginx.conf as a reverse proxy template with Let's Encrypt.
Project structure
2hr-jobs-mcp-server/
├── server.py # Entry point — stdio transport (Claude Desktop, Cursor)
├── server_http.py # Entry point — HTTP/SSE transport (production)
├── api/
│ └── client.py # Async httpx client for backend REST API
├── cache/
│ └── redis_cache.py # Redis cache with cache-aside pattern
├── tools/
│ ├── search.py # search_jobs, find_remote_jobs, find_jobs_in_city, get_latest_jobs
│ ├── salary.py # get_salary_report, compare_salaries, check_salary_fairness
│ └── analytics.py # get_top_technologies, compare_roles, get_market_trends, ...
├── resources/
│ └── documentation.py # MCP Resources (API docs, market summary)
├── prompts/
│ └── templates.py # MCP Prompts (job search assistant, salary negotiation)
├── security/
│ └── validators.py # Input sanitization, rate limiting, injection detection
├── monitoring/
│ └── metrics.py # Tool call tracking, latency monitoring
├── tests/
│ └── test_search.py # Unit tests for validators and formatters
├── Dockerfile
├── docker-compose.yml
├── nginx.conf
└── .env.example
Configuration
All settings via environment variables (copy .env.example to .env):
| Variable | Default | Description |
|---|---|---|
JOBS_API_URL |
— | Backend REST API base URL |
JOBS_API_KEY |
— | API authentication key |
REDIS_URL |
redis://localhost:6379/0 |
Redis connection string |
CACHE_TTL_JOBS |
300 |
Job listings cache TTL in seconds |
CACHE_TTL_SALARY |
3600 |
Salary reports cache TTL |
CACHE_TTL_ANALYTICS |
1800 |
Analytics cache TTL |
CACHE_TTL_TRENDS |
3600 |
Market trends cache TTL |
MCP_PORT |
8765 |
HTTP server port |
LOG_LEVEL |
INFO |
Logging verbosity |
Running tests
pip install pytest pytest-asyncio
pytest tests/ -v
Security features
- Input sanitization: SQL injection, XSS, path traversal detection via regex patterns
- Pydantic v2 validation with strict bounds on salary and limit parameters
- Redis-based rate limiting per client identifier
- Non-privileged
mcpuser in Docker container - API key authentication between MCP server and backend API
fail openon Redis errors — cache miss, not service failure
Architecture
AI Client (Claude / Cursor)
|
MCP Protocol
(stdio or HTTP/SSE)
|
MCP Server (Python)
FastMCP + tools/salary/analytics
|
Redis Cache (TTL 5-60 min)
|
REST API (your backend)
|
Database (MySQL / PostgreSQL)
The MCP server is a stateless middleware layer — it holds no data of its own. All job and salary data lives in your existing backend, which the MCP server proxies through standardized tools.
Data source
All data is powered by 2hr.pl — Polish IT job board aggregating thousands of IT job listings.
- Salaries in PLN gross/month
- Covers all major Polish cities: Warsaw, Krakow, Wroclaw, Gdansk, Gdynia, Poznan, Lodz, Katowice, Rzeszow, Szczecin
- Includes remote positions
- Data refreshed continuously
Read the full tutorial (Polish): Jak zbudować serwer MCP w Pythonie dla portalu pracy
Related links
- 2hr.pl — Polish IT job board (data source)
- Model Context Protocol spec — MCP specification by Anthropic
- FastMCP — High-level Python MCP SDK
- MCP Inspector — Interactive testing tool
- Claude Desktop — MCP-compatible AI client
License
MIT — see LICENSE
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。