ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

gov.br APIs MCP

โดย thalisantunesรุ่น 0.2.0i★ 1iรันบนเครื่อง
ชื่อใน registryio.github.thalisantunes/govbr-apis-mcp

วิธีติดตั้ง

ใช้ทำอะไรได้

ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ

  • ต่อแบบ ติดตั้งในเครื่อง
  • บัญชีหรือคีย์ ต้องมี TRANSPARENCIA_API_KEY, DATAJUD_API_KEY, DADOSGOV_API_KEY, SERPRO_CPF_CLIENT_ID, SERPRO_CPF_CLIENT_SECRET, SERPRO_CNPJ_CLIENT_ID, SERPRO_CNPJ_CLIENT_SECRET, SERPRO_DATAVALID_CLIENT_ID, SERPRO_DATAVALID_CLIENT_SECRET, MEIAENTRADA_CODIGO_ACESSO
  • หมวด กฎหมายและข้อมูลภาครัฐ
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
A catalog-driven gateway over Brazilian government APIs, loading OpenAPI specs on demand.

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ผลตรวจผ่าน 3/3 · ทำงานบนเครื่องคุณ

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน

ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. สมัครและสร้างคีย์ของ gov.br APIs MCP

    เปิดเว็บของผู้ทำ สมัครบัญชีแล้วสร้างคีย์ (API key) เก็บไว้ ใช้ในขั้นถัดไป ราคาและแผนฟรีดูที่เว็บของผู้ทำ

    วิธีขอคีย์อยู่ใน README ของผู้ทำด้านล่าง

  3. เปิดไฟล์ตั้งค่าของแอป Claude บนคอม

    SettingsDeveloperEdit Config

  4. วางค่าตั้งนี้แล้วบันทึกไฟล์

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

    วางคีย์ในช่องของแอปเท่านั้น อย่าวางในแชตหรือส่งให้ใคร

  5. ปิดแอป Claude แล้วเปิดใหม่

  6. ลองเลย

    ใช้ gov.br APIs MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ gov.br APIs MCP หรือมีชื่อเครื่องมือของ gov.br APIs MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ChatGPT ยังต่อ gov.br APIs MCP ไม่ได้

gov.br APIs MCP ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ

คุณทำแบบนี้แทนได้

ก · ใช้แอปที่ต่อ gov.br APIs MCP ได้

  • ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
  • ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

ข · ตัวอื่นในหมวด กฎหมายและข้อมูลภาครัฐ ที่ต่อกับ ChatGPT ได้

เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์

ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน

ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. สมัครและสร้างคีย์ของ gov.br APIs MCP

    เปิดเว็บของผู้ทำ สมัครบัญชีแล้วสร้างคีย์ (API key) เก็บไว้ ใช้ในขั้นถัดไป ราคาและแผนฟรีดูที่เว็บของผู้ทำ

    วิธีขอคีย์อยู่ใน README ของผู้ทำด้านล่าง

  3. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  4. วางคำสั่งนี้แล้วกด Enter

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

    แก้ “ใส่ค่าของคุณ” เป็นคีย์ของคุณก่อนกด Enter

    วางคีย์ในช่องของแอปเท่านั้น อย่าวางในแชตหรือส่งให้ใคร

  5. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น gov.br APIs MCP ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  6. ลองเลย

    ใช้ gov.br APIs MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ gov.br APIs MCP หรือมีชื่อเครื่องมือของ gov.br APIs MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน

ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. สมัครและสร้างคีย์ของ gov.br APIs MCP

    เปิดเว็บของผู้ทำ สมัครบัญชีแล้วสร้างคีย์ (API key) เก็บไว้ ใช้ในขั้นถัดไป ราคาและแผนฟรีดูที่เว็บของผู้ทำ

    วิธีขอคีย์อยู่ใน README ของผู้ทำด้านล่าง

  3. กดปุ่มนี้เพื่อเปิด Cursor

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ gov.br APIs MCP ช่อง TRANSPARENCIA_API_KEY, DATAJUD_API_KEY, DADOSGOV_API_KEY, SERPRO_CPF_CLIENT_ID, SERPRO_CPF_CLIENT_SECRET, SERPRO_CNPJ_CLIENT_ID, SERPRO_CNPJ_CLIENT_SECRET, SERPRO_DATAVALID_CLIENT_ID, SERPRO_DATAVALID_CLIENT_SECRET, MEIAENTRADA_CODIGO_ACESSO, GOVBR_CATALOG_DIR, GOVBR_EXTRA_CATALOG_DIR, GOVBR_EXTRA_ALLOWED_HOSTS, XDG_CACHE_HOME ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

    วางคีย์ในช่องของแอปเท่านั้น อย่าวางในแชตหรือส่งให้ใคร

  5. เปิดแชตของ AI ใน Cursor โหมด Agent

  6. ลองเลย

    ใช้ gov.br APIs MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ gov.br APIs MCP หรือมีชื่อเครื่องมือของ gov.br APIs MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน

ต้องมีคีย์ของ gov.br APIs MCP (สร้างที่เว็บของผู้ทำ) · ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. สมัครและสร้างคีย์ของ gov.br APIs MCP

    เปิดเว็บของผู้ทำ สมัครบัญชีแล้วสร้างคีย์ (API key) เก็บไว้ ใช้ในขั้นถัดไป ราคาและแผนฟรีดูที่เว็บของผู้ทำ

    วิธีขอคีย์อยู่ใน README ของผู้ทำด้านล่าง

  3. กดปุ่มนี้เพื่อเปิด VS Code

    กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ gov.br APIs MCP ช่อง TRANSPARENCIA_API_KEY, DATAJUD_API_KEY, DADOSGOV_API_KEY, SERPRO_CPF_CLIENT_ID, SERPRO_CPF_CLIENT_SECRET, SERPRO_CNPJ_CLIENT_ID, SERPRO_CNPJ_CLIENT_SECRET, SERPRO_DATAVALID_CLIENT_ID, SERPRO_DATAVALID_CLIENT_SECRET, MEIAENTRADA_CODIGO_ACESSO, GOVBR_CATALOG_DIR, GOVBR_EXTRA_CATALOG_DIR, GOVBR_EXTRA_ALLOWED_HOSTS, XDG_CACHE_HOME ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

    วางคีย์ในช่องของแอปเท่านั้น อย่าวางในแชตหรือส่งให้ใคร

  5. เปิดแชตของ AI ใน VS Code โหมด Agent

  6. ลองเลย

    ใช้ gov.br APIs MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ gov.br APIs MCP หรือมีชื่อเครื่องมือของ gov.br APIs MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ gov.br APIs MCP อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ติดตั้งในเครื่อง

Claude Code

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

Claude Desktop (claude_desktop_config.json)

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

Cursor (~/.cursor/mcp.json)

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

VS Code (mcp.json)

กำลังตรวจคำสั่ง · ปุ่มคัดลอกจะขึ้นเมื่อตรวจผ่าน

ค่าที่ต้องใส่เอง

  • TRANSPARENCIA_API_KEY ความลับ env
    API key for the Portal da Transparencia API
  • DATAJUD_API_KEY ความลับ env
    API key for the CNJ DataJud API
  • DADOSGOV_API_KEY ความลับ env
    API key for the dados.gov.br portal API (free, generated in the user profile)
  • SERPRO_CPF_CLIENT_ID ความลับ env
    OAuth2 client ID for the Serpro CPF API (commercial contract)
  • SERPRO_CPF_CLIENT_SECRET ความลับ env
    OAuth2 client secret for the Serpro CPF API (commercial contract)
  • SERPRO_CNPJ_CLIENT_ID ความลับ env
    OAuth2 client ID for the Serpro CNPJ API (commercial contract)
  • SERPRO_CNPJ_CLIENT_SECRET ความลับ env
    OAuth2 client secret for the Serpro CNPJ API (commercial contract)
  • SERPRO_DATAVALID_CLIENT_ID ความลับ env
    OAuth2 client ID for the Serpro Datavalid API (commercial contract)
  • SERPRO_DATAVALID_CLIENT_SECRET ความลับ env
    OAuth2 client secret for the Serpro Datavalid API (commercial contract)
  • MEIAENTRADA_CODIGO_ACESSO ความลับ env
    Access code (codigoAcesso) for the CIE validator used for meia-entrada, issued to the venue or producer
  • GOVBR_CATALOG_DIR env
    Directory of catalog YAML files that replaces the packaged catalog (trusted input)
  • GOVBR_EXTRA_CATALOG_DIR env
    Directory of catalog YAML files whose entries are added to the catalog, overriding same-id ones
  • GOVBR_EXTRA_ALLOWED_HOSTS env
    Comma-separated extra hostnames catalog URLs may use; add one only if you trust it with the credentials sent there
  • XDG_CACHE_HOME env
    Base directory of the OpenAPI spec cache (a govbr-apis-mcp folder is created below it); defaults to ~/.cache

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
23/สัปดาห์
การเชื่อมต่อ
รันบนเครื่อง
รุ่นล่าสุดi
0.2.0
ส่งเข้า registryi
20 ต.ค. 2569
แก้โค้ดล่าสุดi
20 ต.ค. 2569
ผู้ทำ
thalisantunes
แพ็กเกจ
pypi: govbr-apis-mcp
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 13 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub thalisantunes ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 24 วันที่ผ่านมา

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ MIT

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบด้วย Google เพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด กฎหมายและข้อมูลภาครัฐi

  • ดาวมากกว่า 87% ของอีก 1828 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 57% ของอีก 1828 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 1828 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

gov.br APIs MCP ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 3 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: TRANSPARENCIA_API_KEY, DATAJUD_API_KEY, DADOSGOV_API_KEY, SERPRO_CPF_CLIENT_ID, SERPRO_CPF_CLIENT_SECRET, SERPRO_CNPJ_CLIENT_ID, SERPRO_CNPJ_CLIENT_SECRET, SERPRO_DATAVALID_CLIENT_ID, SERPRO_DATAVALID_CLIENT_SECRET, MEIAENTRADA_CODIGO_ACESSO

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 24 วันที่ผ่านมา และส่งรุ่นล่าสุด (0.2.0) เข้า registry 24 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Korean Law MCP, Global law, Tw Legal Rag

ตัวอื่นในหมวดเดียวกัน

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Korean Law MCP

Korean law: statutes, precedents, ordinances, treaties and citation verification (법제처 API).

โดย chrisryugjใช้กันมาก★ 2.9Kอัปเดต 10 วันที่ผ่านมา

รันบนคลาวด์

Global law

The law of nearly every country on earth, any date: read it, see what changed it, check citations.

โดย lexifinaกำลังโต★ 1.9Kอัปเดต 3 วันที่ผ่านมา

รันบนคลาวด์✓ lexifina.com

Tw Legal Rag

Taiwan law MCP server: 22M court judgments, statutes, agency rulings, with citation checks

โดย aa0101181514กำลังโต★ 346อัปเดต เมื่อวาน

รันบนคลาวด์

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

govbr-apis-mcp

MCP server that turns Brazilian government APIs into Claude-callable tools through a catalog-driven gateway: instead of one tool per endpoint (hundreds — would blow up client context), five generic tools operate over a local YAML catalog of 116 APIs.

Only the entries that declare an openapi_url have a spec to load: today the Câmara dos Deputados and the Portal da Transparência, 2 of the 116. For those, describe_api loads the OpenAPI spec on demand. Every other callable entry (see the "Callable today?" column below) is reached through call_api alone, using the endpoints in its description and docs_url.

Catalog tiers

TierFileAccess modelCallable today?
publicsrc/govbr_apis_mcp/catalog_data/public.yamlFree — no auth or free API key (IBGE, Banco Central, Câmara, Senado, Portal da Transparência, DataJud, Ipeadata, dados.gov.br…)Yes
serprosrc/govbr_apis_mcp/catalog_data/serpro.yamlSerpro commercial (loja.serpro.gov.br) — OAuth2 client credentials per contracted API, paid per callWith a Serpro contract: set the SERPRO_* variables
meia-entradasrc/govbr_apis_mcp/catalog_data/meia_entrada.yamlEligibility sources for half-price tickets (student CIE, ID Jovem, PcD, e-MEC) — see docs/meia-entrada.md and the POCCIE yes (DNE and FESN); the rest is manual
conectasrc/govbr_apis_mcp/catalog_data/conecta.yamlConecta gov.br — restricted to public-sector entities; 95 APIs indexed as stubs for discoveryNot yet (adhesion pending)

