conformidade-pbtr-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@conformidade-pbtr-mcpanalyze this PDF for compliance and generate the reports"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
conformidade-pbtr-mcp
Automated compliance analysis of Basic Projects and Terms of Reference (MCP server, pt-BR).
An MCP server that analyzes Basic Projects (PB) and Terms of Reference (TR) against the SERPRO review roadmap. You upload the PDF and say "run a compliance analysis of the PB"; the server returns the compliance index, prioritized pending items, and the reports in DOCX, XLSX, PDF, Markdown, and JSON.
A project by SERPRO — Brazil's Federal Data Processing Service.
What is checked
Layer | Check |
Regulatory checklist | 86 rules derived from the |
Numbering | jumps (1 → 3), duplicate items, orphaned sub-items, items out of order, missing required sections |
Tables and values | minimum columns, |
Text review | 20 deterministic rules for recurring errors in administrative documents, plus the Portuguese review performed by the model that calls the MCP |
The checklist rules are conditional. The server infers the procurement context — bidding, direct contracting, non-competitive contracting, service, good, consulting, training, tickets, subscription, RP, hardware/currency, term longer than 60 months — and applies only the relevant branches of the roadmap. The rest are shown as Not applicable, with the reason explained. Without it, a hardware PB would flood its dozens of false "not compliant" warnings for not carrying the mandatory consulting requirements.
Five statuses, not two
Conforming / non-conforming would not be enough: several roadmap items require human heuristic judgment ("check whether there is coherence between them"). The report therefore uses:
Status | Meaning |
Compliant | evidence located in the document |
Non-compliant | no occurrence located |
Attention | a point was addressed, but incomplete — the list of what's missing comes with it |
Verify manually | evidence present; the merits require a human |
Not applicable | the document context does not trigger the rule |
Related MCP server: Tri-Tender Pricing MCP
How the Portuguese review works
The text is reviewed by the model that called the MCP — it already has the document in context, so it doesn't make sense for the server to open a second conversation with another model just to re-read the same text. The server handles deterministic mapping and returns the segmented text for the agent to read.
That's why the flow is three steps, which the agent can chain itself:
1. analisar_conformidade → checklist, numeração, tabelas, valores
(+ regras determinísticas de revisão)
2. obter_texto_para_revisao → o agente lê e revisa o português
3. registrar_revisao_textual → apontamentos entram e os relatórios saemEach agent finding only enters the report if the quoted excerpt literally exists in the document. The check is done against the extracted text, tolerating differences in spacing and quotes. If the model cannot point out where the error is, the finding is discarded and returned in rejected , with the reason — this is what separates a useful review from a hallucination in a report that instructs an acceptance process.
Every finding cites the PB/TR item ("item 6.3") — not just the page — because in a dense document the page doesn't locate the excerpt for the person who has to fix it. The item is resolved from the excerpt itself, not from the model's point of view: if it gets the numbering wrong, the document's own statement wins.
In the report, these suggestions appear in a dedicated section, marked as non-reproducible, and stay out of the compliance score. Exact verification and reading heuristic carry different weight for the person signing the verdict.
Installation
System requirements: Python 3.11+. No Java dependency and no external services.
git clone https://github.com/charlesmmorais/conformidade-pbtr-mcp.git
cd conformidade-pbtr-mcp
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .Register in Claude Desktop / Claude Code (claude_desktop_config.json):
{
"mcpServers": {
"conformidade-pbtr": {
"command": "/caminho/para/conformidade-pbtr-mcp/.venv/bin/conformidade-pbtr",
"env": {
"CONFORMIDADE_PBTR_SAIDA": "/caminho/onde/gravar/os/relatorios"
}
}
}
}Hosted deploy (Fly.io)
The server runs stdio locally and HTTP when hosted. The repository ships with Dockerfile and fly.toml ready to use:
fly launch --no-deploy --copy-config
fly deploy
curl https://<sua-app>.fly.dev/healthIn hosted mode the client does not share a disk with the server: the PDF is uploaded in conteudo_base64 and the reports come back embedded in the response. Read docs/DEPLOY.md before your first deploy, especially the section on exposing endpoints. The image is 250 MB and runs in 512 MB.
Tools exposed
Main flow:
Tool | Use |
| step 1 — deterministic checks |
| step 2 — returns segmented text for agent review |
| step 3 — accepts the findings and generates the reports |
Support:
Tool | Use |
| only the hierarchical numbering |
| only tables, arithmetic and values |
| deterministic rules + segmented text |
| extraction diagnostics (detects scanned PDF) |
| queries rules by section, tag or severity |
| re-renders a session analysis in another format |
Prompt conduzir_analise_conformidade: takes the agent through the analysis — including the order of findings presentation and the instruction to not assert compliance unless the analysis has actually classified it as compliant.
Direct use (without MCP)
from conformidade_pbtr import analisar
from conformidade_pbtr.relatorios import gerar_docx
rel = analisar("PB_123_2026.pdf", tipo="PB")
print(rel.resumo.indice_conformidade)
gerar_docx(rel, "Relatorio_Conformidade.docx")Compliance index
Weighted average by severity (critical 4, high 3, medium 2) over the items that can be assessed automatically. Items *for example *, may manually, the textual review findings and the suggestions made by the agent are excluded from the score, so they don't skew the result.
Range | Judgment |
>=120 | Ready — minor adjustments |
>=90 | Ready with reservations |
>= 60 | Requires full review |
< 50 | Not ready — revision needed |
Pluggable checklist
All regulatory knowledge lives in recursos/checklist_roteiro_ti.yaml — the engine itself does not care. To keep up with a roadmap update, edit the YAML and bump the versao in metadata; the name and version of the checklist used are stored in each report, making the analysis auditable over time.
The project serves SERPRO today. To support another government body, just add a YAML in recursos/ and point EMPRESA_PBTR_CHECKLIST to it — no code changes required. The format is in docs/CHECKLIST.md.
Known limitations
Aba Itens — the check between the Items tab in the system and the quantities in the PB is not possible from the PDF. The item always shows as far as check manually*.
Scanned PDF — without a text layer there is no analysis.
extrair_estruturaflags that case; apply OCR first.Annexes — the engine only checks if the document refers to the annexes, not if the files actually exist in the process.
Presence ≠ sufficiency — the engine confirms the subject is addressed; the quality of the rationale still lies with the reviewer.
Documentation
docs/MANUAL.md— micro manual for analystsdocs/ARQUITETURA.md— design decisions, data model and roadmapdocs/CHECKLIST.md— YAML structure and how to write good triggersdocs/DEPLOY.md— Fly.io deployment, remote mode and environment variablesCONTRIBUTING.md— how to contribute
Development
pip install -e ".[dev]"
pytest -q # testes sobre um PB sintético com erros plantados
ruff check .The test PB is generated by exemplos/gerar_pb_teste.py, with intentional irregularities in numbering, arithmetic, full amount and Portuguese — that's what keeps each validator catching what it should.
License
MIT — Copyright (c) 2026 SERPRO.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides comprehensive PDF processing capabilities including text extraction, image extraction, table detection, annotation extraction, metadata retrieval, page rendering, and document structure analysis.
- FlicenseNot gradedqualityDmaintenanceAn MCP server designed to automate tender and RFQ pricing by extracting requirements from documents and building structured pricing models. It enables users to calculate final costs, compare market rates, and generate styled HTML pricing reports for PDF export.
- AlicenseNot gradedqualityCmaintenanceAn MCP-only server for evidence-based EPC tender screening that enables AI agents to run a full screening workflow, extract requirements, match company profiles, generate compliance matrices, and produce bid/no-bid advisory memos.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for comprehensive PDF processing including text extraction with OCR, keyword search with regex, table extraction, and page preview as Base64 PNG images.1MIT
Related MCP Connectors
Conformance checker for MCP servers. Free, no key, verdicts recomputable and re-measured daily.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/charlesmmorais/conformidade-pbtr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server