Skip to main content

A medical paper writing assistant using MCP support

Project description

Medical Paper Assistant

Python MCP Copilot License

Windows Linux macOS

๐Ÿ”ฌ An Integrated AI Toolkit for Medical Paper Writing
3 MCP Servers ยท ~107 Tools ยท 26 Skills ยท 14 Prompt Workflows โ€” All in VS Code

๐Ÿ“– ็น้ซ”ไธญๆ–‡็‰ˆ

๐Ÿค– Auto-Paper: Fully Autonomous Paper Writing Guide โ€” 11-Phase Pipeline, 42 Quality Hooks, Structured Review Loop


๐Ÿ“ฆ What's in the Box

This is a monorepo toolkit that bundles everything a medical researcher needs โ€” from literature search to Word/LaTeX export โ€” into one integrated VS Code environment.

Component Type Tools Description
mdpaper Core MCP Server 57 Paper writing: projects, references, drafts, analysis, validation, export
pubmed-search MCP Server (submodule) 37 PubMed/Europe PMC/CORE search, PICO, citation metrics, session mgmt
CGU MCP Server (submodule) 13 Creative generation: brainstorm, deep think, spark collision
VS Code Extension Extension 3 cmds MCP server lifecycle, @mdpaper chat participant
Dashboard Next.js Web App โ€” Project management UI, diagram editor
Foam VS Code Extension โ€” [[wikilink]] citation linking, hover preview, graph view
Skills Agent Workflows 26 Guided multi-tool workflows (literature review, draft writing...)
Prompts Prompt Files 14 /mdpaper.search, /mdpaper.draft, etc.

External MCP Servers (optional, installed via uvx):

  • drawio โ€” CONSORT/PRISMA flowchart generation
  • zotero-keeper โ€” Import references from Zotero library

How the Pieces Fit Together

flowchart LR
    subgraph IDE["VS Code"]
        Agent["Copilot Agent<br/>26 Skills ยท 14 Prompts"]
        Foam[Foam Plugin]
        Ext[MedPaper Extension]
        Dash[Dashboard]
    end

    subgraph MCP["MCP Servers (~107 tools)"]
        mdpaper["mdpaper<br/>57 tools<br/>Draft ยท Export ยท Validate"]
        pubmed["pubmed-search<br/>37 tools<br/>Search ยท Metrics"]
        cgu["CGU<br/>13 tools<br/>Deep Think ยท Ideas"]
    end

    subgraph Data["Project Data"]
        proj[("projects/{slug}/<br/>ยท .memory/<br/>ยท references/<br/>ยท drafts/")]
    end

    Agent <-->|MCP| mdpaper
    Agent <-->|MCP| pubmed
    Agent <-->|MCP| cgu
    mdpaper -->|HTTP API| pubmed
    Foam <-->|Wikilinks| proj
    mdpaper <--> proj
    Ext --> mdpaper
    Dash --> proj

๐ŸŽฏ Why This Tool?

Traditional paper writing tools require you to know exactly what you want before you start. But research is rarely that linear.

Medical Paper Assistant is different:

  • ๐Ÿ” Explore First, Decide Later โ€” Browse literature freely, save interesting papers, then decide your research direction
  • ๐Ÿ’ฌ Conversational Workflow โ€” Chat naturally with AI to refine your ideas, not fight with forms
  • ๐Ÿงญ Guided Process โ€” Step-by-step prompts guide you from concept to publication-ready manuscript
  • ๐Ÿ”— All-in-One โ€” Search, write, cite, analyze, export โ€” all integrated inside VS Code
Traditional Tools Medical Paper Assistant
Fixed templates, rigid workflow Flexible, exploratory approach
Separate apps for search/write/cite All-in-one: ~107 tools in VS Code
Manual reference management Auto-save with verified PubMed data
Export then format Direct Word export with journal styles
Learn complex UI Natural language conversation

๐Ÿš€ Quick Start

Prerequisites

Requirement Version Check
Python 3.12+ python3 --version
Git Any recent git --version
VS Code Latest Help โ†’ About
GitHub Copilot Extension Extensions panel

