Skip to main content
Glama
README.md
# πŸ‡ΊπŸ‡Έ US Immigration MCP Server

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js 18+](https://img.shields.io/badge/node-18+-green.svg)](https://nodejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
[![MCP](https://img.shields.io/badge/MCP-Compatible-purple.svg)](https://modelcontextprotocol.io)

A **Model Context Protocol (MCP) server** that provides AI assistants with tools, resources, and prompts for U.S. employment-based immigration petitions β€” specifically **EB1A (Extraordinary Ability)** and **EB2 NIW (National Interest Waiver)**.

## ✨ Key Features

| Feature | Description |
|---------|-------------|
| **πŸ”€ LaTeX Document Generation** | Generate complete, professional LaTeX petition letters, reference letters, and exhibit lists |
| **πŸ“œ Legal Citation Tools** | Format CFR, USCIS Policy Manual, INA, and case citations correctly |
| **βš–οΈ Dhanasar Framework Analyzer** | Evaluate evidence against the three-prong NIW test |
| **πŸ† EB1A Criteria Checker** | Map evidence to the 10 regulatory criteria |
| **πŸ“… Visa Bulletin Guidance** | Understand priority dates and processing times |
| **πŸ“ Document Templates** | Structured prompts for petition letters and reference letters |

## 🎯 Perfect For

- **Self-petitioners** preparing their own EB1A or EB2 NIW applications
- **Immigration attorneys** streamlining document preparation
- **Researchers and professionals** building evidence packages
- **Anyone using LaTeX** for professional immigration documents

## πŸ“‹ Prerequisites

- **Node.js 18+** ([Download](https://nodejs.org/))
- **An MCP-compatible client** (Claude Desktop, VS Code with MCP extension, Cursor, etc.)
- **LaTeX distribution** (for compiling generated documents): [TeX Live](https://www.tug.org/texlive/), [MiKTeX](https://miktex.org/), or [Overleaf](https://www.overleaf.com/)

## πŸš€ Quick Start

### Installation

```bash
# Clone the repository
git clone https://github.com/sebastianomarchesini/us-immigration-mcp.git
cd us-immigration-mcp

# Install dependencies
npm install

# Build the project
npm run build
```

### Configure Claude Desktop

Add to your Claude Desktop configuration file:

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`  
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`  
**Linux:** `~/.config/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "us-immigration": {
      "command": "node",
      "args": ["/path/to/us-immigration-mcp/dist/index.js"]
    }
  }
}
```

Restart Claude Desktop. You'll see the tools available in the πŸ”§ menu.

### Run in Development Mode

```bash
npm run dev
```

## πŸ› οΈ Available Tools

### LaTeX Document Generation

| Tool | Description |
|------|-------------|
| `generate_niw_petition_latex` | Complete EB2 NIW petition letter with Dhanasar framework |
| `generate_eb1a_petition_latex` | Complete EB1A petition letter with claimed criteria |
| `generate_reference_letter_latex` | Expert recommendation letter template |
| `generate_exhibit_list_latex` | Formatted exhibit index |
| `generate_latex_preamble` | Reusable preamble with legal commands |
| `escape_latex` | Escape special characters for LaTeX |

### Citation Formatting

| Tool | Description |
|------|-------------|
| `format_cfr_citation` | Code of Federal Regulations citations |
| `format_case_citation` | Legal case citations (Bluebook format) |
| `format_uscis_policy_citation` | USCIS Policy Manual citations |
| `format_ina_citation` | Immigration and Nationality Act citations |
| `format_latex_citation` | Citations formatted for LaTeX documents |
| `get_common_citations` | Dictionary of frequently used citations |

### NIW Analysis (Matter of Dhanasar)

| Tool | Description |
|------|-------------|
| `analyze_dhanasar_prong` | Analyze evidence against a specific prong |
| `evaluate_niw_petition` | Comprehensive three-prong evaluation |
| `suggest_niw_evidence` | Recommend evidence types for weak areas |
| `get_dhanasar_summary` | Complete framework overview |

### EB1A Analysis

| Tool | Description |
|------|-------------|
| `analyze_eb1a_criterion` | Evaluate evidence against criteria 1-10 |
| `map_evidence_to_eb1a_criteria` | Suggest applicable criteria |
| `get_eb1a_criteria_summary` | All 10 criteria overview |
| `compare_eb1a_vs_niw` | Compare both pathways |

### Immigration Information

| Tool | Description |
|------|-------------|
| `get_visa_bulletin_info` | Understanding the Visa Bulletin |
| `explain_priority_date` | Priority date implications |
| `get_processing_times_info` | USCIS processing information |

## πŸ“„ LaTeX Usage Examples

### Generate an NIW Petition Letter

```
User: Generate a LaTeX petition letter for my EB2 NIW application. 
      My name is John Smith, I work in machine learning, and my endeavor 
      is developing AI systems for healthcare diagnostics. I have a PhD 
      in Computer Science from Stanford (2020).
```

The tool will generate a complete `.tex` file with:
- Proper legal formatting and citations
- Dhanasar three-prong structure
- Placeholder sections for your specific evidence
- Custom LaTeX commands for legal citations (`\cfr{}`, `\casename{}`, `\exhibit{}`)

### Compile the LaTeX Document

```bash
# Using pdflatex
pdflatex petition.tex

# Or upload to Overleaf for online editing
```

### Custom LaTeX Commands Included

```latex
\cfr{8 C.F.R. Β§ 204.5(k)}           % CFR citations (italicized)
\casename{Matter of Dhanasar}        % Case names (italicized)
\exhibit{A-1}                        % Exhibit references (bold)
\seeexhibit{C-2}                     % "See Exhibit C-2" format
```

## πŸ“š Available Resources

Access legal texts via the MCP resources interface:

| URI | Content |
|-----|---------|
| `legal://dhanasar` | Matter of Dhanasar, 26 I&N Dec. 884 (AAO 2016) |
| `legal://kazarian` | Kazarian v. USCIS, 596 F.3d 1115 (9th Cir. 2010) |
| `legal://eb1a-criteria` | 8 C.F.R. Β§ 204.5(h)(3) β€” EB1A criteria |
| `legal://eb2-niw-criteria` | 8 C.F.R. Β§ 204.5(k) β€” EB2 NIW requirements |
| `legal://policy-manual-niw` | USCIS Policy Manual Vol. 6, Part F, Ch. 5 |

## πŸ“ Available Prompts

| Prompt | Description |
|--------|-------------|
| `niw_petition_outline` | Structure for NIW petition cover letter |
| `reference_letter_guidance` | Template for expert recommendation letters |
| `rfe_response_framework` | Framework for responding to RFEs |
| `eb1a_petition_outline` | Structure for EB1A petition letter |

## πŸ—οΈ Project Structure

```
us-immigration-mcp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts                 # Main MCP server entry point
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ citations.ts         # Citation formatting tools
β”‚   β”‚   β”œβ”€β”€ dhanasar.ts          # NIW analysis tools
β”‚   β”‚   β”œβ”€β”€ eb1a.ts              # EB1A criteria tools
β”‚   β”‚   β”œβ”€β”€ visa-bulletin.ts     # Visa bulletin tools
β”‚   β”‚   └── latex.ts             # LaTeX generation tools
β”‚   β”œβ”€β”€ resources/
β”‚   β”‚   └── legal-texts.ts       # Legal resource content
β”‚   └── prompts/
β”‚       └── templates.ts         # Prompt templates
β”œβ”€β”€ templates/                    # Example LaTeX templates
β”œβ”€β”€ dist/                         # Compiled JavaScript
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md
```

## ⚠️ Disclaimer

**This tool is for informational and educational purposes only.**

- This is **NOT legal advice**. Immigration law is complex and constantly evolving.
- Always consult with a qualified immigration attorney for your specific case.
- The developers are not responsible for any immigration decisions made using this tool.
- Information may not reflect the most recent legal developments.
- Verify all citations and legal standards before submitting any petition.

## 🀝 Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

### Ideas for Contributions

- [ ] Add more AAO decision summaries
- [ ] Implement PERM labor certification tools
- [ ] Add EB1B (Outstanding Researcher) support
- [ ] Create i-140 form field mapper
- [ ] Add more LaTeX templates (CV, cover letters)
- [ ] Support for BibTeX legal citations

## πŸ§ͺ Development

```bash
# Install dependencies
npm install

# Run in development mode (with hot reload)
npm run dev

# Build for production
npm run build

# Run linting
npm run lint

# Run tests
npm test
```

## πŸ“„ License

This project is licensed under the MIT License β€” see [LICENSE](LICENSE) for details.

## πŸ™ Acknowledgments

- [Anthropic](https://anthropic.com) for the Model Context Protocol
- The immigration law community for public legal resources
- USCIS for the Policy Manual and public AAO decisions
- The LaTeX community for typesetting excellence

## πŸ“¬ Contact

- **Author:** Sebastiano Marchesini
- **GitHub:** [@sebastianomarchesini](https://github.com/sebastianomarchesini)

---

*Built with ❀️ to help navigate the U.S. immigration system*

TDQS

B3.4/5.0

Scored across 23 tools

Disambiguation4/5

Most tools have clearly distinct resource+action targets: petition generators, criterion/prong analyzers, citation formatters, and informational lookups are separable. The main soft spot is the citation familyβ€”format_cfr_citation, format_case_citation, format_ina_citation, format_uscis_policy_citation, and format_latex_citation could be confused, since it is unclear whether format_latex_citation is an alternative or a wrapper around the type-specific formatters. evaluate_niw_petition vs analyze_dhanasar_prong and analyze_eb1a_criterion vs map_evidence_to_eb1a_criteria are adjacent but descriptions distinguish them by scope.

Naming Consistency5/5

All 23 tools use consistent snake_case with a verb_noun structure (generate_*, analyze_*, format_*, get_*, evaluate_*, explain_*, map_*, compare_*, escape_latex). Verb choice reflects the action type predictably, and domain prefixes (eb1a, niw, dhanasar, latex, cfr) make intent readable at a glance. No mixed camelCase or inconsistent verb styles.

Tool Count3/5

At 23 tools the surface is on the heavy side for the stated domain, and the LaTeX/citation families account for roughly half of them (five formatters, five generators plus escape_latex). Each tool does have a distinct job, so nothing feels redundant, but the set is large enough that an agent must scan many similar-sounding names. It sits at the borderline-heavy end rather than being tightly scoped.

Completeness4/5

Coverage of the core EB1A/NIW workflow is strong: per-criterion and per-prong analysis, summary frameworks, comparison, evidence suggestion, citation formatting, document generation, and visa bulletin/processing-time lookups. Minor gaps existβ€”no overall EB1A final-merits evaluation tool, no RFE/NOID response generation, and no tool that ingests or retrieves actual case textβ€”but agents can work around these. The surface is coherent for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues