Skip to content

u9401066/med-paper-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

271 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Medical Paper Assistant

Python MCP Copilot License

Windows Linux macOS

πŸ”¬ An Integrated AI Toolkit for Medical Paper Writing
3 MCP Servers Β· ~135 Tools Β· 26 Skills Β· 15 Prompts Workflows β€” All in VS Code

πŸ“– ηΉι«”δΈ­ζ–‡η‰ˆ

πŸ€– Auto-Paper: Fully Autonomous Paper Writing Guide β€” 11-Phase Pipeline, 78 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 87 Paper writing: projects, references, drafts, analysis, validation, review, 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 15 /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 Β· 15 Prompts"]
        Foam[Foam Plugin]
        Ext[MedPaper Extension]
        Dash[Dashboard]
    end

    subgraph MCP["MCP Servers (~138 tools)"]
      mdpaper["mdpaper<br/>88 tools<br/>Draft Β· Export Β· Validate Β· Review"]
        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
Loading

🎯 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: ~136 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

Windows PowerShell:

.\scripts\setup-integrations.ps1
.\scripts\start-drawio.ps1

πŸ’¬ 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 + 15 Prompt Workflows + Agent Customization               β”‚
β”‚   /mdpaper.search β†’ /mdpaper.concept β†’ /mdpaper.draft β†’ export          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                  β”‚                  β”‚                  β”‚
        β–Ό                  β–Ό                  β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ πŸ“ mdpaper    β”‚  β”‚πŸ” pubmed-     β”‚  β”‚πŸ’‘ cgu         β”‚  β”‚πŸ”Œ External    β”‚
β”‚  88 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

81 active tools organized into 8 groups:

πŸ“ Project Management (17 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
update_authors Manage structured author metadata

πŸ“š Reference Management (12 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

πŸ” Review & Audit (22 tools)

Category Key Tools
Pipeline Gates validate_phase_gate, pipeline_heartbeat, validate_project_structure
Review Loop start_review_round, submit_review_round, request_section_rewrite
Pipeline Control pause_pipeline, resume_pipeline, approve_section
Audit & Hooks run_quality_audit, run_writing_hooks, record_hook_event
Self-Evolution run_meta_learning, verify_evolution, apply_pending_evolutions
Domain Constraints check_domain_constraints, evolve_constraint
Data & Health validate_data_artifacts, diagnose_tool_health, check_formatting

πŸ“„ Export & Submission (10 tools)

Category Key Tools
Word Export export_word, list_templates, start_document_session, verify_document
Pandoc Export export_docx, export_pdf, preview_citations, build_bibliography
Submission generate_cover_letter, generate_highlights

πŸ” 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, 88 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/               # 15 Prompt workflow files
β”œβ”€β”€ templates/                     # Journal Word templates
β”œβ”€β”€ memory-bank/                   # Global project memory
└── tests/                         # pytest test suite

πŸ—ΊοΈ Roadmap

Status Feature Description
βœ… 3 MCP Servers mdpaper (88) + 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