oncofiles
AI-powered medical document management for cancer patients and caregivers. Connects Google Drive, Gmail, and Calendar to Claude, ChatGPT, and any MCP client.
README
oncofiles
Your medical records are scattered across Gmail, Google Drive, and Calendar. Oncofiles reads everything, organizes it, and makes it available through AI — so you can ask about your health naturally in Claude or ChatGPT.
oncofiles.com | Demo Dashboard | Privacy Policy
What is this?
Oncofiles is an MCP server built for cancer patients and their caregivers. It connects to your Google Drive, Gmail, and Calendar, reads all your medical documents (lab results, CT scans, pathology reports, prescriptions), and makes them accessible through any AI chat — Claude, ChatGPT, or any MCP client.
Built from real need: Created by a caregiver managing his wife's cancer treatment. Hundreds of documents, dozens of doctors, constantly changing lab results. Oncofiles organizes the chaos so you can focus on treatment, not on finding papers.
Sister project: Oncoteam — an AI agent that analyzes your Oncofiles data: tracks lab trends, searches clinical trials, and prepares questions for your oncologist.
Your data, your control: Everything stays in your Google Drive. No third-party data processing. Disconnect anytime — your files are always yours.
Multi-Patient Support (v4.0+)
Oncofiles supports multiple patients on a single instance. Each patient gets:
- Full data isolation — documents, labs, treatment events, emails, and calendar entries are scoped to the patient
- Separate bearer tokens — each patient (or caregiver) gets their own
onco_*token - Per-patient OAuth — Google Drive, Gmail, and Calendar are authorized per patient
- Dashboard patient selector — switch between patients in the web dashboard
Onboarding a new patient
- Dashboard wizard: Open the dashboard, click "+ New Patient", and follow the 4-step wizard
- API:
POST /api/patientswith{patient_id, display_name}— returns a bearer token - Connect GDrive: Visit
/oauth/authorize/drive?patient_id=Xto authorize document sync - Trigger first sync:
POST /api/sync-triggerwith{patient_id}to import documents
Features
- 76 MCP tools across 14 modules for comprehensive medical data management
- 14 document categories — labs, pathology, imaging, genetics, surgery, consultation, prescriptions, and more
- Lab value tracking — store values, track trends, pre-cycle safety checks for chemo protocols
- Google Drive sync — bidirectional sync with automatic OCR companion files
- Gmail & Calendar scanning — medical emails and appointments are auto-detected and classified
- Clinical research — search PubMed and ClinicalTrials.gov, log research decisions
- Treatment timeline — track chemo cycles, surgeries, and other treatment events
- Document versioning — track document revisions with full history
- AI-powered metadata — automatic summaries, tags, and structured data extraction
- Audit logging — every tool call is logged for accountability
Architecture
┌─────────────────┐ MCP Protocol ┌──────────────┐
│ Claude / GPT │◄────────────────────► │ Oncofiles │
│ (AI Assistant) │ streamable-http │ MCP Server │
└─────────────────┘ └──────┬───────┘
│
┌─────────────┼─────────────┐
│ │ │
┌─────▼─────┐ ┌────▼────┐ ┌─────▼─────┐
│ SQLite / │ │ Google │ │ Anthropic │
│ Turso │ │ Drive │ │ Files API │
└───────────┘ └─────────┘ └───────────┘
Stack: Python 3.12+ · FastMCP 3.1 · Pydantic · SQLite/Turso · Railway
Quick start
# Clone and install
git clone https://github.com/peter-fusek/oncofiles.git
cd oncofiles
uv sync --extra dev
# Run locally (stdio mode for Claude Desktop)
uv run oncofiles-mcp
# Run tests
uv run pytest
# Lint
uv run ruff check
Environment variables
# Required
DATABASE_PATH=data/oncofiles.db
# Optional — cloud database
TURSO_DATABASE_URL=libsql://...
TURSO_AUTH_TOKEN=...
# Optional — Google Drive sync
GOOGLE_DRIVE_FOLDER_ID=...
GOOGLE_OAUTH_CLIENT_ID=...
GOOGLE_OAUTH_CLIENT_SECRET=...
# Optional — remote access
MCP_TRANSPORT=streamable-http # default: stdio
MCP_HOST=0.0.0.0
MCP_PORT=8080
MCP_BEARER_TOKEN=...
Connect to Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"oncofiles": {
"command": "uv",
"args": ["run", "oncofiles-mcp"],
"cwd": "/path/to/oncofiles"
}
}
}
Connect to ChatGPT
Oncofiles works with ChatGPT's MCP integration (Developer Mode). Point ChatGPT to your instance's /mcp endpoint with a bearer token.
Deploy to Railway
The included Dockerfile is ready for Railway deployment:
- Push to GitHub
- Connect repo in Railway
- Set environment variables
- Railway auto-deploys on push
Live instance: oncofiles.com
Project structure
src/oncofiles/
├── server.py # FastMCP server, auth, routes, scheduler
├── database/ # Mixin-based DB layer (SQLite/Turso)
├── tools/ # 14 tool modules (76 tools)
│ ├── documents.py # CRUD, search, view, versioning
│ ├── lab_trends.py # Lab values, trends, safety checks
│ ├── clinical.py # Treatment events, research log
│ ├── research.py # PubMed, ClinicalTrials.gov search
│ └── ...
├── sync.py # Bidirectional Google Drive sync
├── gmail_sync.py # Medical email detection and import
├── calendar_sync.py # Calendar event classification
├── enhance.py # AI metadata extraction (Haiku)
├── patient_middleware.py # Per-patient token → context resolution
├── patient_context.py # Patient clinical profile
└── models.py # Pydantic models
MCP Registry
Listed on the MCP Registry as io.github.peter-fusek/oncofiles.
Contributing
See CONTRIBUTING.md for guidelines.
License
Who's Behind This
The People
<table> <tr> <td width="50%">
Peter Fusek — CEO & Founder
Serial entrepreneur and AI strategist. 4 years at Tatra banka. Co-founded marketlocator (exit to Deutsche Telekom). Advisor to VÚB Bank CEO. 18+ years building technology products.
Built Oncofiles from personal need — managing his wife's cancer treatment across hundreds of documents, dozens of doctors, and constantly changing lab results.
LinkedIn · peter.fusek@instarea.com
</td> <td width="50%">
Peter Čapkovič — CTO & Co-founder
Senior IT architect with 20+ years in enterprise banking (VÚB). Expert in .NET, Python, SQL, and systems architecture. Led architecture across all Instarea products.
Architecture, development, operations — everything under one roof.
</td> </tr> </table>
The Company
Instarea — 18 years, 23 products shipped. From telecom analytics and enterprise clients (Callinspector) to mobile-first fintech (InventButton), big data exits (marketlocator → Deutsche Telekom), IoT platforms, and AI-first products (PulseShape, ReplicaCity, HomeGrif).
Oncofiles and Oncoteam are Instarea's latest — built with the same engineering discipline that delivered enterprise-grade products for banking, telecom, and data industries.
10+ verified, synchronized team members available across front-end, back-end, integration, data science, UX/UI, marketing, and cloud ops.
"We take it personally, with our own faces, like family and at work."
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。