{"id":49038974,"url":"https://github.com/peter-fusek/oncofiles","last_synced_at":"2026-05-22T08:00:59.163Z","repository":{"id":346325355,"uuid":"1171106425","full_name":"peter-fusek/oncofiles","owner":"peter-fusek","description":"Medical records scattered across Gmail and Google Drive? Oncofiles reads, organizes, and makes them available through AI. For cancer patients and caregivers. Works with Claude \u0026 ChatGPT.","archived":false,"fork":false,"pushed_at":"2026-04-29T13:15:38.000Z","size":31358,"stargazers_count":5,"open_issues_count":62,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-29T13:39:54.607Z","etag":null,"topics":["ai","anthropic","cancer","chatgpt","claude","document-management","european-health-data-space","fastmcp","files-api","health","healthcare","mcp","mcp-server","medical","medical-records","oncology","patient-data","python","slovakia","turso"],"latest_commit_sha":null,"homepage":"https://oncofiles.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peter-fusek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-02T22:02:25.000Z","updated_at":"2026-04-29T13:16:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/peter-fusek/oncofiles","commit_stats":null,"previous_names":["peter-fusek/oncofiles"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/peter-fusek/oncofiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-fusek%2Foncofiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-fusek%2Foncofiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-fusek%2Foncofiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-fusek%2Foncofiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-fusek","download_url":"https://codeload.github.com/peter-fusek/oncofiles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-fusek%2Foncofiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33334777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","cancer","chatgpt","claude","document-management","european-health-data-space","fastmcp","files-api","health","healthcare","mcp","mcp-server","medical","medical-records","oncology","patient-data","python","slovakia","turso"],"created_at":"2026-04-19T14:00:39.446Z","updated_at":"2026-05-22T08:00:59.157Z","avatar_url":"https://github.com/peter-fusek.png","language":"Python","funding_links":[],"categories":["Medical MCP Servers","Servers","Clinical Decision Support"],"sub_categories":["Clinical Validity Score"],"readme":"# oncofiles\n\n[![Tests](https://img.shields.io/badge/tests-607%20passed-brightgreen)]()\n[![Python](https://img.shields.io/badge/python-3.12+-blue)]()\n[![MCP](https://img.shields.io/badge/protocol-MCP-purple)]()\n[![Claude](https://img.shields.io/badge/Claude-MCP-cc785c)](https://claude.ai)\n[![ChatGPT](https://img.shields.io/badge/ChatGPT-MCP-10a37f)](https://chatgpt.com)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\nYour 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.\n\n**[oncofiles.com](https://oncofiles.com)** | [Demo Dashboard](https://oncofiles.com/demo) | [Privacy Policy](https://oncofiles.com/privacy)\n\n## What is this?\n\nOncofiles is an [MCP server](https://modelcontextprotocol.io/) 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.\n\n**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.\n\n**Sister project:** [Oncoteam](https://oncofiles.com/oncoteam) — an AI agent that analyzes your Oncofiles data: tracks lab trends, searches clinical trials, and prepares questions for your oncologist.\n\n**Your data, your control:** Everything stays in your Google Drive. No third-party data processing. Disconnect anytime — your files are always yours.\n\n## Multi-Patient Support (v4.0+)\n\nOncofiles supports multiple patients on a single instance. Each patient gets:\n\n- **Full data isolation** — documents, labs, treatment events, emails, and calendar entries are scoped to the patient\n- **Separate bearer tokens** — each patient (or caregiver) gets their own `onco_*` token\n- **Per-patient OAuth** — Google Drive, Gmail, and Calendar are authorized per patient\n- **Dashboard patient selector** — switch between patients in the web dashboard\n\n### Onboarding a new patient\n\n1. **Dashboard wizard:** Open the dashboard, click \"+ New Patient\", and follow the 4-step wizard\n2. **API:** `POST /api/patients` with `{patient_id, display_name}` — returns a bearer token\n3. **Connect GDrive:** Visit `/oauth/authorize/drive?patient_id=X` to authorize document sync\n4. **Trigger first sync:** `POST /api/sync-trigger` with `{patient_id}` to import documents\n\n## Features\n\n- **76 MCP tools** across 14 modules for comprehensive medical data management\n- **14 document categories** — labs, pathology, imaging, genetics, surgery, consultation, prescriptions, and more\n- **Lab value tracking** — store values, track trends, pre-cycle safety checks for chemo protocols\n- **Google Drive sync** — bidirectional sync with automatic OCR companion files\n- **Gmail \u0026 Calendar scanning** — medical emails and appointments are auto-detected and classified\n- **Clinical research** — search PubMed and ClinicalTrials.gov, log research decisions\n- **Treatment timeline** — track chemo cycles, surgeries, and other treatment events\n- **Document versioning** — track document revisions with full history\n- **AI-powered metadata** — automatic summaries, tags, and structured data extraction\n- **Audit logging** — every tool call is logged for accountability\n\n## Architecture\n\n```\n┌─────────────────┐     MCP Protocol      ┌──────────────┐\n│  Claude / GPT   │◄────────────────────►  │  Oncofiles   │\n│  (AI Assistant)  │    streamable-http     │  MCP Server  │\n└─────────────────┘                        └──────┬───────┘\n                                                  │\n                                    ┌─────────────┼─────────────┐\n                                    │             │             │\n                              ┌─────▼─────┐ ┌────▼────┐ ┌─────▼─────┐\n                              │  SQLite /  │ │ Google  │ │ Anthropic │\n                              │   Turso    │ │  Drive  │ │ Files API │\n                              └───────────┘ └─────────┘ └───────────┘\n```\n\n**Stack:** Python 3.12+ · FastMCP 3.1 · Pydantic · SQLite/Turso · Railway\n\n## Quick start\n\n```bash\n# Clone and install\ngit clone https://github.com/peter-fusek/oncofiles.git\ncd oncofiles\nuv sync --extra dev\n\n# Run locally (stdio mode for Claude Desktop)\nuv run oncofiles-mcp\n\n# Run tests\nuv run pytest\n\n# Lint\nuv run ruff check\n```\n\n### Environment variables\n\n```bash\n# Required\nDATABASE_PATH=data/oncofiles.db\n\n# Optional — cloud database\nTURSO_DATABASE_URL=libsql://...\nTURSO_AUTH_TOKEN=...\n\n# Optional — Google Drive sync\nGOOGLE_DRIVE_FOLDER_ID=...\nGOOGLE_OAUTH_CLIENT_ID=...\nGOOGLE_OAUTH_CLIENT_SECRET=...\n\n# Optional — remote access\nMCP_TRANSPORT=streamable-http  # default: stdio\nMCP_HOST=0.0.0.0\nMCP_PORT=8080\nMCP_BEARER_TOKEN=...\n```\n\n### Connect to Claude Desktop\n\nAdd to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"oncofiles\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"oncofiles-mcp\"],\n      \"cwd\": \"/path/to/oncofiles\"\n    }\n  }\n}\n```\n\n### Connect to ChatGPT\n\nOncofiles works with ChatGPT's MCP integration (Developer Mode). Point ChatGPT to your instance's `/mcp` endpoint with a bearer token.\n\n### Deploy to Railway\n\nThe included `Dockerfile` is ready for Railway deployment:\n\n1. Push to GitHub\n2. Connect repo in Railway\n3. Set environment variables\n4. Railway auto-deploys on push\n\nLive instance: [oncofiles.com](https://oncofiles.com)\n\n## Project structure\n\n```\nsrc/oncofiles/\n├── server.py           # FastMCP server, auth, routes, scheduler\n├── database/           # Mixin-based DB layer (SQLite/Turso)\n├── tools/              # 14 tool modules (76 tools)\n│   ├── documents.py    # CRUD, search, view, versioning\n│   ├── lab_trends.py   # Lab values, trends, safety checks\n│   ├── clinical.py     # Treatment events, research log\n│   ├── research.py     # PubMed, ClinicalTrials.gov search\n│   └── ...\n├── sync.py             # Bidirectional Google Drive sync\n├── gmail_sync.py       # Medical email detection and import\n├── calendar_sync.py    # Calendar event classification\n├── enhance.py          # AI metadata extraction (Haiku)\n├── patient_middleware.py # Per-patient token → context resolution\n├── patient_context.py  # Patient clinical profile\n└── models.py           # Pydantic models\n```\n\n## MCP Registry\n\nListed on the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.peter-fusek/oncofiles`.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n## Who's Behind This\n\n### The People\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Peter Fusek** — CEO \u0026 Founder\n\nSerial 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.\n\nBuilt Oncofiles from personal need — managing his wife's cancer treatment across hundreds of documents, dozens of doctors, and constantly changing lab results.\n\n[LinkedIn](https://www.linkedin.com/in/peterfusek/) · peter.fusek@instarea.com\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Peter Čapkovič** — CTO \u0026 Co-founder\n\nSenior IT architect with 20+ years in enterprise banking (VÚB). Expert in .NET, Python, SQL, and systems architecture. Led architecture across all Instarea products.\n\nArchitecture, development, operations — everything under one roof.\n\n[LinkedIn](https://www.linkedin.com/in/peter-capkovic/)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### The Company\n\n**[Instarea](https://www.instarea.com)** — 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).\n\nOncofiles and [Oncoteam](https://github.com/peter-fusek/oncoteam) are Instarea's latest — built with the same engineering discipline that delivered enterprise-grade products for banking, telecom, and data industries.\n\n10+ verified, synchronized team members available across front-end, back-end, integration, data science, UX/UI, marketing, and cloud ops.\n\n\u003e *\"We take it personally, with our own faces, like family and at work.\"*\n\nBuilt by [Instarea](https://www.instarea.com) | Aligned with [EHDS](https://health.ec.europa.eu/ehealth-digital-health-and-care/european-health-data-space_en) principles\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-fusek%2Foncofiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-fusek%2Foncofiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-fusek%2Foncofiles/lists"}