ใช้ทำอะไรได้
ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ
- ต่อแบบ คลาวด์ (ต่อผ่านอินเทอร์เน็ต)
- บัญชีหรือคีย์ ล็อกอินกับบริการตอนต่อ (OAuth)
- หมวด เอกสาร ตาราง และงานออฟฟิศ
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
Green card / permanent residency forms (I-485, I-130, I-864, I-765) filled out from your documents.ใช้คู่กับ
Skill ที่สอน AI ทำงานแบบนี้ ใช้ร่วมกับตัวนี้ได้
watermarks-remover
watermarks-remover เป็นแอปที่เน้นความเป็นส่วนตัว ใช้สำหรับลบลายน้ำ AI ออกจากเนื้อหาที่ผู้ใช้เป็นเจ้าของ
obsidian-skills
obsidian-skills คือชุดทักษะสำหรับ AI เพื่อให้ใช้งาน Obsidian CLI และรูปแบบไฟล์ของ Obsidian ได้ เช่น Markdown, Bases และ JSON Canvas
ทำไมอยู่อันดับนี้
ตัวนี้อยู่ในแท็บ "แอปที่ต่อกับ AI" ซึ่งเรียงโดยไม่ใช้ดาว ตามลำดับเหล่านี้
| 1. อยู่ในสมุด connector ของ Claude | ไม่ | |
|---|---|---|
| 2. ทีมลองใช้จริงแล้ว | ไม่ | |
| 3. ใช้กับงานคนไทย | ไม่ | |
| 4. การใช้งานไม่นับดาว | 20/100 | ความนิยม 0 · ความสด 12 · ระบบยังตอบ 8 · ถูกใจจากผู้ใช้ +0 |
| 5. ลงทะเบียนเมื่อ | 2026-11-18 |
ถูกใจจากผู้ใช้: 0 · บวกในลำดับได้สูงสุด 5 คะแนน (1 คะแนนต่อ 1 คน) ไม่มีใครจ่ายเงินเพื่อเพิ่มได้
คุณภาพ: ผลตรวจเบื้องต้นผ่าน 5/5 ข้อ (แสดงให้ดู ไม่ได้ใช้เรียง)
ติดตั้ง
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ให้ AI ติดตั้งให้ด้วยประโยคเดียว
ติดตั้ง Form Agent Pro ให้หน่อย ทำตาม https://mcp.popnx.com/i/pro-formagent-form-agent.md แสดงคำสั่งให้ฉันดูและรอฉันตกลงก่อนรันคัดลอกไปวางในแชตของ AI ที่ทำงานในเครื่องคุณได้ (เช่น Claude Code, Cursor) · AI จะอ่านขั้นตอนจากเรา แสดงคำสั่งให้ดู และรอคุณตกลงก่อน · ไม่ต้องใช้คีย์ ไม่ต้องสมัคร · ดูข้อความเต็มที่ AI จะอ่าน
ผลตรวจผ่าน 5/5 · สิ่งที่คุณถามผ่านเซิร์ฟเวอร์ของผู้ทำ (immi-server-i5sok.ondigitalocean.app) · ✓ ตรวจคำสั่งแล้ว 18 พ.ย. 2569
ขั้นแรก: คุณใช้ AI ตัวไหน
เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง
ต่อกับ Claude ได้ · ประมาณ 2 นาที
ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม · ตั้งครั้งเดียวที่ claude.ai หรือแอปบนคอม แล้วใช้ในแชตได้ · บัญชีฟรีเพิ่มได้ 1 ตัว · แผน Team/Enterprise ให้เจ้าของ (Owner) เป็นคนเพิ่ม
เปิดหน้า Connectors ของ Claude
CustomizeConnectors
กด “Add” → “Custom” → “Web” แล้วกรอก 2 ช่องนี้
คัดลอกจากที่นี่ไปวางในช่องชื่อเดียวกันบนหน้าจอของ Claude แล้วกด Continue
Name · ชื่อForm Agent ProRemote MCP server URL · ที่อยู่https://immi-server-i5sok.ondigitalocean.app/mcpกด Continue ผ่านหน้าตรวจการล็อกอินที่ Claude ตรวจเจอ · หัวข้อ Authentication เลือกตามที่ผู้ทำบอก (Sign in now, Sign in when needed หรือ No sign in) แล้วกด Add
เปิดใช้ในแชต
+ConnectorsForm Agent Pro
ลองเลย
ใช้ Form Agent Pro บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude บอกว่ากำลังใช้ Form Agent Pro หรือมีชื่อเครื่องมือของ Form Agent Pro ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ ChatGPT ได้ ขึ้นกับแผน
MCP แบบเต็ม: ChatGPT Business, Enterprise หรือ Edu บนเว็บ · Pro: ต่อได้ด้วยสิทธิ์อ่านและดึงข้อมูล เครื่องมือที่แก้ข้อมูลอาจใช้ไม่ได้ · Plus: เอกสารยังไม่ยืนยัน ถ้าเห็นเมนูเพิ่ม MCP แบบกำหนดเองในหน้าปลั๊กอิน ลองตามขั้นตอนได้ · ใช้บนเว็บเท่านั้น
เปิดหน้าเพิ่ม MCP ของ ChatGPT บนเว็บ
Plugins+Add custom MCP server
กรอกชื่อและที่อยู่
ใส่ชื่อ แล้ววางที่อยู่ใต้ Connection ติ๊กยอมรับคำเตือน แล้วกด Create as a plugin
Name · ชื่อForm Agent ProConnection · ที่อยู่https://immi-server-i5sok.ondigitalocean.app/mcpเลือก Form Agent Pro ในแชต
เปิดแชตใหม่แล้วเลือก Form Agent Pro จากรายการปลั๊กอินก่อนพิมพ์
ลองเลย
ใช้ Form Agent Pro บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า ChatGPT บอกว่ากำลังใช้ Form Agent Pro หรือมีชื่อเครื่องมือของ Form Agent Pro ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ OpenAI เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ Claude Code ได้ · ประมาณ 2 นาที
ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม
เปิด Terminal
Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell
วางคำสั่งนี้แล้วกด Enter
claude mcp add --transport http --scope user form-agent https://immi-server-i5sok.ondigitalocean.app/mcpพิมพ์ /mcp ใน Claude Code
ต้องเห็น Form Agent Pro ในรายการและขึ้นว่าเชื่อมต่อแล้ว
ลองเลย
ใช้ Form Agent Pro บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude Code บอกว่ากำลังใช้ Form Agent Pro หรือมีชื่อเครื่องมือของ Form Agent Pro ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ Cursor ได้ · ประมาณ 2 นาที
ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม
เปิดแชตของ AI ใน Cursor โหมด Agent
ลองเลย
ใช้ Form Agent Pro บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Cursor บอกว่ากำลังใช้ Form Agent Pro หรือมีชื่อเครื่องมือของ Form Agent Pro ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ VS Code ได้ · ประมาณ 2 นาที
ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม
เปิดแชตของ AI ใน VS Code โหมด Agent
ลองเลย
ใช้ Form Agent Pro บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า VS Code บอกว่ากำลังใช้ Form Agent Pro หรือมีชื่อเครื่องมือของ Form Agent Pro ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม
ที่อยู่สำหรับโปรแกรมที่ต่อผ่านเว็บ
https://immi-server-i5sok.ondigitalocean.app/mcpค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON
ต่อผ่านเว็บ
Claude Code
claude mcp add --transport http --scope user form-agent https://immi-server-i5sok.ondigitalocean.app/mcpCursor (~/.cursor/mcp.json)
{
"mcpServers": {
"form-agent": {
"url": "https://immi-server-i5sok.ondigitalocean.app/mcp"
}
}
}VS Code (mcp.json)
{
"servers": {
"form-agent": {
"type": "http",
"url": "https://immi-server-i5sok.ondigitalocean.app/mcp"
}
}
}ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
สรุป
- ดาวน์โหลดต่อสัปดาห์i
- ไม่มียอดใน npm/PyPI
- โดเมนที่ยืนยัน
- ✓ formagent.pro
- การเชื่อมต่อ
- รันบนคลาวด์
- ช่องทาง (transport)
- streamable-http
- รุ่นล่าสุดi
- 1.0.0
- ส่งเข้า registryi
- 18 พ.ย. 2569
- แก้โค้ดล่าสุดi
- 18 พ.ย. 2569
- ตรวจล่าสุดเมื่อ
- 18 พ.ย. 2569
- ผู้ทำ
- MichaelC1999
- เว็บผู้ทำ
- formagent.pro
- สถานะใน registry
- ใช้งานอยู่
ใช้กับโปรแกรมไหนได้
ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569
ต่อผ่านคลาวด์ได้ใน
ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast
คู่มือที่เกี่ยวข้อง
ทำอะไรได้บ้าง
server ให้ล็อกอินก่อนจึงจะแสดงรายการเครื่องมือ
ผลตรวจเบื้องต้นi
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 19 พ.ย. 2569
- ✓ ผ่าน
ตัวตนผู้ทำตรงกับ repo
ชื่อใน registry ยืนยันโดเมน formagent.pro แล้ว (registry ตรวจความเป็นเจ้าของโดเมน)
- ✓ ผ่าน
ยังมีคนดูแล
มีการแก้โค้ดล่าสุด เมื่อวาน
- ✓ ผ่าน
มีสัญญาอนุญาต (license)
ใช้ MIT
- ✓ ผ่าน
endpoint ตอบ
ตอบกลับใน 22 ms (HTTP 401)
- ✓ ผ่าน
ล็อกอินแบบ OAuth
ประกาศวิธีล็อกอินแบบ OAuth ให้โปรแกรม AI พาไปล็อกอินเอง
- … ยังไม่ตรวจ
คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง
ยังไม่ได้ตรวจ เราอ่านรายการเครื่องมือตอนตรวจ endpoint
ผู้ทำ: ขอให้ตรวจใหม่ หรือแจ้งข้อมูลผิด
สำหรับผู้ทำ: ติดป้ายใน README
ถ้าคุณเป็นผู้ทำตัวนี้ คัดลอกโค้ดนี้ไปวางใน README ได้เลย ป้ายลิงก์กลับมาที่หน้านี้
[](https://mcp.popnx.com/th/servers/pro-formagent-form-agent)พูดคุย
ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์
ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย
ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx
รีวิวจากผู้ใช้
ยังไม่มีรีวิว
เทียบกับตัวอื่นในหมวด เอกสาร ตาราง และงานออฟฟิศi
- ดาวมากกว่า 0% ของอีก 4126 ตัวในหมวดนี้
- ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 94% ของอีก 4126 ตัวในหมวดนี้
- ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 99% ของอีก 4126 ตัวในหมวดนี้
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
คำถามที่พบบ่อย
Form Agent Pro ปลอดภัยไหม?
จากการตรวจเบื้องต้นของเรา ผ่าน 5 จาก 5 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใช้กุญแจหรือรหัสอะไรบ้าง?
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
ตัวนี้รันบนเครื่องหรือบนคลาวด์?
รันบนคลาวด์ของผู้ทำ ต่อผ่านอินเทอร์เน็ตได้เลย ไม่ต้องลงโปรแกรม แต่ข้อมูลที่ส่งให้จะผ่านเซิร์ฟเวอร์ของผู้ทำ
ยังมีคนดูแลอยู่ไหม?
repo บน GitHub มีการแก้โค้ดล่าสุด เมื่อวาน และส่งรุ่นล่าสุด (1.0.0) เข้า registry เมื่อวาน
ใช้กับโปรแกรมไหนได้บ้าง?
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต่อผ่าน URL จึงใช้กับโปรแกรมที่รับ remote MCP ได้ เช่น ChatGPT บนเว็บ (แบบเต็มในแผน Business ขึ้นไป · Pro แบบอ่านอย่างเดียว)
มีตัวไหนใช้แทนได้บ้าง?
ในหมวดเดียวกันมี Puter MCP, XcodeBuildMCP, Vexa, Atlassian Rovo MCP Server, Anki MCP Server
ตัวอื่นที่ทำงานคล้ายกัน
หมวดเดียวกันจากผู้ทำคนอื่น ผ่านตัวตรวจคำสั่งแล้ว ตัวทางการขึ้นก่อน แล้วเรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
Puter MCP
Puter MCP enables AI tools to interact with Puter: manage files, websites, workers, and more
XcodeBuildMCP
ให้ AI จัดการโปรเจกต์ Xcode สั่ง build และใช้ iOS Simulator
Vexa
Meeting bot and transcripts for Google Meet, Teams and Zoom. Live or after, speakers labelled.
Atlassian Rovo MCP Server
server ทางการของ Atlassian ให้ AI ค้นและจัดการงานใน Jira และเอกสารใน Confluence ต่อผ่านคลาวด์และล็อกอินแบบ OAuth
Anki MCP Server
MCP server for Anki flashcards: adaptive review, notes, media, and deck management via AnkiConnect.
| ตัวนี้ Form Agent Pro | Puter MCP | XcodeBuildMCP | Vexa | Atlassian Rovo MCP Server | Anki MCP Server | |
|---|---|---|---|---|---|---|
| ทำงานที่ไหน | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ต้องลงในเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ใช้บนคลาวด์ ไม่ต้องลงเครื่อง | ต้องลงในเครื่อง |
| ต้องใส่คีย์ | ไม่ | ไม่ | ไม่ | ใช่ | ไม่ | ไม่ |
| กด + ใน Claude ได้ | ไม่ | ไม่ | ไม่ | ไม่ | ใช่ | ไม่ |
| ผลตรวจเบื้องต้น | 5/5 | 4/4 | 3/3 | 2/4 | 4/4 | 3/3 |
| สัญญาอนุญาต | MIT | AGPL-3.0 | MIT | Apache-2.0 | Apache-2.0 | MIT |
| ราคา | ไม่พบค่าใช้จ่ายในทะเบียน | ไม่พบค่าใช้จ่ายในทะเบียน | ไม่พบค่าใช้จ่ายในทะเบียน | ไม่พบค่าใช้จ่ายในทะเบียน | ไม่พบค่าใช้จ่ายในทะเบียน | ไม่พบค่าใช้จ่ายในทะเบียน |
README จากผู้ทำ
เปิดอ่าน README
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
immi-server
Node.js / TypeScript server that automates filling USCIS immigration forms. Anthropic is used for semantic understanding; all PDF I/O is handled by pdftk.
Use it from an AI app (MCP)
Form Agent Pro is a remote Model Context Protocol server. Any MCP client that supports remote servers with OAuth (Claude, ChatGPT, Cursor, VS Code, …) can connect to:
https://immi-server-i5sok.ondigitalocean.app/mcp
Registry name: pro.formagent/form-agent (see server.json).
Sign-in. On first connect the app opens a browser window to sign in with Google. No API key is needed. Your forms are tied to your Google account, the same as on formagent.pro.
Pricing. Browsing and checking progress are free. Preparing a case is paid per case: the first build_situation_context call returns a Stripe checkout link, and the price is shown there. Inference costs are covered by the service.
Tools
| Tool | Cost | What it does |
|---|---|---|
list_supported_forms | Free | Lists the immigration processes and USCIS forms supported. |
build_situation_context | Paid | Takes the user's situation, goal and documents (base64; up to 20 files, 5 MB each, 7 MB total), works out the required forms and starts filling them. Returns a checkout link first, then a situationalContextId once paid. |
get_situation_status | Free | Progress for each required form: ready, pending, failed or not generated. |
get_filled_pdf | Free | 15-minute download links for each ready form and one merged PDF. |
Typical flow: list_supported_forms → build_situation_context (pay) → build_situation_context again with stripeSessionId → poll get_situation_status → get_filled_pdf.
How it is protected
- OAuth 2.1: dynamic client registration and PKCE. immi-server is its own authorization server and uses Google for the login itself. Discovery is at
/.well-known/oauth-protected-resource/mcp. - Paid tools: these require a paid, single-use Stripe Checkout session.
- Limits: per-account and per-IP rate limits, plus per-user and service-wide daily spend caps.
- Documents: uploads are deleted from the server as soon as their text has been extracted. Download links expire after 15 minutes.
Publishing to the MCP Registry
server.json is the registry entry. Publish it with mcp-publisher. The pro.formagent/ namespace is verified through a DNS TXT record on formagent.pro:
mcp-publisher login dns --domain formagent.pro --private-key <key>
mcp-publisher validate mcp-publisher publish
Bump version in server.json (and SERVER_INFO in src/mcp/server.ts) for each release.
Pipeline
[One-time, per form]
buildFormMap ──→ buildFormContext │ [One-time, per user] │ buildSituationContext ───┘ │ [Once per form × user] ↓ fillFormMap │ ↓ fillForm ──→ filled PDF
Mechanisms
1 — Build Form Map
Route: POST /api/form-map/build File: src/services/buildFormMap.ts AI: None
Extracts every fillable field ID from a blank PDF and persists an empty { " ": "" } map to MongoDB as a FormMap document. Uses a four-strategy waterfall (pdftk → pdf-lib → qpdf → raw-scan) stopping at the first that returns fields. pdftk is preferred because it reliably accesses XFA field definitions that pdf-lib cannot see.
Input: formId, blank PDF (upload or server path), optional version Output: FormMap — { formId, version, fields: Record }
npx ts-node src/services/buildFormMap.ts <formId> <pdfPath> [version]
2 — Build Form Context
Route: POST /api/form-context/build File: src/services/buildFormContext.ts AI: claude-opus-5-5 (streamed), up to 128 000 tokens
Annotates every field in the FormMap with rich metadata using the form's full narrative PDF text and pdftk-extracted per-field alt-text (USCIS-authored descriptions). Produces a FormContext document in MongoDB. Run once per form; thoroughness over speed.
Requires: FormMap already in MongoDB for formId.
Input: formId, blank PDF path, optional supplemental reference files Output: FormContext — { formId, formMetadata, fields: [{ field, description, party, notes }] }
npx ts-node src/services/buildFormContext.ts <formId> <pdfPath> [contextFiles...]
Print prompts only — no Anthropic call, no DB write
PRINT_PROMPT=1 npx ts-node src/services/buildFormContext.ts
3 — Build Situational Context
Route: POST /api/situation/build File: src/services/buildSituationContext.ts AI: claude-opus-5-5 (streamed), up to 128 000 tokens
Accepts a user's immigration situation description and supporting documents. Documents are pre-processed without the LLM (PDFs via pdf-parse, images via Tesseract OCR with eng+por, plain text via fs.readFileSync) to extract raw text cheaply before it is passed to Anthropic. The model produces two outputs: a plain-English situationSummary and a structured partyData map of named parties to key→value fact bags. All output is in English; dates are normalized to ISO 8601; proper nouns are preserved as written in source documents.
Input: userId, situationDescription, processDescription, optional additionalNotes, optional document uploads Output: SituationalContext — { userId, situationSummary, partyData, documents }
4 — Fill Form Map
Route: POST /api/filled-map/fill File: src/services/fillFormMap.ts AI: claude-sonnet-4-5, up to 16 000 tokens
Takes the FormContext and SituationalContext and calls Anthropic to produce a best-effort value for every field on the form. Behaviour is controlled by assumptionLevel:
| Level | Behaviour |
|---|---|
conservative (default) | Only fills fields with an explicit answer in context. Blank if any inference is required. |
moderate | Adds simple single-step inferences (e.g. nationality from passport country). |
liberal | Fills as many fields as possible; outputs "N/A" / "None" for inapplicable fields. Requires careful review. |
Requires: FormContext and SituationalContext already in MongoDB.
Input: formId, userId, situationalContextId, optional assumptionLevel Output: FilledFormMap — { formId, userId, assumptionLevel, fields: Record }
npx ts-node src/services/fillFormMap.ts <formId> <userId> <situationalContextId> [assumptionLevel]
5 — Fill Form
Route: POST /api/form-fill/fill File: src/services/fillForm.ts AI: None
Reads a FilledFormMap from MongoDB and stamps its values into a blank PDF using pdftk. Zero AI involvement — pure deterministic PDF writing. Designed to be extended to additional form types via the IFormFiller interface + getFormFiller() factory; only PDF is implemented today.
Pre-processing applied to every text field before the PDF layer:
- NFC normalisation (
sanitizeTextValue) — collapses decomposed Unicode sequences (e.g.a+ combining-tilde) into precomposed codepoints (ã). - Word-wrap (
prepareTextValue, 45-char threshold) — inserts newlines at word boundaries for values that would overflow a field's visible area.
FDF encoding (encodeFdfValue in pdf.ts): Pure ASCII values use the compact () FDF literal. Values containing any non-ASCII character are encoded as UTF-16 BE hex strings prefixed with the Unicode BOM (FEFF), per PDF spec §7.3.4. This prevents pdftk from misreading UTF-8 multi-byte sequences as Latin-1 (the classic São Paulo → São Paulo mojibake).
Output filename: {userId}-{formId}-{mmddyyyy hhmm}.pdf Default output directory: output/ /
Requires: FilledFormMap already in MongoDB.
Input: formId, userId, filledFormMapId, formPdfPath, optional outputDir, optional formType (default "pdf") Output: { success, outputPath, filledFields, skippedFields, errors }
npx ts-node src/services/fillForm.ts <formId> <filledFormMapId> <formPdfPath> [outputDir] [formType]
Example
npx ts-node src/services/fillForm.ts i-130 68a1b2c3d4e5f600 assets/forms/i-130/blank.pdf
6 — Manual Load (utility)
File: src/services/manualLoad.ts AI: None
CLI-only utility for seeding or replacing MongoDB documents directly from JSON files. Useful for testing and for injecting manually prepared data without going through the full pipeline.
Supported collections: form-map, form-context, situational-context, filled-form-map JSON source files live in assets/manual-loads/.
npx ts-node src/services/manualLoad.ts <collection> <file>
Examples
npx ts-node src/services/manualLoad.ts form-map i-130-map.json npx ts-node src/services/manualLoad.ts form-context i-130-context.json npx ts-node src/services/manualLoad.ts situational-context user-context.json npx ts-node src/services/manualLoad.ts filled-form-map user-i130-filled.json
End-to-End Pipeline
POST /api/pipeline/run
File: src/routes/pipeline.ts
Chains all three per-user/per-form steps into a single call: buildSituationContext → fillFormMap (×N) → fillForm (×N). The pipeline derives blank PDF paths automatically from assets/forms/ /blank.pdf, validates they exist before making any AI calls, and continues to the next form if one fails.
Body (multipart/form-data):
| Field | Type | Required | Description | ||
|---|---|---|---|---|---|
userId | string | ✅ | Applicant identifier | ||
situationDescription | string | ✅ | Free-text description of the immigration situation | ||
processDescription | string | ✅ | Which process/forms the user is pursuing | ||
additionalNotes | string | ❌ | Any extra context | ||
formIds | string | ✅ | JSON array or comma-separated — e.g. "i-130,i-485" | ||
assumptionLevel | string | ❌ | conservative (default) \ | moderate \ | liberal |
documents | File[] | ❌ | Up to 20 supporting documents (PDFs, images, text) |
Response (200):
{
"situationalContextId": "...", "forms": [ { "formId": "i-130", "filledFormMapId": "...", "success": true, "outputPath": "output/i-130/user_abc-i-130-02272026 1430.pdf", "filledFields": [...], "skippedFields": [...], "errors": [] } ] }
Form Setup (one-time, per form)
File: src/scripts/setup-form.ts
CLI that runs buildFormMap then buildFormContext in sequence for a new form. Run this once per form before using the pipeline.
npx ts-node src/scripts/setup-form.ts <formId> <pdfPath> [version] [contextFiles...]
Examples
npx ts-node src/scripts/setup-form.ts i-485 assets/forms/i-485/blank.pdf npx ts-node src/scripts/setup-form.ts i-693 assets/forms/i-693/blank.pdf 1.0 assets/context/i-693-instructions.md
Requires MONGODB_URI and ANTHROPIC_API_KEY in .env.
Blank Form Assets
Blank PDFs live at assets/forms/ /blank.pdf. Currently available:
assets/forms/
├── g-325a/blank.pdf ├── i-130/blank.pdf ├── i-130a/blank.pdf ├── i-131/blank.pdf ├── i-485/blank.pdf ├── i-693/blank.pdf ├── i-765/blank.pdf └── i-864/blank.pdf
Pass the path directly to any service that accepts formPdfPath.
Environment
MONGODB_URI=...
ANTHROPIC_API_KEY=... # required for buildFormContext, buildSituationContext, fillFormMap PORT=3001 # optional, defaults to 3001
Dependencies
pdftk-java— field extraction, FDF generation, form filling (brew install pdftk-java)qpdf— fallback field extraction strategy (`br