Skip to content

feat: replace FDA SQLite pipeline with BioMCP sidecar#12

Draft
SPerekrestova wants to merge 1 commit intomainfrom
feature/biomcp-migration
Draft

feat: replace FDA SQLite pipeline with BioMCP sidecar#12
SPerekrestova wants to merge 1 commit intomainfrom
feature/biomcp-migration

Conversation

@SPerekrestova
Copy link
Copy Markdown
Owner

Summary

  • Replaced local FDA SQLite drug interaction pipeline with a BioMCP HTTP sidecar (MCP-over-HTTP via mcp SDK), removing ~500 lines of sync/store infrastructure
  • Added DeBERTa-v3-base-mnli zero-shot severity classifier with regex fallback to classify interaction descriptions into major/moderate/minor
  • Interaction checker is now fully async and uses asyncio.gather for concurrent per-drug lookups; returns safe: null + error message when BioMCP is unavailable

Key Changes

  • New: app/nlp/severity_classifier.py, app/clients/biomcp_client.py
  • Rewritten: app/services/interaction_checker.py (sync → async, FDA → BioMCP)
  • Updated: app/api/health.py (/health/data now reports BioMCP connectivity), app/main.py lifespan
  • Deleted: app/data/fda_store.py, scripts/sync_fda_data.py, FDA test files, ijson dependency
  • Infrastructure: Dockerfile.biomcp, updated docker-compose.yml (biomcp service + healthcheck), updated CI pipeline

Test Plan

  • 72 unit tests passing (uv run pytest tests/ --ignore=tests/test_rxnorm_client.py)
  • No stale FDA/SQLite references in app or test code
  • Verify biomcp serve-http command is correct once sidecar is deployed (BioMCP tool schema may need adjustment in biomcp_client.get_interactions)
  • Run docker compose build api biomcp to confirm both images build
  • Run smoke test against deployed stack: ./scripts/smoke-test.sh

🤖 Generated with Claude Code

@SPerekrestova SPerekrestova self-assigned this Mar 13, 2026
@SPerekrestova SPerekrestova force-pushed the feature/biomcp-migration branch from c854fb7 to 5f2d15e Compare March 18, 2026 17:45
Replaces FDA SQLite pipeline with BioMCP MCP sidecar for drug
interaction checking. Adds async MCP client, severity classifier
(DeBERTa zero-shot), graceful degradation, and full test suite.

Archived: BioMCP v0.8.16 returns unstructured FDA label text
instead of structured interaction pairs. Proceeding with DrugBank
custom MCP server approach on feature/drugbank-migration instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SPerekrestova SPerekrestova force-pushed the feature/biomcp-migration branch from 5f2d15e to ceedabc Compare March 18, 2026 18:13
@SPerekrestova SPerekrestova marked this pull request as draft March 18, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant