Job URL Analyzer MCP Server
A FastAPI-based microservice that analyzes job URLs and extracts detailed company information by crawling job postings and company websites, with data enrichment from external providers.
README
Job URL Analyzer MCP Server
A comprehensive FastAPI-based microservice for analyzing job URLs and extracting detailed company information. Built with modern async Python, this service crawls job postings and company websites to build rich company profiles with data enrichment from external providers.
✨ Features
- 🕷️ Intelligent Web Crawling: Respectful crawling with robots.txt compliance and rate limiting
- 🧠 Content Extraction: Advanced HTML parsing using Selectolax for fast, accurate data extraction
- 🔗 Data Enrichment: Pluggable enrichment providers (Crunchbase, LinkedIn, custom APIs)
- 📊 Quality Scoring: Completeness and confidence metrics for extracted data
- 📝 Markdown Reports: Beautiful, comprehensive company analysis reports
- 🔍 Observability: OpenTelemetry tracing, Prometheus metrics, structured logging
- 🚀 Production Ready: Docker, Kubernetes, health checks, graceful shutdown
- 🧪 Well Tested: Comprehensive test suite with 80%+ coverage
🏗️ Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ FastAPI App │───▶│ Orchestrator │───▶│ Web Crawler │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Content Extract │ │ Database │
└─────────────────┘ │ (SQLAlchemy) │
│ └─────────────────┘
▼
┌─────────────────┐ ┌─────────────────┐
│ Enrichment │───▶│ Providers │
│ Manager │ │ (Crunchbase,etc)│
└─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Report Generator│
└─────────────────┘
🚀 Quick Start
Prerequisites
- Python 3.11+
- Poetry (for dependency management)
- Docker & Docker Compose (optional)
Local Development
-
Clone and Setup
git clone https://github.com/subslink326/job-url-analyzer-mcp.git cd job-url-analyzer-mcp poetry install -
Environment Configuration (Optional)
# The application has sensible defaults and can run without environment configuration # To customize settings, create a .env file with your configuration # See src/job_url_analyzer/config.py for available settings -
Database Setup
poetry run alembic upgrade head -
Run Development Server
poetry run python -m job_url_analyzer.main # Server starts at http://localhost:8000
Docker Deployment
-
Development
docker-compose up --build -
Production
docker-compose -f docker-compose.prod.yml up -d
📡 API Usage
Analyze Job URL
curl -X POST "http://localhost:8000/analyze" \
-H "Content-Type: application/json" \
-d '{
"url": "https://company.com/jobs/software-engineer",
"include_enrichment": true,
"force_refresh": false
}'
Response Example
{
"profile_id": "123e4567-e89b-12d3-a456-426614174000",
"source_url": "https://company.com/jobs/software-engineer",
"company_profile": {
"name": "TechCorp",
"description": "Leading AI company...",
"industry": "Technology",
"employee_count": 150,
"funding_stage": "Series B",
"total_funding": 25.0,
"headquarters": "San Francisco, CA",
"tech_stack": ["Python", "React", "AWS"],
"benefits": ["Health insurance", "Remote work"]
},
"completeness_score": 0.85,
"confidence_score": 0.90,
"processing_time_ms": 3450,
"enrichment_sources": ["crunchbase"],
"markdown_report": "# TechCorp - Company Analysis Report\n..."
}
⚙️ Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
DEBUG |
Enable debug mode | false |
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 8000 |
DATABASE_URL |
Database connection string | sqlite+aiosqlite:///./data/job_analyzer.db |
MAX_CONCURRENT_REQUESTS |
Max concurrent HTTP requests | 10 |
REQUEST_TIMEOUT |
HTTP request timeout (seconds) | 30 |
CRAWL_DELAY |
Delay between requests (seconds) | 1.0 |
RESPECT_ROBOTS_TXT |
Respect robots.txt | true |
ENABLE_CRUNCHBASE |
Enable Crunchbase enrichment | false |
CRUNCHBASE_API_KEY |
Crunchbase API key | "" |
DATA_RETENTION_DAYS |
Data retention period | 90 |
📊 Monitoring
Metrics Endpoints
- Health Check:
GET /health - Prometheus Metrics:
GET /metrics
Key Metrics
job_analyzer_requests_total- Total API requestsjob_analyzer_analysis_success_total- Successful analysesjob_analyzer_completeness_score- Data completeness distributionjob_analyzer_crawl_requests_total- Crawl requests by statusjob_analyzer_enrichment_success_total- Enrichment success by provider
🧪 Testing
Run Tests
# Unit tests
poetry run pytest
# With coverage
poetry run pytest --cov=job_url_analyzer --cov-report=html
# Integration tests only
poetry run pytest -m integration
# Skip slow tests
poetry run pytest -m "not slow"
🚀 Deployment
Kubernetes
# Apply manifests
kubectl apply -f kubernetes/
# Check deployment
kubectl get pods -l app=job-analyzer
kubectl logs -f deployment/job-analyzer
Production Checklist
- [ ] Environment variables configured
- [ ] Database migrations applied
- [ ] SSL certificates configured
- [ ] Monitoring dashboards set up
- [ ] Log aggregation configured
- [ ] Backup strategy implemented
- [ ] Rate limiting configured
- [ ] Resource limits set
🔧 Development
Project Structure
job-url-analyzer/
├── src/job_url_analyzer/ # Main application code
│ ├── enricher/ # Enrichment providers
│ ├── main.py # FastAPI application
│ ├── config.py # Configuration
│ ├── models.py # Pydantic models
│ ├── database.py # Database models
│ ├── crawler.py # Web crawler
│ ├── extractor.py # Content extraction
│ ├── orchestrator.py # Main orchestrator
│ └── report_generator.py # Report generation
├── tests/ # Test suite
├── alembic/ # Database migrations
├── kubernetes/ # K8s manifests
├── monitoring/ # Monitoring configs
├── docker-compose.yml # Development setup
├── docker-compose.prod.yml # Production setup
└── Dockerfile # Container definition
Code Quality
The project uses:
- Black for code formatting
- Ruff for linting
- MyPy for type checking
- Pre-commit hooks for quality gates
# Setup pre-commit
poetry run pre-commit install
# Run quality checks
poetry run black .
poetry run ruff check .
poetry run mypy src/
📝 Recent Changes
Dependency Updates
- Fixed: Replaced non-existent
aiohttp-robotparserdependency withrobotexclusionrulesparserfor robots.txt parsing - Improved: Setup process now works out-of-the-box without requiring
.envfile configuration
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
poetry run pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Documentation: This README and inline code comments
- Issues: GitHub Issues for bug reports and feature requests
- Discussions: GitHub Discussions for questions and community
Built with ❤️ using FastAPI, SQLAlchemy, and modern Python tooling.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。