@mcpassure/mcp-anvisa-bulario 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -8,9 +8,10 @@
8
8
 
9
9
  Enables AI agents (Claude, GPT, Copilot) to query drug leaflets (bulas), active ingredients, therapeutic classes, and other metadata for medications registered in Brazil, with structured responses and efficient caching.
10
10
 
11
- [![CI](https://github.com/mcpassure/mcp-anvisa-bulario/actions/workflows/ci.yml/badge.svg)](https://github.com/mcpassure/mcp-anvisa-bulario/actions)
12
11
  [![npm](https://img.shields.io/npm/v/@mcpassure/mcp-anvisa-bulario)](https://www.npmjs.com/package/@mcpassure/mcp-anvisa-bulario)
13
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
13
+ [![OSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/mcpassure/monorepo/badge)](https://securityscorecards.dev/viewer/?uri=github.com/mcpassure/monorepo)
14
+ [![SAFE-MCP](https://img.shields.io/badge/SAFE--MCP-mapped-green)](#safe-mcp-mapping)
14
15
 
15
16
  ---
16
17
 
@@ -89,13 +90,7 @@ Add to `claude_desktop_config.json`:
89
90
 
90
91
  ## Demo
91
92
 
92
- ![Demo](./.github/assets/demo.gif)
93
-
94
- To run locally:
95
-
96
- ```bash
97
- npm run demo
98
- ```
93
+ 🚧 Demo GIF coming soon.
99
94
 
100
95
  ---
101
96
 
@@ -194,3 +189,34 @@ Maintained by [MCPAssure Brasil](https://github.com/mcpassure). See [CONTRIBUTIN
194
189
  ---
195
190
 
196
191
  Part of the [MCPAssure](https://github.com/mcpassure) catalog — curated MCP examples for Brazilian healthcare.
192
+
193
+ ---
194
+
195
+ ## SAFE-MCP Mapping
196
+
197
+ Assessment against the SAFE-MCP framework (OpenSSF + LF + OpenID Foundation).
198
+
199
+ ### Mitigated attacks
200
+
201
+ | ID | Attack | Status | How we mitigate it |
202
+ |----|--------|--------|-------------------|
203
+ | SAFE-T001 | Tool Poisoning | ✓ Mitigated | Strict Zod schema; drug names validated before querying the database |
204
+ | SAFE-T002 | Indirect Prompt Injection | ✓ Mitigated | Structured output (`structuredContent`); ANVISA content is tabular, no executable markup |
205
+ | SAFE-T003 | Credential exposure | ✓ Mitigated | Public ANVISA data with no authentication; R2 only in server-side Worker |
206
+ | SAFE-T004 | Data exfiltration | ✓ Mitigated | Read-only on public drug data; no access to user data |
207
+ | SAFE-T005 | Resource exhaustion | ✓ Mitigated | Local SQLite cache (18MB); canary uses HEAD request or single header download |
208
+
209
+ ### NOT mitigated (honest declaration)
210
+
211
+ | ID | Attack | Why not mitigated |
212
+ |----|--------|------------------|
213
+ | SAFE-T010 | Supply-chain attack via npm | `pnpm audit` + Renovate; no SBOM generated yet |
214
+ | SAFE-T015 | Side-channel timing analysis | Not relevant for public tabular drug data |
215
+
216
+ ### Lethal Trifecta Declaration (Willison, 2025)
217
+
218
+ 1. **Private data access** — ✗ **Absent.** ANVISA Bulário is entirely public; no patient data is accessed.
219
+ 2. **Untrusted content exposure** — ⚠ **Partial.** Inputs validated by Zod; ANVISA data is governmental.
220
+ 3. **External communication capability** — ✗ **Absent.** MCP operates on local SQLite cache; no runtime external calls.
221
+
222
+ **Conclusion:** this MCP **does not combine all 3 factors simultaneously**. Local-first architecture eliminates the external communication factor.
package/README.md CHANGED
@@ -8,9 +8,10 @@
8
8
 
9
9
  Permite que agentes de IA (Claude, GPT, Copilot) consultem bulas, princípios ativos, classes terapêuticas e demais metadados de medicamentos registrados no Brasil com resposta estruturada e cache eficiente.
10
10
 
11
- [![CI](https://github.com/mcpassure/mcp-anvisa-bulario/actions/workflows/ci.yml/badge.svg)](https://github.com/mcpassure/mcp-anvisa-bulario/actions)
12
11
  [![npm](https://img.shields.io/npm/v/@mcpassure/mcp-anvisa-bulario)](https://www.npmjs.com/package/@mcpassure/mcp-anvisa-bulario)
13
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
13
+ [![OSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/mcpassure/monorepo/badge)](https://securityscorecards.dev/viewer/?uri=github.com/mcpassure/monorepo)
14
+ [![SAFE-MCP](https://img.shields.io/badge/SAFE--MCP-mapped-green)](#safe-mcp-mapping)
14
15
 
15
16
  ---
16
17
 
@@ -90,13 +91,7 @@ Adicione ao `claude_desktop_config.json`:
90
91
 
91
92
  ## Demo
92
93
 
93
- ![Demo](./.github/assets/demo.gif)
94
-
95
- Para rodar localmente:
96
-
97
- ```bash
98
- npm run demo
99
- ```
94
+ 🚧 Demo GIF em breve.
100
95
 
101
96
  ---
102
97
 
@@ -190,3 +185,34 @@ Mantido pela [MCPAssure Brasil](https://github.com/mcpassure). Consulte [CONTRIB
190
185
  ---
191
186
 
192
187
  Parte do catálogo [MCPAssure](https://github.com/mcpassure) — exemplos de curadoria de MCPs para saúde brasileira.
188
+
189
+ ---
190
+
191
+ ## SAFE-MCP Mapping
192
+
193
+ Avaliação contra o framework SAFE-MCP (OpenSSF + LF + OpenID Foundation).
194
+
195
+ ### Ataques mitigados
196
+
197
+ | ID | Ataque | Status | Como mitigamos |
198
+ |----|--------|--------|----------------|
199
+ | SAFE-T001 | Tool Poisoning | ✓ Mitigado | Schema Zod estrito; nomes de medicamentos validados antes de consultar banco |
200
+ | SAFE-T002 | Indirect Prompt Injection | ✓ Mitigado | Output estruturado (`structuredContent`); conteúdo ANVISA é tabular, sem markup executável |
201
+ | SAFE-T003 | Credential exposure | ✓ Mitigado | Dados públicos ANVISA sem autenticação; R2 apenas em Worker server-side |
202
+ | SAFE-T004 | Data exfiltration | ✓ Mitigado | Read-only sobre dados públicos de medicamentos; sem acesso a dados de usuário |
203
+ | SAFE-T005 | Resource exhaustion | ✓ Mitigado | Cache SQLite local (18MB); canary usa HEAD request ou download único de header |
204
+
205
+ ### Ataques NÃO mitigados (declaração honesta)
206
+
207
+ | ID | Ataque | Por que não mitigado |
208
+ |----|--------|---------------------|
209
+ | SAFE-T010 | Supply-chain attack via npm | `pnpm audit` + Renovate; sem SBOM gerado ainda |
210
+ | SAFE-T015 | Side-channel timing analysis | Não relevante para dados públicos tabelados de medicamentos |
211
+
212
+ ### Lethal Trifecta Declaration (Willison, 2025)
213
+
214
+ 1. **Acesso a dados privados** — ✗ **Ausente.** Bulário ANVISA é integralmente público; nenhum dado de paciente é acessado.
215
+ 2. **Exposição a conteúdo não-confiável** — ⚠ **Parcial.** Inputs validados por Zod; dados ANVISA são governamentais.
216
+ 3. **Capacidade de comunicação externa** — ✗ **Ausente.** MCP opera sobre banco SQLite local; sem chamadas em runtime.
217
+
218
+ **Conclusão:** este MCP **não combina os 3 fatores simultaneamente**. Arquitetura local-first elimina o fator de comunicação externa.
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpassure/mcp-anvisa-bulario",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "mcpName": "io.github.mcpassure/mcp-anvisa-bulario",
5
5
  "description": "MCP server para consulta do Bulário Eletrônico da ANVISA via CSV oficial",
6
6
  "license": "MIT",
@@ -32,24 +32,6 @@
32
32
  "README.md",
33
33
  "LICENSE"
34
34
  ],
35
- "scripts": {
36
- "build": "tsc -p tsconfig.build.json",
37
- "start": "node dist/index.js",
38
- "dev": "tsx src/index.ts",
39
- "test": "vitest run",
40
- "test:watch": "vitest",
41
- "test:integration": "tsx integration-tests/bin/run-all.ts",
42
- "test:integration:offline": "tsx integration-tests/bin/run-all.ts --offline",
43
- "lint": "biome check src tests evals integration-tests test-utils",
44
- "lint:fix": "biome check --write src tests evals integration-tests test-utils",
45
- "format": "biome format --write src tests evals integration-tests test-utils",
46
- "typecheck": "tsc --noEmit",
47
- "sync": "tsx src/scripts/sync.ts",
48
- "evals": "tsx evals/runner.ts",
49
- "canary": "tsx src/scripts/canary.ts",
50
- "demo": "tsx scripts/demo.ts",
51
- "prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run build"
52
- },
53
35
  "dependencies": {
54
36
  "@modelcontextprotocol/sdk": "^1.29.0",
55
37
  "aws4fetch": "^1.0.20",
@@ -62,9 +44,29 @@
62
44
  "@types/node": "^22.10.0",
63
45
  "tsx": "^4.21.0",
64
46
  "typescript": "^5.9.3",
65
- "vitest": "^4.1.6"
47
+ "vitest": "^4.1.6",
48
+ "@mcpassure/test-utils": "0.1.0"
66
49
  },
67
50
  "engines": {
68
51
  "node": ">=22.0.0"
52
+ },
53
+ "scripts": {
54
+ "build": "tsc -p tsconfig.build.json",
55
+ "start": "node dist/index.js",
56
+ "dev": "tsx src/index.ts",
57
+ "test": "vitest run --exclude tests/e2e",
58
+ "test:e2e": "vitest run tests/e2e",
59
+ "test:watch": "vitest",
60
+ "test:integration": "tsx integration-tests/bin/run-all.ts",
61
+ "test:integration:offline": "tsx integration-tests/bin/run-all.ts --offline",
62
+ "lint": "biome check src tests evals integration-tests test-utils",
63
+ "lint:fix": "biome check --write src tests evals integration-tests test-utils",
64
+ "format": "biome format --write src tests evals integration-tests test-utils",
65
+ "typecheck": "tsc --noEmit",
66
+ "sync": "tsx src/scripts/sync.ts",
67
+ "evals": "tsx evals/runner.ts",
68
+ "canary": "tsx src/scripts/canary.ts",
69
+ "schema:check": "tsx scripts/schema-check.ts",
70
+ "demo": "tsx scripts/demo.ts"
69
71
  }
70
- }
72
+ }
@@ -1,2 +0,0 @@
1
- export { HttpClient } from "./http.js";
2
- //# sourceMappingURL=playwright-http.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"playwright-http.d.ts","sourceRoot":"","sources":["../../src/utils/playwright-http.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -1,4 +0,0 @@
1
- // Consolidado em ./http.ts — este arquivo será removido na próxima limpeza.
2
- // Re-export pra manter qualquer import legacy funcionando temporariamente.
3
- export { HttpClient } from "./http.js";
4
- //# sourceMappingURL=playwright-http.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"playwright-http.js","sourceRoot":"","sources":["../../src/utils/playwright-http.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}