The Conecta tier exists so the catalog reflects the whole landscape now, and becomes callable later by filling in base_url + credentials — the OAuth2 client-credentials flow is already implemented (Serpro uses the same one).

Tools

  • search_catalog(query, category?) — accent-insensitive keyword search; reports total matches and whether the list was truncated.
  • list_apis(category?, status?, limit?) — enumerate entries, callable ones first (by the catalog's status, not by whether your credentials are set; filter it: ~95 Conecta stubs otherwise dominate the output).
  • describe_api(api_id, path?, method?) — catalog metadata + OpenAPI operation list; with path, parameter/request/response schemas ($refs inlined, depth-limited). Reads OpenAPI 3 and Swagger 2.0, as JSON or YAML.
  • call_api(api_id, path, method?, query?, body?, headers?) — invoke an endpoint; base URL and auth resolved from the catalog entry.
  • method is GET, HEAD, POST, PUT, PATCH, DELETE or OPTIONS; anything else returns an error with allowed_methods. A body is accepted only with POST, PUT and PATCH.
  • path is relative to the base_url. . and .. segments (after up to three rounds of percent-decoding, with \ read as / and ; parameters removed) and any path that leaves the base_url prefix are rejected. So is a # (a fragment is never sent; write a literal one as %23) or a control character.
  • A query string embedded in path is merged with query; a key in query replaces the embedded one, and a list value repeats the key.
  • Caller headers are matched case-insensitively, with _ equal to -. Authorization, Proxy-Authorization, Host, Cookie and Accept-Encoding, plus connection, proxy, forwarding and method-override headers, are dropped and reported in ignored_headers (the full list is in server.py). The managed credential is applied last and always wins. A header with an invalid name or value is not ignored: it fails the call with an error.
  • Method, body, headers and path are validated before any OAuth2 token is requested, and invalid input comes back as {"error": ...}.
  • A 3xx is not followed: the response carries its location (redacted, resolved against the requested URL). Response bodies are cut at 60,000 characters.
  • credentials_status(api_id?) — which env vars each API needs and whether they're set, plus callable: whether call_api would accept the entry right now (available and unstable entries; requires_contract ones only once their env vars are set).

POC: meia-entrada de estudante

Fluxo funcional ponta a ponta (código da CIE → decisão de elegibilidade), incluindo modo demo sem credencial: poc/README.md.

Install

python3 -m venv .venv

.venv/bin/pip install -e '.[dev]' .venv/bin/pytest

Register in Claude Code (.mcp.json or claude mcp add):

{

"mcpServers": { "govbr-apis": { "command": "/path/to/govbr-apis-mcp/.venv/bin/govbr-apis-mcp", "env": { "TRANSPARENCIA_API_KEY": "...", "DATAJUD_API_KEY": "..." } } } }

From PyPI: uvx govbr-apis-mcp (set "command": "uvx" and "args": ["govbr-apis-mcp"] in the entry above; no checkout needed). Each release is published to PyPI and to the MCP Registry automatically (publish.yml).

Or run it in a container. The server speaks stdio, so keep -i:

docker build -t govbr-apis-mcp . && docker run -i --rm -e TRANSPARENCIA_API_KEY=... govbr-apis-mcp

Credentials

All secrets come from env vars declared per entry in the catalog (auth_config). Nothing is stored in the repo. .env.example lists the variables. Entries with a free key carry a signup_url; Serpro credentials come with the contract, at loja.serpro.gov.br. credentials_status reports readiness.

The server does not read .env files, and MCP clients start it with a minimal environment, so an export in your shell may never reach it. Put the variables in the client's env block (the example above, or claude mcp add -e KEY=value). For a container, copy .env.example to a git-ignored file such as .env.local, fill in the copy and pass it with docker run --env-file .env.local. Never put real values in .env.example: it is versioned.

API keys (the value together with any prefix) are stripped of surrounding whitespace and must be printable ASCII; otherwise the call fails with credential in contains invalid characters, without echoing the value. OAuth2 client ids and secrets are only stripped: they travel base64-encoded, so any text works. The access token the endpoint returns must be printable ASCII too. When the token endpoint fails, the call returns an error and the token_url, with neither the response body nor any secret.

Auth profiles: none, api_key (static header, optional value prefix — e.g. DataJud's APIKey ), oauth2_client_credentials (token endpoint + id/secret, in-memory token cache; used by Serpro today, by Conecta after adhesion).

Extending the catalog

Add an entry to a YAML file in src/govbr_apis_mcp/catalog_data/. The directory is package data, so the wheel, uvx and the Docker image all carry the catalog. Minimum fields: id, name, provider, category, status, auth. Add openapi_url when the API publishes a spec — describe_api then works with zero code. Regenerate the Conecta tier with .venv/bin/python scripts/scrape_conecta.py. It leaves the file alone when the page yields no APIs, an id the catalog would reject, or fewer than half the current entries (--force overrides only the last check).

Entries are validated on load: ids must be filename-safe, URLs must be https on an allowlisted host (*.gov.br, *.leg.br, *.jus.br plus a few named hosts), and a hostname may only contain [a-z0-9.-] (write internationalized names in punycode). This is a security boundary, not style — the catalog decides where your credentials are sent. Add a host with GOVBR_EXTRA_ALLOWED_HOSTS only if you trust it with them; the same hostname rule applies to it.

To override entries without forking (e.g. filling in Conecta base URLs after adhesion), point GOVBR_EXTRA_CATALOG_DIR at a directory of .yaml or .yml files whose same-id entries win. A directory that does not exist or holds no entries is an error, and so is an id repeated inside it; an empty value counts as unset. GOVBR_CATALOG_DIR replaces the base catalog entirely and should be treated as trusted input.

Development

python3 -m venv .venv

.venv/bin/pip install -e '.[dev]' .venv/bin/ruff check . .venv/bin/ruff format --check . .venv/bin/pytest

CI runs ruff on Python 3.12 and the test suite on 3.11–3.14, then builds the wheel and loads the catalog from a clean install.

Security notes

  • Responses are never written to disk. Only OpenAPI specs are cached, in $XDG_CACHE_HOME/govbr-apis-mcp/ (or ~/.cache/govbr-apis-mcp/) for 24 hours, under a file name derived from sha256(api_id + "\n" + openapi_url): never the id itself, and a changed openapi_url never serves the old spec. OAuth2 tokens live in memory only.
  • call_api does not follow redirects — credentialed requests cannot be steered to another host by a 3xx; the response carries the (redacted) location instead. It always sends Accept-Encoding: identity, so a server has no reason to compress. The 60,000-character cut counts decoded text, though: a server that compresses anyway can still inflate a small chunk before the cut (an accepted risk; see the roadmap).
  • Cookies an API sets are never stored or sent back, so one API cannot plant a cookie that another would receive.
  • Spec fetches follow redirects only by hand: at most 5 hops, and every URL (the first and each Location) must be https on an allowlisted host before it is requested. The body is capped at 5 MiB, JSON and YAML are accepted (YAML with aliases, including merge keys that rely on them, is refused), and the document must carry openapi or swagger. A compressed response is refused and the whole download has a 60-second deadline; both come back as spec_error.
  • The httpx and httpcore loggers stay at WARNING, so httpx logs no request URL (query string included).
  • Entries flagged pii: true return personal data (CPF, name, photo) into the client transcript. Today: meiaentrada-cie-validador, fesn-cie-validador (callable without any credential: whoever holds a use code gets the holder's data) and the three Serpro entries.

Roadmap

  • Conecta adhesion as a public-sector entity → fill gateway base URLs + credentials
  • Per-API OpenAPI URLs for Conecta entries (linked from each detail page)
  • Serpro trial-mode toggle (call -trial base URLs with the published demo token)
  • Per-call cost guard for paid Serpro APIs
  • Bounded decompression for compressed upstream responses
  • Pleito à SNJ para a API conecta-id-jovem (admite instituição privada)
  • Fallback documental para CIE fora da base DNE (DCEs e entidades estaduais)

License

MIT - see LICENSE.