Install

# Clone with submodules
git clone --recursive https://github.com/u9401066/med-paper-assistant.git
cd med-paper-assistant

# Run setup script
./scripts/setup.sh          # Linux/macOS
.\scripts\setup.ps1         # Windows PowerShell

The script will:

  1. โœ… Create Python virtual environment (.venv/)
  2. โœ… Install all dependencies (via uv)
  3. โœ… Create .vscode/mcp.json configuration
  4. โœ… Verify installation

Verify: In Copilot Chat, type /mcp โ€” you should see mdpaper listed ๐ŸŽ‰

Optional Integrations

# Foam for reference linking (highly recommended)
code --install-extension foam.foam-vscode

# Draw.io for diagram generation
./scripts/setup-integrations.sh && ./scripts/start-drawio.sh

๐Ÿ’ฌ MCP Prompts โ€” Just Type and Go

In Copilot Chat, type these prompts to trigger guided workflows:

Prompt Description
/mdpaper.search ๐Ÿ” Start here! Explore literature, save papers
/mdpaper.concept ๐Ÿ“ Develop research concept with novelty validation
/mdpaper.draft โœ๏ธ Write manuscript with auto-citations
/mdpaper.analysis ๐Ÿ“Š Analyze CSV data, generate figures & Table 1
/mdpaper.format ๐Ÿ“„ Export to Word with journal formatting
/mdpaper.clarify ๐Ÿ”„ Refine specific sections through conversation
/mdpaper.project ๐Ÿ“ Create or switch research projects
/mdpaper.strategy โš™๏ธ Configure search strategy (dates, filters)
/mdpaper.help โ“ Show all available commands

๐Ÿ’ก Recommended Workflow: /mdpaper.search โ†’ /mdpaper.concept โ†’ /mdpaper.draft โ†’ /mdpaper.format


๐Ÿง  Skill System + Project Memory

Our core differentiator: We don't just provide tools โ€” we provide guided workflows that know how to combine tools effectively, AND project memory that remembers your research journey across sessions.

What is a Skill?

Tool  = Single capability (search, save, analyze...)
Skill = Complete knowledge (how to combine tools to accomplish tasks)

26 Skills covering the full research lifecycle:

Category Skills Triggers
๐Ÿ”ฌ Research literature-review, concept-development, concept-validation, parallel-search "ๆ‰พ่ซ–ๆ–‡", "search", "concept", "validate"
โœ๏ธ Writing draft-writing, reference-management, word-export "ๅฏซ่‰็จฟ", "draft", "citation", "export"
๐Ÿ“ Management project-management, memory-updater, memory-checkpoint "ๆ–ฐๅฐˆๆกˆ", "ๅˆ‡ๆ›", "ๅญ˜ๆช”"
๐Ÿ› ๏ธ Development git-precommit, code-refactor, test-generator, code-reviewer "commit", "refactor", "test"

Project Memory

Each project maintains its own .memory/ folder, so the AI continues previous research coherently:

projects/{slug}/
โ”œโ”€โ”€ .memory/
โ”‚   โ”œโ”€โ”€ activeContext.md   โ† Agent's working memory
โ”‚   โ””โ”€โ”€ progress.md        โ† Research milestones
โ”œโ”€โ”€ concept.md             โ† Research concept (with ๐Ÿ”’ protected sections)
โ”œโ”€โ”€ references/            โ† Foam-compatible literature library
โ”œโ”€โ”€ drafts/                โ† Markdown drafts with [[citations]]
โ”œโ”€โ”€ data/                  โ† CSV data files
โ””โ”€โ”€ results/               โ† Figures, .docx exports

โœจ Key Features

Literature & References

  • PubMed + Europe PMC + CORE search (37 search tools)
  • PICO parsing for clinical questions
  • MCP-to-MCP verified data โ€” PMID sent directly, no agent hallucination
  • Layered trust: ๐Ÿ”’ VERIFIED (PubMed) ยท ๐Ÿค– AGENT (AI notes) ยท โœ๏ธ USER (your notes)
  • Foam wikilinks: [[author2024_12345678]] with hover preview & backlinks

Writing & Editing

  • AI draft generation per section (Introduction, Methods, Results, Discussion)
  • Citation-Aware Editing โ€” patch_draft validates all [[wikilinks]] before saving
  • Auto-fix citation format โ€” [[12345678]] โ†’ [[author2024_12345678]]
  • Novelty validation โ€” 3-round independent scoring (threshold: 75/100)
  • Anti-AI writing rules โ€” Evidence funnel structure, no clichรฉs

Data Analysis

  • CSV dataset analysis with descriptive statistics
  • Statistical tests (t-test, ANOVA, chiยฒ, correlation, Mann-Whitney, Fisher's)
  • Table 1 generator โ€” Baseline characteristics with automatic variable detection
  • Publication-ready figures (matplotlib/seaborn)

Export & Submission

  • Word export with journal template support
  • Cover letter + highlights generation
  • Manuscript consistency checker
  • Reviewer response generator (point-by-point format)
  • Submission checklist (word count, figure format, etc.)

Infrastructure

  • DDD Architecture (Domain-Driven Design) with clean layer separation
  • 15 pre-commit hooks (ruff, mypy, bandit, pytest, prettier, doc-update...)
  • Workspace State recovery for cross-session continuity
  • uv for all Python package management

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                          ๐Ÿ‘ค User Layer                                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   VS Code        โ”‚    โ”‚  Foam Extension               โ”‚  โ”‚Dashboard โ”‚  โ”‚
โ”‚  โ”‚   Editor         โ”‚    โ”‚  [[wikilinks]] autocomplete    โ”‚  โ”‚(Next.js) โ”‚  โ”‚
โ”‚  โ”‚                  โ”‚    โ”‚  hover preview ยท backlinks     โ”‚  โ”‚          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚
                                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               ๐Ÿค– Copilot Agent (Orchestrator)                             โ”‚
โ”‚      26 Skills + 14 Prompt Workflows + Agent Customization               โ”‚
โ”‚   /mdpaper.search โ†’ /mdpaper.concept โ†’ /mdpaper.draft โ†’ export          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚                  โ”‚                  โ”‚                  โ”‚
        โ–ผ                  โ–ผ                  โ–ผ                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ“ mdpaper    โ”‚  โ”‚๐Ÿ” pubmed-     โ”‚  โ”‚๐Ÿ’ก cgu         โ”‚  โ”‚๐Ÿ”Œ External    โ”‚
โ”‚  57 tools     โ”‚  โ”‚  search       โ”‚  โ”‚  13 tools     โ”‚  โ”‚   MCPs (uvx)  โ”‚
โ”‚               โ”‚  โ”‚  37 tools     โ”‚  โ”‚               โ”‚  โ”‚               โ”‚
โ”‚ โ€ข projects    โ”‚  โ”‚ โ€ข PubMed      โ”‚  โ”‚ โ€ข brainstorm  โ”‚  โ”‚ ๐ŸŽจ drawio     โ”‚
โ”‚ โ€ข references  โ”‚  โ”‚ โ€ข Europe PMC  โ”‚  โ”‚ โ€ข deep_think  โ”‚  โ”‚ โ€ข diagrams    โ”‚
โ”‚ โ€ข drafts      โ”‚  โ”‚ โ€ข CORE        โ”‚  โ”‚ โ€ข spark       โ”‚  โ”‚               โ”‚
โ”‚ โ€ข validation  โ”‚  โ”‚ โ€ข PICO        โ”‚  โ”‚ โ€ข methods     โ”‚  โ”‚ ๐Ÿ“– zotero     โ”‚
โ”‚ โ€ข analysis    โ”‚  โ”‚ โ€ข Gene/Chem   โ”‚  โ”‚               โ”‚  โ”‚ โ€ข import refs โ”‚
โ”‚ โ€ข export      โ”‚  โ”‚ โ€ข Session     โ”‚  โ”‚               โ”‚  โ”‚               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                          ๐Ÿ’พ Local Storage                                 โ”‚
โ”‚  projects/{slug}/                                                        โ”‚
โ”‚  โ”œโ”€โ”€ concept.md          โ† Research concept with ๐Ÿ”’ protected sections   โ”‚
โ”‚  โ”œโ”€โ”€ references/{pmid}/  โ† Foam-compatible .md + metadata.json           โ”‚
โ”‚  โ”œโ”€โ”€ drafts/             โ† Markdown drafts with [[citations]]            โ”‚
โ”‚  โ”œโ”€โ”€ data/               โ† CSV data files                                โ”‚
โ”‚  โ””โ”€โ”€ results/            โ† Figures, .docx exports                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

MCP-to-MCP Direct Communication

When saving references, data flows directly between MCP servers โ€” the Agent only passes a PMID, never full metadata:

Agent: "save PMID:24891204"
     โ”‚
     โ–ผ
mdpaper.save_reference_mcp(pmid="24891204")
     โ”‚  Direct HTTP call (not through Agent)
     โ–ผ
pubmed-search: GET /api/cached_article/24891204
     โ”‚  Returns verified PubMed data
     โ–ผ
Saved with layered trust:
  ๐Ÿ”’ VERIFIED: PubMed data (immutable)
  ๐Ÿค– AGENT:    AI notes (marked source)
  โœ๏ธ USER:     Your notes (editable)

๐Ÿ› ๏ธ mdpaper MCP Tools

57 active tools organized into 7 groups:

๐Ÿ“ Project Management (15 tools)

Projects, exploration mode, workspace state recovery, diagram management.

Key Tools Description
create_project / switch_project / delete_project Project lifecycle
start_exploration / convert_exploration_to_project Explore-first workflow
get_workspace_state / sync_workspace_state Cross-session recovery
save_diagram / list_diagrams Draw.io integration
setup_project_interactive Interactive paper type configuration

๐Ÿ“š Reference Management (10 tools)

Save, search, format, and manage references with Foam integration.

Key Tools Description
save_reference_mcp Recommended โ€” Save by PMID via MCP-to-MCP (verified data)
list_saved_references / search_local_references Browse & search library
format_references / set_citation_style Vancouver / APA / Nature
sync_references Sync [[wikilinks]] to numbered references

โœ๏ธ Draft & Editing (13 tools)

Write, edit, cite โ€” with built-in validation.

Key Tools Description
write_draft / draft_section Create and write sections
get_available_citations List all valid [[citation_key]] before editing
patch_draft Citation-aware partial edit with wikilink validation
insert_citation / suggest_citations Smart citation insertion
scan_draft_citations / sync_references Citation management
get_section_template Section-specific writing guidelines

โœ… Validation (3 tools)

Tool Description
validate_concept Full novelty scoring (3 rounds, threshold 75/100)
validate_concept_quick Quick structural check
validate_wikilinks Auto-fix [[12345678]] โ†’ [[author2024_12345678]]
validate_for_section Check concept before writing specific section

๐Ÿ“Š Data Analysis (9 tools)

Tool Description
analyze_dataset Descriptive statistics for CSV
run_statistical_test t-test, ANOVA, chiยฒ, correlation, etc.
generate_table_one Baseline characteristics with auto variable detection
create_plot Publication-ready figures
insert_figure Insert figure into draft with archive validation
insert_table Insert table into draft with archive validation
list_assets List figures and tables in project results

๐Ÿ“„ Export & Submission (6 + 1 tools)

Category Key Tools
Word Export export_word, list_templates, start_document_session, verify_document
Submission generate_cover_letter, check_formatting, generate_highlights
Review create_reviewer_response, format_revision_changes

๐Ÿ” pubmed-search MCP Tools (37 tools)

Category Key Tools
Search search_literature, generate_search_queries, parse_pico
Databases PubMed, Europe PMC (fulltext + text mining), CORE (200M+ open access)
Gene/Chem search_gene, get_gene_details, search_compound, search_clinvar
Exploration find_related_articles, find_citing_articles, get_article_references
Export prepare_export (RIS/BibTeX/CSV), get_citation_metrics (iCite RCR)
Session get_session_pmids, list_search_history (survives AI memory limits)

๐Ÿ’ก CGU Creative Tools (13 tools)

Category Key Tools
Ideation generate_ideas, spark_collision, spark_collision_deep
Analysis deep_think, multi_agent_brainstorm
Methods list_methods, select_method, apply_method

๐Ÿ”— Foam Integration

Feature How to Use Benefit
Wikilinks [[greer2017_27345583]] Link references in drafts
Hover Preview Mouse over any [[link]] See abstract without opening file
Backlinks Panel Open reference file See which drafts cite this paper
Graph View Ctrl+Shift+P โ†’ Foam: Show Graph Visualize paper connections
Project Isolation Auto-switches on switch_project Only see current project's references

Citation Autocomplete

Type [[ in any draft to trigger the autocomplete menu:

According to previous studies [[    โ† Type [[ here
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚ ๐Ÿ” greer2017_27345583       โ”‚
                              โ”‚    smith2020_12345678       โ”‚
                              โ”‚    chen2019_87654321        โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Search by author ([[greer), year ([[2017), PMID ([[27345583), or keyword ([[sedation).


๐Ÿ“š Reference File Structure

References are stored with Foam-optimized, layered-trust structure:

references/{pmid}/
โ”œโ”€โ”€ {citation_key}.md   โ† YAML frontmatter + abstract (human-readable)
โ””โ”€โ”€ metadata.json       โ† Full metadata (programmatic access)
---
# ๐Ÿ”’ VERIFIED (from PubMed, immutable)
title: "Complications of airway management"
author:
  - { family: Pacheco-Lopez, given: Paulette C }
year: 2014
journal: Respiratory Care
pmid: "24891204"
_source:
  mcp: pubmed-search
  verified: true

# ๐Ÿค– AGENT (AI-generated, marked)
_agent:
  notes: "Key review on airway complications"
  relevance: high

# Foam
aliases: [pachecolopez2014, "PMID:24891204"]
tags: [reference, airway, review]
---

๐Ÿ“‚ Project Structure

med-paper-assistant/
โ”œโ”€โ”€ src/med_paper_assistant/       # Core MCP server (DDD architecture)
โ”‚   โ”œโ”€โ”€ domain/                    #   Business logic, entities, value objects
โ”‚   โ”œโ”€โ”€ application/               #   Use cases, services
โ”‚   โ”œโ”€โ”€ infrastructure/            #   DAL, external services
โ”‚   โ””โ”€โ”€ interfaces/mcp/            #   MCP server, 57 tools in 7 groups
โ”‚
โ”œโ”€โ”€ integrations/                  # Bundled MCP servers
โ”‚   โ”œโ”€โ”€ pubmed-search-mcp/         #   PubMed/PMC/CORE search (37 tools)
โ”‚   โ””โ”€โ”€ cgu/                       #   Creative generation (13 tools)
โ”‚
โ”œโ”€โ”€ vscode-extension/              # VS Code Extension
โ”‚   โ”œโ”€โ”€ src/                       #   Extension source
โ”‚   โ”œโ”€โ”€ skills/                    #   Agent skill definitions
โ”‚   โ””โ”€โ”€ prompts/                   #   Quick-action prompts
โ”‚
โ”œโ”€โ”€ dashboard/                     # Next.js project management UI
โ”‚   โ””โ”€โ”€ src/
โ”‚
โ”œโ”€โ”€ projects/                      # Research projects (isolated workspaces)
โ”‚   โ””โ”€โ”€ {slug}/
โ”‚       โ”œโ”€โ”€ .memory/               #   Cross-session AI memory
โ”‚       โ”œโ”€โ”€ concept.md             #   Research concept
โ”‚       โ”œโ”€โ”€ references/            #   Local reference library
โ”‚       โ”œโ”€โ”€ drafts/                #   Markdown drafts
โ”‚       โ””โ”€โ”€ results/               #   Figures, exports
โ”‚
โ”œโ”€โ”€ .claude/skills/                # 26 Agent skill definitions
โ”œโ”€โ”€ .github/prompts/               # 14 Prompt workflow files
โ”œโ”€โ”€ templates/                     # Journal Word templates
โ”œโ”€โ”€ memory-bank/                   # Global project memory
โ””โ”€โ”€ tests/                         # pytest test suite

๐Ÿ—บ๏ธ Roadmap

Status Feature Description
โœ… 3 MCP Servers mdpaper (57) + pubmed-search (37) + CGU (13)
โœ… Foam Integration Wikilinks, hover preview, backlinks, project isolation
โœ… Project Memory .memory/ for cross-session AI context
โœ… Table 1 Generator Auto-generate baseline characteristics
โœ… Novelty Validation 3-round scoring with 75/100 threshold
โœ… Citation-Aware Editing patch_draft with wikilink validation
โœ… MCP-to-MCP Trust Verified PubMed data via direct HTTP
โœ… Pre-commit Hooks 15 hooks (ruff, mypy, bandit, pytest, prettier...)
๐Ÿ”œ Full VSX Extension TreeView, CodeLens, Diagnostics (Direction C)
๐Ÿ”œ Pandoc Export Word + LaTeX dual export with CSL citations
๐Ÿ“‹ Systematic Review PRISMA flow, Risk of Bias, meta-analysis
๐Ÿ“‹ AI Writing Intelligence Citation intelligence, coherence engine
๐Ÿ“‹ REST API Mode Expose tools as REST API

Architecture Direction: Direction C โ€” Full VSX + Foam + Pandoc

Legend: โœ… Complete | ๐Ÿ”œ In Progress | ๐Ÿ“‹ Planned


๐Ÿค Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

  • ๐Ÿ› Report bugs โ€” Open an issue
  • ๐Ÿ’ก Suggest features โ€” Share your ideas
  • ๐Ÿ”ง Submit code โ€” Fork โ†’ Branch โ†’ PR

๏ฟฝ Citation

If you use Medical Paper Assistant in your research, please cite our paper:

@article{medpaper2025,
  title   = {MedPaper Assistant: A Self-Evolving, MCP-Based Framework for
             AI-Assisted Medical Paper Writing with Closed-Loop Quality Assurance},
  author  = {[Authors]},
  year    = {2025},
  note    = {Submitted to medRxiv},
  url     = {https://github.com/u9401066/med-paper-assistant}
}

Note: This paper was produced entirely by the MedPaper Assistant's autonomous pipeline as a self-referential demonstration. The manuscript, audit trail, and all quality metrics are available in projects/self-evolving-ai-paper-writing-framework/. The preprint is being submitted to medRxiv โ€” this section will be updated with the DOI once available.


๏ฟฝ๐Ÿ“„ License

Apache License 2.0 โ€” See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

med_paper_assistant-0.3.9.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

med_paper_assistant-0.3.9-py3-none-any.whl (260.0 kB view details)

Uploaded Python 3

File details

Details for the file med_paper_assistant-0.3.9.tar.gz.

File metadata

  • Download URL: med_paper_assistant-0.3.9.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for med_paper_assistant-0.3.9.tar.gz
Algorithm Hash digest
SHA256 7fc60a9113ffc452de67921d1ff1a3d9d3f8f2a1bc9f4b43181a8d2ca70ac480
MD5 af772f63da7d236008752ceafd653c00
BLAKE2b-256 adaaf1afb2cb64a8ae837308bbb2b71250e05abda2c3218ebc803c9b2e705480

See more details on using hashes here.

Provenance

The following attestation bundles were made for med_paper_assistant-0.3.9.tar.gz:

Publisher: release.yml on u9401066/med-paper-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file med_paper_assistant-0.3.9-py3-none-any.whl.

File metadata

File hashes

Hashes for med_paper_assistant-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ec6d444c78b370465454cb1008e4111839b0930544fc91e38ef3e73959c448d6
MD5 371728f78ad7c3c0086701557446fe60
BLAKE2b-256 1ca7141758b310cd6626a25d1f01dcb1b10a2e17a54275f4d40591109c103f36

See more details on using hashes here.

Provenance

The following attestation bundles were made for med_paper_assistant-0.3.9-py3-none-any.whl:

Publisher: release.yml on u9401066/med-paper-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page