h1b-mcp
by yoginoit39
README.md
# h1b-mcp
An MCP server that lets Claude answer H1B visa sponsorship questions using free public DOL data.
**Ask things like:**
- *"Does Google sponsor H1Bs?"*
- *"What's Amazon's H1B approval rate and top roles?"*
- *"Which companies in Austin sponsor H1Bs for Data Engineers?"*
## Tools
| Tool | Description |
|------|-------------|
| `lookup_company` | Quick sponsorship check + certified/denied/withdrawn counts |
| `get_company_stats` | Approval rate, top 5 roles, avg annual wage, states |
| `search_sponsors` | Filter companies by job title, state, and/or city |
## Setup
### 1. Clone and install
```bash
git clone https://github.com/<your-username>/h1b-mcp.git
cd h1b-mcp
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
```
### 2. Build the database (one-time, ~2-3 min)
```bash
python loader.py
```
This downloads the FY2024 Q2 DOL H1B LCA data (~50MB) and loads it into a local SQLite database.
### 3. Verify the database
```bash
python -c "import sqlite3; db = sqlite3.connect('h1b.db'); print(db.execute('SELECT COUNT(*) FROM lca_applications').fetchone())"
```
Should print a non-zero count (e.g., `(600000,)`).
### 4. Connect to Claude Desktop
Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
```json
{
"mcpServers": {
"h1b": {
"command": "/absolute/path/to/h1b-mcp/venv/bin/python",
"args": ["/absolute/path/to/h1b-mcp/server.py"]
}
}
}
```
**Important:** Use the absolute path to the venv Python, not bare `python`. To find it:
```bash
cd h1b-mcp && source venv/bin/activate && which python
```
### 5. Restart Claude Desktop and start asking
> *"Which companies in New York sponsor H1Bs for software engineers?"*
## Data Source
Public DOL LCA Disclosure Data (FY2024 Q2).
Source: https://www.dol.gov/agencies/eta/foreign-labor/performance
No API keys required. Data is a quarterly snapshot — re-run `loader.py` to refresh.
## Running Tests
```bash
source venv/bin/activate
pytest tests/ -v
```
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues